MATE

来自 Arch Linux 中文维基

摘自 MATE 主页:

The MATE 桌面环境是 GNOME 2 的延续,为 Linux 及其他类 Unix 系统提供直观和有吸引力的桌面。MATE is 开发社区非常活跃,添加很多新的功能并保留传统使用习惯。

安装[编辑 | 编辑源代码]

可以通过如下方式安装 安装 MATE:

  • mate包组 包含标准 MATE 需要的核心桌面环境,包含 marco, mate-panel and mate-session-manager 等。
  • mate-extra包组 包含额外的工具和程序,这些程序可以和 MATE 桌面协同工作。仅安装 mate-extra包组 时并不会通过依赖引入全部 mate包组 。要安装全部 MATE 软件包,请同时安装两个软件包组。

MATE 应用程序[编辑 | 编辑源代码]

MATE 大部分由 GNOME 2 软件和更加组成,这些软件会被重命名以避免和 GNOME3 版本冲突,下面是名称对比:

应用程序 GNOME 2 MATE
菜单编辑器 Alacarte mozo
文件管理器 Nautilus caja
窗口管理器 Metacity marco
文本编辑器 Gedit pluma
图片 Eye of GNOME Eye of MATE (eom)
Document viewer Evince atril
归档管理器 File Roller engrampa

其他以 GNOME 开头的核心程序 (比如 GNOME Terminal, GNOME Panel, GNOME Menus 等) 会将前缀改为 MATE, 变成 MATE Panel, MATE Menus 等。

额外的 MATE 软件包[编辑 | 编辑源代码]

有些非官方 MATE 程序是由 MATE 社区开发维护,并没有包含在 mate包组mate-extra包组 中。

  • Dock Applet — Application dock for the MATE panel.
https://github.com/robint99/dock-applet || mate-applet-dock
  • Online Radio Applet — A MATE panel applet to let you play your favourite online radio station with a single click.
http://www.zavedil.com/online-radio-applet/ || mate-applet-streamer
  • MATE Menu — Advanced menu for MATE Panel, a fork of MintMenu.
https://github.com/ubuntu-mate/mate-menu || mate-menuAUR
  • MATE Tweak — Tweak tool for MATE, a fork of mintDesktop.
https://github.com/ubuntu-mate/mate-tweak || mate-tweakAUR
  • BriskMenu — Modern, efficient menu for the MATE Desktop Environment from SolusOS distribution.
https://github.com/getsolus/brisk-menu || brisk-menuAUR

要使用 Caja 的高级功能,需要安装额外的软件包,请参考 File manager functionality.

启动[编辑 | 编辑源代码]

显示管理器 中选择 MATE 即可,

或者是手动方式,要用 startx 启动 MATE,将 exec mate-session 加入 ~/.xinitrc 文件.

Configuration[编辑 | 编辑源代码]

Tango-preferences-desktop-locale.png本文或本节需要翻译。要贡献翻译,请访问简体中文翻译团队Tango-preferences-desktop-locale.png

附注: 请提供模板的第一个位置参数以更详细的指示。(在 Talk:MATE# 中讨论)

MATE can be configured with its Control Center application (mate-control-center) provided by the mate-control-center package. To manage some hardware, you may need to install additional tools.

Audio
ALSA and PulseAudio backends are supported by the mate-media package.
Bluetooth
For Bluetooth device support, install the blueman package. See Blueman.
Networking
For configuring the network, install the network-manager-applet package. See NetworkManager.
Power
UPower backend is supported by the mate-power-manager package.
Printers
For configuring the printers, install the system-config-printer package.

Accessibility[编辑 | 编辑源代码]

MATE is well suited for use by individuals with sight or mobility impairment. Install orca, espeakAUR (Screen reader for individuals who are blind or visually impaired) and onboard (On-screen keyboard useful for mobility impaired users)

Before starting MATE for the first time, enter the following command as the user who needs accessibility features:

$ gsettings set org.mate.interface accessibility true

Once you start MATE, you can configure the accessibility applications via System > Preferences > Assistive Technologies, although if you need Orca, you will need to run it from the Alt-F2 run window in order to start getting speech.

Notifications[编辑 | 编辑源代码]

Battery discharge

To disable the notification on battery discharge, run:

$ gsettings set org.mate.power-manager notify-discharging false
Brightness

See Backlight#Kernel command-line options.

Tips and tricks[编辑 | 编辑源代码]

Disabling compositing[编辑 | 编辑源代码]

Compositing is enabled by default. To disable it, navigate to Look and Feel > Windows > General in the System Preferences and tick the box alongside Enable software compositing window manager. Alternatively, you can run the following from the terminal:

$ gsettings set org.mate.Marco.general compositing-manager false

Disabling new window centering[编辑 | 编辑源代码]

By default, new windows are placed in the center. To disable centering new windows, navigate to run Windows > Placement in the System Preferences and tick the box alongside Center new windows. Alternatively, you can run the following from the terminal:

$ gsettings set org.mate.Marco.general center-new-windows false

Disabling window snapping[编辑 | 编辑源代码]

Window snapping is enabled by default. To disable it, navigate to run Windows > Placement in the System Preferences and tick the box alongside Enable window tiling. Alternatively, you can run the following from the terminal:

$ gsettings set org.mate.Marco.general allow-tiling false

Undecorating maximized windows[编辑 | 编辑源代码]

Hiding the decorations of maximized windows is possible with the use of mate-tweakAUR tool; after installation navigate to Look and Feel > MATE Tweak > Windows in the System Preferences and enable Undecorate maximized windows in the Window Behaviour section.

提示:If this option is grayed out and unavailable, make sure mate-netbook is installed.

Show or hide desktop icons[编辑 | 编辑源代码]

By default, MATE shows multiple icons on the desktop: the content of your desktop directory, computer, home and network directories, the trash and mounted drives. You can show or hide them individually or all at once using gsettings.

Hide all desktop icons[编辑 | 编辑源代码]

$ gsettings set org.mate.background show-desktop-icons false

Doing so may cause some graphics artifacts on secondary monitors.

Hide individual icons[编辑 | 编辑源代码]

Hide computer icon:

$ gsettings set org.mate.caja.desktop computer-icon-visible false

Hide user directory icon:

$ gsettings set org.mate.caja.desktop home-icon-visible false

Hide network icon:

$ gsettings set org.mate.caja.desktop network-icon-visible false

Hide trash icon:

$ gsettings set org.mate.caja.desktop trash-icon-visible false

Hide mounted volumes:

$ gsettings set org.mate.caja.desktop volumes-visible false

Replace false with true for the icons to reappear.

Use a different window manager[编辑 | 编辑源代码]

The marco window manager can be replaced with another window manager via either of the following methods:

Using gsettings (recommended)

Execute the following to specify a different window manager for MATE:

$ gsettings set org.mate.session.required-components windowmanager wm-name
Using MATE session autostart

You can autostart a window manager of your choice using mate-session-properties. This means that the autostarted window manager will replace the default window manager at login. Navigate to Startup Applications in the System Preferences. In the dialog click Add. The command should take the syntax wm-name --replace.

Prevent Caja from managing the desktop[编辑 | 编辑源代码]

To prevent Caja from managing the desktop, execute the following:

$ gsettings set org.mate.background show-desktop-icons false
$ killall caja  # Caja will be restarted by session manager

Change window decoration button order[编辑 | 编辑源代码]

You can change the button order using the graphical dconf-editor or the gsettings command line tool:

$ gsettings set org.mate.Marco.general button-layout 'close,maximize,minimize:'

and put menu, close, minimize and maximize in your desired order, separated by commas. The colon is used to specify on which side of the titlebar the window buttons will appear and must be used for the changes to apply.

Auto open file manager after drive mount[编辑 | 编辑源代码]

By default, MATE automatically opens a new file manager window when a drive is mounted. To disable this:

$ gsettings set org.mate.media-handling automount-open false

And to disable automounting:

$ gsettings set org.mate.media-handling automount false

Screensaver[编辑 | 编辑源代码]

MATE uses mate-screensaver to lock your session. By default there are a limited number of screensavers available. To make more screensavers available, install the mate-screensaver-hacksAUR package. This will allow you to use XScreenSaver screensavers with mate-screensaver.

Spatial view in Caja[编辑 | 编辑源代码]

To ensure that each new folder opens in a new window (known as spatial view), open Caja's preferences dialog, click on the behaviour tab and tick the 'Open each folder in its own window' option. Alternatively, execute the following command which achieves the same effect:

$ gsettings set org.mate.caja.preferences always-use-browser false

Change font DPI setting[编辑 | 编辑源代码]

You can alter the DPI (dots per inch) of the fonts in MATE by right-clicking on the desktop and choosing Change desktop background > Fonts > Details > Resolution.

Change applications menu icon[编辑 | 编辑源代码]

By default, the applications menu icon is set to start-here. To use a different icon, copy your icon to a folder such as /usr/local/share/pixmaps and execute the following:

$ gsettings set org.mate.panel.menubar icon-name icon

where icon is the name of your icon. Do not include the file extension in the icon name. Finally, restart MATE Panel.

Panel speed settings[编辑 | 编辑源代码]

Hide/Unhide delay

To adjust the amount of time it takes for the panel to disappear or reappear when autohide is enabled, execute the following:

$ dconf write /org/mate/panel/toplevels/panel/(un)hide-delay time

where panel is either top or bottom and time is a value in miliseconds, e.g. 300.

Animation speed

To set the speed at which panel animations occur, execute the following:

$ dconf write /org/mate/panel/toplevels/panel/animation-speed value

where panel is either top or bottom and value is either "'fast'", "'medium'" or "'slow'".

Set the terminal for caja-open-terminal[编辑 | 编辑源代码]

The caja-open-terminal extension uses GSettings to determine which terminal to use - mate-terminal is the default. To change the terminal that will be used, run the following command

$ gsettings set org.mate.applications-terminal exec my-terminal

where my-terminal is the name of the terminal executable to be launched, for example: xterm.

Troubleshooting[编辑 | 编辑源代码]

Toggling compositing[编辑 | 编辑源代码]

Some software may have issues rendering graphics when working on an environment using the NVIDIA proprietary drivers and a compositing window manager.

To easily toggle the compositing feature, save the following script somewhere within the Home directory:

~/.scripts/compositing.sh
#!/bin/sh
if [ "$(gsettings get org.mate.Marco.general compositing-manager)" = "true" ]
then
  gsettings set org.mate.Marco.general compositing-manager false
else
  gsettings set org.mate.Marco.general compositing-manager true
fi

and then create a custom keyboard shortcut that executes the file, e.g. Ctrl+Alt+C, to sh ~/.scripts/compositing.sh.

Vertical sync for compositing[编辑 | 编辑源代码]

Mate's window manager, marco, supports tear-free software compositing via DRI3/Xpresent. [1]

If your graphics driver does not support DRI3 (e.g. the Nvidia Proprietary driver), marco does not support vertical synchronization via OpenGL, which may cause video tearing with enabled compositing. [2] In this case, consider a different composite manager with OpenGL support such as picom.

Consistent cursor theme[编辑 | 编辑源代码]

See Cursor themes#Desktop environments.

Use of gradient backgrounds with LightDM[编辑 | 编辑源代码]

If you wish to use the default MATE (1.8) Stripes background as the LightDM background as well so as to make for seamless transition from LightDM to MATE, you will find that it is runtime-constructed from a grayscale PNG upon which MATE layers a vertical blue-to-green gradient, something which LightDM does not currently support. If insistent, you can work around this by temporarily setting /org/mate/desktop/background/show-desktop-icons to false, either through the dconf-editor tool available from the System Tools menu or by running

$ gsettings set org.mate.background show-desktop-icons false

from the Alt-F2 Run Application dialog, then running killall mate-panel from said dialog and hitting Print Screen before the panel reappears. You are then presented with a Save As dialog for exactly that fully rendered, screen-sized PNG that you need for LightDM. Run

$ gsettings set org.mate.background show-desktop-icons true

to have your desktop icons reappear, if desired.

Enabling panel shadow[编辑 | 编辑源代码]

Due to a race condition, the panel shadow does not appear after logging in to the MATE desktop, even with compositing enabled. [3]

Copy /usr/share/applications/marco.desktop and add a delay:

~/.local/share/applications/marco.desktop
X-MATE-Autostart-Phase=Applications
X-MATE-Autostart-Delay=2
X-MATE-Provides=windowmanager
X-MATE-Autostart-Notify=true
注意: Delays are only allowed in the applications phase, hence X-MATE-Autostart-Phase must be set to Applications.

If this has no effect, increase the delay duration.

Disabling scroll in taskbar[编辑 | 编辑源代码]

A feature of the MATE panel window list is that windows can be scrolled through using the mouse or touchpad. This feature may be troublesome for some as there is potential for accidental, unintended scrolling through windows.

Whilst there is no way of disabling this feature through MATE's settings, this feature can be disabled by patching libwnck3 using the Arch Build System; in this case, rebuild libwnck3 with the following patch. For more information on rebuilding packages with patches applied, see Patching in ABS#Applying patches.

Logout/shutdown delayed by at-spi-registryd[编辑 | 编辑源代码]

When logging out or shutting down, you may find that you are presented with an A program is still running: at-spi-registryd.desktop popup. As a workaround, you can prevent at-spi-registryd from starting - see GTK#Suppress warning about accessibility bus - though this may have an effect on some accessibility features.

Caja's text file preview[编辑 | 编辑源代码]

Since the migration to GTK 3 this feature is not working.[4]

GTK 2 applications seem to ignore default MATE themes[编辑 | 编辑源代码]

Themes that come with mate-themes need optional dependencies gtk-engines and gtk-engine-murrine for GTK 2 themes to function properly.

Extra decoration on CSD applications[编辑 | 编辑源代码]

An extra decoration can appear on CSD applications (Firefox, Visual Studio Code...) when they are unmaximized.[5]

Uninstalling the package mate-netbook solves the issue.

Keyboard layout selector[编辑 | 编辑源代码]

When multiple keyboard layouts are enabled, a layout selection icon is displayed in the system tray. Because of a bug ([6]), depending on the currently used theme, it sometimes happens to be displayed with white font on bright background (or in some other barely legible configuration, such as with green font).

This issue can be worked around by manually setting the font color (e.g., '0 0 0' for black):

$ gsettings set org.mate.peripherals-keyboard-xkb.indicator foreground-color '0 0 0'

See also[编辑 | 编辑源代码]