GNOME (简体中文)

From ArchWiki
Jump to: navigation, search
翻译状态: 本文是英文页面 GNOME翻译,最后翻译时间:2015-10-05,点击这里可以查看翻译后英文页面的改动。

GNOME (pronounced gah-nohm or nohm)是一个简单易用的桌面环境 .它由The GNOME Project 设计并且完全自由和开源. GNOME是GNU Project的一部分.

Contents

安装

以下两个软件包(组)均包含 GNOME 的组件:

gnome 包组包含基本桌面环境和软件,以提供标准的 GNOME 体验。

gnome-extra 包组包含剩余的可选工具,例如文本编辑器、压缩文件管理器、光盘烧录工具、邮件客户端、游戏、开发工具及其它非必需的软件。这些软件与 GNOME 桌面的集成很好。假如您不想安装 GNOME 全部的软件包,在安装它的时候注意看软件包描述(或者你可以先安装再删除他们)。

Note: mutter acts as a composite manager for the desktop, employing hardware graphics acceleration to provide effects aimed at reducing screen clutter. The GNOME session manager automatically detects if your video driver is capable of running GNOME Shell and if not, falls back to software rendering using llvmpipe.

附加的软件包

上面提到的包组不包括这些包:

  • Boxes — A simple user interface to access libvirt virtual machines.
https://wiki.gnome.org/Apps/Boxes || gnome-boxes
  • GNOME Initial Setup — A simple, easy, and safe way to prepare a new system.
https://github.com/GNOME/gnome-initial-setup || gnome-initial-setup
  • GNOME PackageKit — Collection of graphical tools for PackageKit to be used in the GNOME desktop.
https://github.com/GNOME/gnome-packagekit || gnome-packagekit
https://wiki.gnome.org/Apps/Nemiver || nemiver
  • Software — Lets you install and update applications and system extensions.
https://wiki.gnome.org/Apps/Software/ || gnome-software

GNOME会话

GNOME 有三个可用的会话,都使用 GNOME Shell

  • GNOME 是默认会话, 有创新的布局
  • GNOME Classic 的桌面布局类似于传统的GNOME 2, using pre-activated extensions and parameters. [1] Hence it is more a customized GNOME Shell than a truly distinct mode
  • GNOME on Wayland GNOME Shell 在新的Wayland协议上运行. 而传统的 X 应用程序在Xwayland上运行

运行 GNOME

GNOME可以通过 显示管理器以图形方式启动,或者从控制台手动启动。 为优化桌面整合, 建议使用GDM (简体中文) (GNOME显示管理器)。 注意 启用 一个显示管理器(例如GDM)意味着Xorg将会以root权限运行.

注意: 如果不使用 GDM,你将无法体验到对锁屏的原生支持,因此你不得不使用另一个屏幕锁来提供类似功能,参见Xmonad (简体中文)#GNOME 3 and xmonad.

图形界面登录

可以在登录管理器中选择 GNOME', GNOME ClassicGNOME on Wayland 作为登录选项。

手动启动

  • 对于标准的GNOME会话, 在~/.xinitrc 中添加:exec gnome-session.
  • 对于经典的gnome会话,在 ~/.xinitrc 中添加:{bc|export XDG_CURRENT_DESKTOP=GNOME-Classic:GNOME export GNOME_SHELL_SESSION_MODE=classic exec gnome-session --session=gnome-classic}}
注意: 最好把gnome--session之前的应用注释掉,我之前因为没有注释掉twm(另一个窗口管理器)导致启动gnome失败

我现在的/etc/X11/xinit/xinitrc如下:

#twm &
#xclock -geometry 50x50-1+1 &
#xterm -geometry 80x50+494+51 &
#xterm -geometry 80x20+494-0 &
#exec xterm -geometry 80x66+0+0 -name login
exec gnome-session

改完~/.xinitrc ,即可用startx 启动Gnome (see xinitrc for additional details, such as preserving the logind session). After setting up the ~/.xinitrc file it can also be arranged to Start X at login.

Note: Wayland 上的Gnome需要r xorg-server-xwayland 包, 不能使用 startx~/.xinitrc,而是要运行 gnome-session --session=gnome-wayland. 更多参见 Wayland.

Wayland 中的 GNOME 应用程序

根据当前的默认情况,GNOME 应用程序会利用 XWayland,以传统 X 应用程序的方式运行。若需在 Wayland 下测试 GNOME 应用,请以命令行方式运行程序,并加上以下前缀: env GDK_BACKEND=wayland <command>

Note: 可以设置全局的 Wayland 环境,使用 env GDK_BACKEND=wayland gnome-session --session=gnome-wayland。 但是现在无法工作—— gnome-session 会立即闪退.

请查看以下页面以了解开发进展: GNOME Applications under Wayland.

导览

您可以阅读这篇文章: GNOME Shell cheat sheet 以了解如何高效地使用 GNOME shell,它展示了 GNOME shell 的特色与使用快捷键。文章内容包括怎么切换任务,使用键盘,窗口控制,使用面板,预览模式等。 部分常用的快捷键:

  • Super: 进入预览模式
  • Super + m: 显示消息托盘
  • Super + a:显示应用程序菜单
  • Alt + F2:输入命令以快速启动应用
  • Alt + F2,然后输入 rrestart,再 Enter:重启 GNOME shell。这一条在你遇到 shell 图形界面错误时十分有用。

重启 GNOME shell

当修改过界面之后你可能需要重启 GNOME shell。你可以重新登陆,不过有一个简单快捷的方法。 按 Alt + F2 再输入 rEnter

GNOME Shell 崩溃

一些特定的微调或者经常性重启 Shell 会导致 shell 在将要重启的时候崩溃。这个时候你必须做好心理准备,然后强制注销。有一些修改,例如在GNOME Shellfallback mode, 之间切换,不能简单地使用 r 重启;必须重登陆来应用这个效果。

丑话说在前面,在重启 shell 前请先把有用的文档保存(或者关闭)。虽然这不是必要的,因为窗口和文档在重启了 shell 之后应该还在。

遗留名称

注意: 一些GNOME程序在文档和关于对话框的名称已更改,但可执行文件的名称却没有。这样的应用程序在下面表格列出.
提示: 在搜索栏中搜索的应用程序的遗留名称将成功返回现在的应用程序,例如搜索nautilus将返回Files.
Current Legacy
Files Nautilus
Web Epiphany
Videos Totem
Main Menu Alacarte
Document Viewer Evince
Disk Usage Analyser Baobab
Image Viewer EoG (Eye of GNOME)
Passwords and Keys Seahorse

配置

GNOME 3 是重新设计的,但是像大多数大型软件项目一样,他是很多不同时间的部分组装起来的。他没有一个 无所不包 的配置工具。新的 系统设置 比以前的控制面板有很大的改进。 系统设置 组织得很好,但是你可能想要更深层次地改变外观。

以前你所熟悉的配置工具现在有的好用,有的不好用了。有些设置选项隐藏着,不太容易找到。许多设置将会,或已经迁移到了新的工具上。你需要了解应当去哪里寻找适当的设置项,才能更好地配置 GNOME 外观。

GNOME 桌面环境依赖于一个存储配置的数据库后端(DConf)来存储 GNOME 与 GNOME 应用的设置。安装桌面环境时,GNOME 提供一套默认的配置,而各类应用程序向数据库中添加它们自己的配置。

对用户来说,最基础而直观的配置方式莫过于使用 GNOME 系统设置面板(gnome-control-center),以及 GNOME 应用程序各自的首选项(preferences)面板。如果您愿意,直接在 DConf 数据库中进行修改与配置总是可行的,尤其是在某些设置选项没有暴露在用户界面的情况下,直接修改可以更改某些隐藏选项。

GNOME 的这些配置通常是用户间相互独立的。以下文字仅供单用户配置所用,并没有提及更改全局配置模板的方法。

GNOME 系统设置

系统设置工具包括了一些最基础的 GNOME 环境配置选项。

色彩设置

colord 守护进程读取显示器的 EDID信息,并提取出合适的色彩配置内容。大多数情况下,自动色彩配置都是正确的,不需要额外设置;但是对于可能出现的偏差情况,例如使用较旧的显示器时,您可以将色彩配置文件放在 ~/.local/share/icc/ 下,并在设置面板里启用。

日期与时间

如果系统已有配置好的 NTP 守护进程,它同样会对 GNOME 桌面环境起作用。如果需要,您也可以手动控制进行同步。

如需在顶栏显示日期,请运行:

$ gsettings set org.gnome.desktop.interface clock-show-date true

另外,如需在 shell 的日历中显示周数,请运行:

$ gsettings set org.gnome.shell.calendar show-weekdate true

当然,以上配置均可以在 gnome-tweak-tool 里完成。

默认应用程序

Upon installing GNOME for the first time, you may find that the wrong applications are handling certain protocols. For example, totem opens videos instead of a previously used VLC. Some of the associations can be set from system settings via: System > Details > Default applications.

For other protocols and methods see Default applications for configuration.

鼠标和触摸板

为了帮助减少触摸板的干扰,你可能希望实现以下设置:

  • 禁用触摸板,打字时
  • 禁用滚动
  • 禁用点击

网络

NetworkManager is the native tool of the GNOME project to control network settings from the shell. It is installed by default as a dependency for tracker package, which is a part of gnome group, and just needs to be enabled.

While any other network manager can be used as well, NetworkManager provides the full integration via the shell network settings and a status indicator applet network-manager-applet (not required for GNOME).

在线帐户

Backends for the GNOME messaging application empathy as well as the GNOME Online Accounts section of the System Settings panel are provided in a separate group: telepathy. See #Unable to add accounts in Empathy and GNOME Online Accounts. Some online accounts, such as ownCloud, require gvfs-goa to be installed for full functionality in GNOME applications such as GNOME Files and GNOME Documents [2].

搜索

The GNOME shell has a search that can be quickly accessed by pressing the Super key and starting to type. The tracker package is installed by default as a part of gnome group and provides an indexing application and metadata database. It can be configured with the Search and Indexing menu item; monitor status with tracker-control. It is started automatically by gnome-session when the user logs in. Indexing can be started manually with tracker-control -s. Search settings can also be configured in the System Settings panel.

The Tracker database can be queried using the tracker-sparql command. View its manual page man tracker-sparql for more information.


高级设置

外观

GTK+主题和图标主题

除了以下所述的直接从底层修改主题的方法,您也可以使用 gnome-tweak-tool 工具进行修改。 安装一个新的主题和图标集,分别添加相关的~/.local/share/themes 或者 ~/.local/share/icons respectively (add to /usr/share/ instead of ~/.local/share/ for the themes to be available systemwide.) 他们和其他GUI设置也可以在 ~/.config/gtk-3.0/settings.ini中定义:

~/.config/gtk-3.0/settings.ini
[Settings]
gtk-theme-name = Adwaita
# next option is applicable only if selected theme supports it
gtk-application-prefer-dark-theme = true
# set font name and dimension
gtk-font-name = Sans 10

其他主题的站点:

一旦安装,就可以使用 GNOME Tweak Tool或GSettings -参阅下面的GSettings命令:

对于GTK+主题:

$ gsettings set org.gnome.desktop.interface gtk-theme theme-name

对于图标主题

$ gsettings set org.gnome.desktop.interface icon-theme theme-name
全局暗色主题

GNOME will use the Adwaita light theme by default however a dark variant of this theme (called the Global Dark Theme) also exists and can be selected using the Tweak Tool or by editing the GTK+ 3 settings file - see GTK+#Dark theme variant. Some applications such as Image Viewer (eog) use the dark theme by default. It should be noted that the Global Dark Theme only works with GTK+ 3 applications; some GTK+ 3 applications may only have partial support for the Global Dark theme. Qt and GTK+ 2 support for the Global Dark Theme may be added in the future.

窗口管理器主题

The window manager theme (the style of the window titlebars) can be set using the GNOME Tweak Tool or the following GSettings command:

$ gsettings set org.gnome.desktop.wm.preferences theme theme-name
标题栏的高度
注意: 在GNOME 3.16中,Mutter不再使用metacity主题。相反,标题栏的装饰主题使用GTK+。

改变标题栏的高度,创建以下文件,调整填充所需:

~/.config/gtk-3.0/gtk.css
.header-bar.default-decoration {
    padding-top: 3px;
    padding-bottom: 3px;
}

.header-bar.default-decoration .button.titlebutton {
    padding-top: 2px;
    padding-bottom: 2px;
}

标题栏的高度也可以通过选择一个较小的字体。默认情况下,字体设置为Cantarell Bold 11。您可能希望将字体设置为较小的,例如Sans Bold 10. 你可以这样使用以下GSettings命令来完成:

$ gsettings set org.gnome.desktop.wm.preferences titlebar-font 'Sans Bold 10'
标题栏按钮重新排序

设置 GNOME 窗口管理器顺序 (Mutter, Metacity):

$ gsettings set org.gnome.desktop.wm.preferences button-layout ':minimize,maximize,close'
提示: 冒号表示窗口标题栏的按钮会出现在哪一方
最大化时隐藏标题栏
  • Install mutter-hide-legacy-decorationsAUR. It changes a default setting in the window manager, so as to automatically hide the titlebar on legacy (non-headerbar) apps when they are maximized or tiled to the side.
  • Install maximusAUR. To start the application, execute maximus from a terminal. When running, the daemon will automatically maximize windows. It will undecorate maximized windows and redecorate them when they are unmaximized. If you do not want all windows to start maximized, run maximus -m instead. Note that this will only work with windows decorated by the window manager; applications that use client-side decoration such as GNOME Files will not be undecorated when maximized.
GNOME Shell主题

The theme of GNOME Shell itself is configurable. To use a Shell theme, firstly ensure that you have the gnome-shell-extensions package installed. Then enable the User Themes extension, either through GNOME Tweak Tool or through the GNOME Shell Extensions webpage. Shell themes can then be loaded and selected using the GNOME Tweak Tool.

There are a number of GNOME Shell themes available in the AUR.

Shell themes can also be downloaded from gnome-look.org.

桌面

各种桌面设置可以应用。

桌面上的图标

参阅 GNOME Files#Desktop Icons.

锁屏和背景

When setting the Desktop or Lock screen background, it is important to note that the Pictures tab will only display pictures located in /home/username/Pictures folder. If you wish to use a picture not located in this folder, use the commands indicated below.

对于桌面背景:

$ gsettings set org.gnome.desktop.background picture-uri 'file:///path/to/my/picture.jpg'

对于锁屏背景

$ gsettings set org.gnome.desktop.screensaver picture-uri 'file:///path/to/my/picture.jpg'

扩展

注意: 通过 The GNOME Shell browser plugin(即 extensions.gnome.org)安装扩展的方法暂时无法在 Chrome/Chromium 35 或更高的版本上进行。用户应当采用其它对网页安装更兼容的浏览器进行安装,如 Firefox (简体中文)GNOME/Web

GNOME Shell 可以使用第三方扩展来定制。这些扩展提供了一些额外的功能,如:提供一个可以一直显示的 Dock、更换 Shell 的主题,等等。

名为 gnome-shell-extensions 的软件包提供了一组由 The GNOME Project 维护,被当做 GNOME 计划的一部分的扩展,其中许多扩展被用在了 GNOME Classic 会话环境中。(最新版本的扩展你可以用他的代码 snapshot)列表在这里

 $ pacman -Ss gnome-shell-extension

另外,有许多扩展被收集并托管在了extensions.gnome.org 上。你可以在浏览器中浏览扩展列表,并轻松地一键点击来安装、管理、启用扩展。你可以在 这里找到有关插件的更多信息。

你也可以在 AUR里面找到一些有用的扩展。当然,它们大多也可以在 extensions.gnome.org 找到。一些值得一提的是:

另外,想要在屏幕底部显示一个任务栏,但又不想使用 GNOME Classic 的用户可以考虑使用 Window list 扩展 (由 gnome-shell-extensions 提供).

在安装完一个扩展之后可能需要重启 GNOME shell 。故障排除信息参照安装扩展导致GNOME停止工作

输入法

GNOME集成了的通过IBus的输入法, 只有ibus和添加想要的输入法引擎 (例如:ibus-libpinyin for Intelligent Pinyin) 需要安装,安装后,输入法引擎可以加入GNOME的区域和语言设置键盘布局。

字体

Tip: If you set the Scaling factor to a value above 1.00, the Accessibility menu will be automatically enabled.

Fonts can be set for Window titles, Interface (applications), Documents and Monospace. See the Fonts tab in the Tweak Tool for the relevant options.

For hinting, RGBA will likely be desired as this fits most monitors types, and if fonts appear too blocked reduce hinting to Slight or None.

启动应用程序

要启动登录某些应用程序, copy the relevant .desktop file from /usr/share/applications/ to ~/.config/autostart/. 可以使用Tweak Tool.来达到同样的效果。

Tip: If the plus sign button in the Tweak Tool's Startup Applications section is unresponsive, try start the Tweak Tool from the terminal using the following command: gnome-tweak-tool. See the following forum thread.
Note: The gnome-session-properties dialog was removed as of GNOME 3.12. It can be added back by installing the gnome-session-propertiesAUR package.

电源

The basic power settings that may want to be altered (these example settings assume the user is using a laptop - change them as desired):

$ gsettings set org.gnome.settings-daemon.plugins.power button-power hibernate
$ gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 3600
$ gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type hibernate
$ gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 1800
$ gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type hibernate
$ gsettings set org.gnome.desktop.lockdown disable-lock-screen true

To keep a monitor active on lid close:

$ gsettings set org.gnome.settings-daemon.plugins.xrandr default-monitors-setup do-nothing
Configure behaviour on lid switch close

The GNOME Tweak Tool, as of version 3.17.1, can optionally inhibit the systemd setting for the lid close ACPI event.[3] To inhibit the setting, start the Tweak Tool and, under the power tab, check the Don't suspend on lid close option. This means that the system will do nothing on lid close instead of suspending - the default behaviour. Checking the setting creates ~/.config/autostart/ignore-lid-switch-tweak.desktop which will autostart the Tweak Tool's inhibitor.

If you do not want the system to suspend or do nothing on lid close, you will need to ensure that the setting described above is not checked and then configure systemd with HandleLidSwitch=preferred_behaviour as described in Power management#ACPI events.

修改电池电量严重不足时的行为

The System Settings panel only allows the user to choose between Suspend or Hibernate. To choose another option such as Do Nothing open the dconf-editor and navigate to org.gnome.settings-daemon.plugins.power. Edit the "critical-battery-action" value to "nothing".

Sort applications into application (app) folders

Tip: The gnome-catgen (gnome-catgen-gitAUR) script allows you to manage folders through the creation of files in ~/.local/share/applications-categories named after each category and containing a list of the desktop files belonging to apps you'd like to have inside. Optionally, you can have it cycle through each app without a folder and input the desired category until you ctrl-c or run out of apps.

In the dconf-editor navigate to org.gnome.desktop.app-folders and set the value of folder-children to an array of comma separated folder names:

['Utilities', 'Sundry']

Add applications using gsettings:

$ gsettings set org.gnome.desktop.app-folders.folder:/org/gnome/desktop/app-folders/folders/Sundry/ apps "['alacarte.desktop', 'dconf-editor.desktop']"

This adds the applications alacarte.desktop and dconf-editor.desktop to the Sundry folder. This will also create the folder org.gnome.desktop.app-folders.folders.Sundry.

To name the folder (if it has no name that appears at the top of the applications):

$ gsettings set org.gnome.desktop.app-folders.folder:/org/gnome/desktop/app-folders/folders/Sundry/ name "Sundry"

Applications can also be sorted by their category (specified in their .desktop file):

$ gsettings set org.gnome.desktop.app-folders.folder:/org/gnome/desktop/app-folders/folders/Sundry/ categories "['Office']"

If certain applications matching a category are not wanted in a certain folder, exclusions can be set:

$ gsettings set org.gnome.desktop.app-folders.folder:/org/gnome/desktop/app-folders/folders/Sundry/ excluded-apps "['libreoffice-draw.desktop']"

For further information, refer to the app-folders schema.

提示与技巧

其他GNOME系统设置和提示。

键盘

登陆打开NumLock键

运行以下命令:

$ gsettings set org.gnome.settings-daemon.peripherals.keyboard numlock-state on

热键选择

很多的快捷键可以通过系统设置菜单中更改. 例如,重新启用“显示桌面快捷键:

System settings > Keyboard > Shortcuts > Navigation > Hide all normal windows

However, certain hotkeys cannot be changed directly via system settings. In order to change these keys, use dconf-editor. An example of particular note is the hotkey Alt- + ` (the key above Tab on US keyboard layouts). In GNOME Shell it is pre-configured to cycle through windows of an application, however it is also a hotkey often used in the Emacs editor. It can be changed by opening dconf-editor and modifying the switch-group key found in org.gnome.desktop.wm.keybindings.

It is possible to manually change the keys via an application's so-called accel map file. Where it is to be found is up to the application: For instance, Thunar's is at ~/.config/Thunar/accels.scm, whereas Files's is located at ~/.config/nautilus/accels and ~/.gnome2/accels/nautilus on old release.

The file should contain a list of possible hotkeys, each unchanged line commented out with a leading ";" that has to be removed for a change to become active. For example to replace the hotkey used by Files to move files to the trash folder, change the line:

; (gtk_accel_path "<Actions>/DirViewActions/Trash" "<Primary>Delete")

to this:

(gtk_accel_path "<Actions>/DirViewActions/Trash" "Delete")

The file is regenerated regularly so do not comment the file. The uncommented line will stay but every comment you add will be lost.

打开键盘开关命令

To have keyboard shortcut Alt + Shift switch keyboards:

Open Gnome-Tweak-Tool (or Keyboard Settings, in GNOME 3.16) and set Typing > Modifiers-only input sources > select Alt-shift. For more information see also the forum thread.

XkbOptions键盘选项

Using the dconf-editor, navigate to the key named org.gnome.desktop.input-sources.xkb-options and add desired XkbOptions (e.g. caps:swapescape) to the list.

See /usr/share/X11/xkb/rules/xorg for all XkbOptions and /usr/share/X11/xkb/symbols/* for the respective descriptions.

Note: To enable the Ctrl+Alt+Backspace combination to terminate Xorg, use the gnome-tweak-tool. Within the Tweak Tool, navigate to Typing > Key sequence to kill the X server and select the option Ctrl+Alt+Backspace from the dropdown menu.

De-bind Windows key

默认情况下,“Windows键”将打开GNOMEshelly预览模式。 You can unbind this key by running the command below

$ gsettings set org.gnome.mutter overlay-key 'Foo'

磁盘

GNOME提供磁盘实用程序来操作的存储驱动器设置。这是它的一些特点:

  • Enable write cache is a feature that most hard drives provide. Data is cached and allocated at chosen times to improve system performance. Not recommended unless the computer has a backup battery pack or is a laptop as data would be lost on power failure.
Settings > Drive Settings > Write Cache > On
  • Automatic Mount Options can mount drives and partitions that are GPT based - will use default, recommended options.
Warning: This setting erases related fstab entries
Partition Settings > Edit Mount Options > Automatic Mount Options > On

从菜单隐藏的应用程序

Tip: Desktop entries can be hidden by editing the .desktop files themselves. See Desktop entries#Hide desktop entries.

Use the Main Menu application (provided by the alacarte package) to hide any applications you do not wish to show in the menu.

截屏记录

GNOME features built-in screencast recording with the Ctrl + Shift + Alt + R key combination. A red circle is displayed in the bottom right corner of the screen when the recording is in progress. After the recording is finished, a file named Screencast from %d%u-%c.webm is saved in the Videos directory. In order to use the screencast feature the gst plugins need to be installed.

截图

默认保存目录:

$ gsettings set org.gnome.gnome-screenshot auto-save-directory file:///home/USER/Desktop

Check the gnome-screenshot manual page for more options.

注销延迟

去掉注销的确认和 60 秒的延迟: 这个对话框一般出现在你用状态菜单注销的时候。这个修改对于 关机 也生效。这个不是全局修改,只对使用该命令的用户生效。使用该命令立即生效。

$ gsettings set org.gnome.SessionManager logout-prompt false

禁用动画

To disable Shell animations (such as "Show Applications" and the wave animation in the top left activities hot corner), run:

$ gsettings set org.gnome.desktop.interface enable-animations false

Retina (HiDPI) display support

GNOME introduced HiDPI support in version 3.10. If your display does not provide the correct screen size through EDID, this can lead to incorrectly scaled UI elements. As a workaround you can open dconf-editor and find the key scaling-factor in org.gnome.desktop.interface. Set it to 1 to get the standard scale.

Also see HiDPI.

密码和密钥 (PGP Keys)

You can use the Passwords and Keys program (seahorse) to create a PGP key as it is a front end for GnuPG and installs it as dependency. This may be useful in the future (for instance if to encrypt a file). Create a key as shown below (the process may take about 10 minutes):

File > New > PGP Key > Name > Email > Defaults > Passphrase.

终端

更改默认的终端大小

新终端的默认大小可以在编辑 > 配置文件首选项 中调整

新终端采用当前目录

By default new terminals open in the $HOME directory. To have new terminals adopt the current working directory: source /etc/profile.d/vte.sh. Add the command to the shell configuration to retain the behaviour.

Pad the terminal

To pad the terminal (create a small, invisible border between the window edges and the terminal contents) create the file below:

~/.config/gtk-3.0/gtk.css
VteTerminal,
TerminalScreen {
    padding: 10px 10px 10px 10px;
    -VteTerminal-inner-border: 10px 10px 10px 10px;
}

禁用光标闪烁

Since GNOME 3.8 and the migration to GSettings and DConf the key required to modify in order to disable the blinking cursor in the Terminal differs slightly in contrast to the old GConf key. To disable the blinking cursor in GNOME 3.8 and above use:

$ gsettings set org.gnome.desktop.interface cursor-blink false

To disable the blinking cursor in Terminal only use (make sure profile uid is correct one):

$ dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/cursor-blink-mode "'off'"

Note that gnome-settings-daemon, from the package of the same name, must be running for this and other settings changes to take effect in GNOME applications - see GNOME#Configuration.

关闭终端时,禁用确认窗口

试图关闭该窗口,而一个以root身份登录时,终端将始终显示一个确认窗口。为了避免这种情况,执行以下命令:

$ gsettings set org.gnome.Terminal.Legacy.Settings confirm-close false

鼠标中键

By default, GNOME 3 disables middle mouse button emulation regardless of Xorg settings (Emulate3Buttons). To enable middle mouse button emulation use:

$ gsettings set org.gnome.settings-daemon.peripherals.mouse middle-button-enabled true

启用按钮和菜单图标

Since GTK+ 3.10, the GSettings key 'menus-have-icons' has been deprecated. Icons in buttons and menus can still be enabled by setting the following overrides:

$ gsettings set org.gnome.settings-daemon.plugins.xsettings overrides "{'Gtk/ButtonImages': <1>, 'Gtk/MenuImages': <1>}"

使用自定义的色彩和渐变色的桌面背景

使用自定义颜色和渐变为您的桌面背景,您首先需要设置一个透明的图片或其他不存在的图片作为您的桌面背景。例如,下面的命令将设置一个不存在的图片为背景。

$ gsettings set org.gnome.desktop.background picture-uri none

在这一点上,桌面背景应该是一个平坦的颜色-默认的颜色设置为深蓝色。

对于不同的平面彩色你只需要改变的主要颜色设置:

$ gsettings set org.gnome.desktop.background primary-color <my color>

where <my color> is a hex value (such as ffffff for white).

对于颜色渐变,你也需要改变次要颜色设置 org.gnome.desktop.background secondary-color 并选择一个阴影类型。举例来说,如果你想有一个horizontal gradient,执行以下命令:

$ gsettings set org.gnome.desktop.background color-shading-type horizontal

如果你是使用一个透明的图片作为你的背景,你可以通过执行以下设置的透明度:

$ gsettings set org.gnome.desktop.background picture-opacity <value>

数值在100和1之间(最大不透明度为100)。

渐变背景

GNOME 可以在特定的时间间隔之间的使用不同的壁纸。 这是通过创建一个XML文件,指定要使用的图片和时间间隔完成的。有关创建这些文件的详细信息,请参阅下面的 article.

可替代地,一些工具可用自动化过程:

  • mkwlppr — This script creates XML files that can act as dynamic wallpapers for GNOME by referring to multiple wallpapers.
http://pastebin.com/019G2rCy || see mkwlppr
  • Wallpapoz — Wallpapoz is a tool that provides dynamic wallpapers for GNOME and Xfce desktops.
https://vajrasky.wordpress.com/ || wallpapozAUR
  • CreBS — A Python/GTK application used to create and set desktop wallpaper slideshows for GNOME.
http://www.obfuscatepenguin.net/ || crebsAUR

对于设置XML文件作为默认的背景,参阅 #Lock screen and background.

自定义 GNOME 会话

It is possible to create custom GNOME sessions which use the GNOME session manager but start different sets of components (Openbox with tint2 instead of GNOME Shell for example).

Two files are required for a custom GNOME session: a session file in /usr/share/gnome-session/sessions/ which defines the components to be started and a desktop entry in /usr/share/xsessions which is read by the display manager. An example session file is provided below:

/usr/share/gnome-session/sessions/gnome-openbox.session
[GNOME Session]
Name=GNOME Openbox
RequiredComponents=openbox;tint2;gnome-settings-daemon;

And an example desktop file:

/usr/share/xsessions/gnome-openbox.desktop
[Desktop Entry]
Name=GNOME Openbox
Exec=gnome-session --session=gnome-openbox
Note: GNOME Session calls upon the .desktop files of each of the components to be started. If a component you wish to start does not provide a .desktop file, you must create a suitable desktop entry in a directory such as /usr/local/share/applications.

故障排除

终端冻结

In the event of a Shell freeze (which might be caused by certain appearance tweaks, malfunctioning extensions or perhaps a lack of available memory) restarting the Shell by pressing Alt + F2 and then entering r may not be possible.

In this case, try switching to another TTY (Ctrl + Alt + F2) and entering the following command: pkill -HUP gnome-shell. It may take a few seconds before the Shell successfully restarts. Restarting the shell in this fashion should not log the user out but it is a good idea to try and ensure that all work is saved anyway.

If this fails, the Xorg server will need to be restarted either by: pkill X for console logins or: systemctl restart gdm for GDM logins. Bear in mind that restarting the Xorg server will log the user out so try to ensure that all work is saved before attempting this.

Incorrect application defaults

When installing applications for the first time you may find that GNOME has the wrong application associated to a certain protocols - for instance, easytag becomes the folder handler instead of GNOME Files.

For GNOME Files see the following page: GNOME Files#Files is no longer the default file manager.

For Document Viewer, run the following command:

$ xdg-mime default evince.desktop application/pdf

For other applications, default handler settings are detailed on the following page: Default applications.

Optionally, you can install gnome-defaults-listAUR. It will place your configuration file at /etc/gnome/defaults.list.

Tracker & Documents do not list any local files

In order for Tracker (and, therefore, Documents) to detect your local files, they must be stored in an XDG compliant directory (such as 'Documents' or 'Music'). For more information, see Xdg user directories.

You can also configure Tracker to recursively search inside specific directories such as your home directory. These settings can be made using tracker-preferences.

Unable to add accounts in Empathy and GNOME Online Accounts

Empathy, the engine behind integrated messaging, GNOME Online Accounts, and all other system settings based on messaging accounts will not function correctly unless the telepathy group of packages or at least one of the backends (telepathy-gabble, or telepathy-haze, for example) is installed. View descriptions of telepathy components on the freedesktop.org telepathy wiki.

Note: Avahi daemon is required for connecting with the People Nearby account, and also in order for some desktop extensions to work correctly like Chat Status

Cannot change settings in dconf-editor

When one cannot set settings in dconf, it is possible their dconf user settings are corrupt. In this case it is best to delete the user dconf files in ~/.config/dconf/user* and set the settings in dconf-editor after.

When an extension breaks the shell

When enabling shell extensions causes GNOME breakage, you should first remove the user-theme and auto-move-windows extensions from their installation directory.

The installation directory could be one of ~/.local/share/gnome‑shell/extensions, /usr/share/gnome‑shell/extensions or /usr/local/share/gnome‑shell/extensions. Removing these two extension-containing folders may fix the breakage. Otherwise, isolate the problem extension with trial‑and‑error.

Removing or adding an extension-containing folder to the aforementioned directories removes or adds the corresponding extension to your system. Details on GNOME Shell extensions are available at the GNOME web site.

If you have trouble with uninstalling an extension via extensions.gnome.org/local, then probably they have been installed as system-wide extensions with the gnome-shell-extensions package. Removing the package again obviously affects all user accounts.

扩展在 GNOME 3 升级后不工作了

Note: Please bear in mind that whilst the methods below will allow you to try and activate an extension with an unsupported version of GNOME Shell, it is by no means a guarantee that the extension will work successfully. The most likely outcome of trying to activate such an extension is that GNOME Shell will crash and then restart.

Before trying the workarounds below, check if an update is available for the extension by visiting extensions.gnome.org/local.

If there is no update for your current GNOME version yet, use the following command to disable version validation for extensions:

$ gsettings set org.gnome.shell disable-extension-version-validation true

Alternatively, you could modify the extension itself, changing the supported shell version to satisfy the version validation. See the method below.


找到扩展的安装目录,可能是 ~/.local/share/gnome-shell/extensions/usr/share/gnome-shell/extensions.

编辑扩展子文件夹中的每一个 metadata.json

Insert: "shell-version": ["3.x"]
Instead of (for example): "shell-version": ["3.4"]

"3.x" 是最好的选择,这个表示扩展能在所有 3.x GNOME Shell版本下工作。

只有 conky 运行时键盘快捷方式不工作

gnome-shell 键盘快捷方式(如 Alt+F2,Alt+F1 和多媒体键快捷方式)当只有 conky 运行时不会工作。然而如果另一个程序(例如 gedit)在运行,键盘快捷方式就可以工作了。

解决方式:编辑 .conkyrc

own_window yes
own_window_transparent yes
own_window_argb_visual yes
own_window_type dock
own_window_class Conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

Unable to apply stored configuration for monitors

If you encounter this message try to disable the xrandr gnome-settings-daemon plugin:

$ dconf write /org/gnome/settings-daemon/plugins/xrandr/active false

一致的光标主题

See Cursor themes#Desktop environments.

Windows cannot be modified with Alt-Key + mouse-button

In GNOME 3.6 and above, the mouse button modifier (the key that allows you to drag a window from a location other than the titlebar) is the Super key instead of the Alt key which was used in the past. The change was made in response to the following bug report.

To change the mouse button modifier back to the Alt key, execute the following:

$ gsettings set org.gnome.desktop.wm.preferences mouse-button-modifier '<Alt>'  
Note: It is not possible to change this with System settings > Keyboard > Shortcuts

加载速度慢的系统图标/慢GDM登录

Tango-inaccurate.pngThe factual accuracy of this article or section is disputed.Tango-inaccurate.png

Reason: As per [4], it's probably the fact that on gdk-pixbuf2 post install gdk-pixbuf-query-loaders --update-cache is run which fixes the issue, not the re-installation of the package per se. (Discuss in Talk:GNOME (简体中文)#)

Problems with the loading of system icons, such the ones in the title bar of Files, might be solved by installing (or re-installing) the gdk-pixbuf2 package.

Re-installing the aforementioned package may also fix repeated occurrences of the "Oh no! Something has gone wrong!" error screen and/or very slow loading and login with GDM as described in the following forum thread.

Artifacts when maximizing windows

Maximizing windows may cause artifacts as of GNOME 3.12.0 - see the following forum thread and bug report. A solution is detailed in the following section: #Tear-free video with Intel HD Graphics.

Tear-free video with Intel HD Graphics

Intel TearFree

Enabling the Xorg Intel TearFree option is a known workaround for tearing problems on Intel adapters. However, the way this option acts makes it redundant with the use of a compositor (it increases memory consumption and lowers performance, see the original bug report's final comment).

DRI3

According to this bug report, DRI3 includes the buffer_age extension that allows GNOME Shell's Mutter compositor to sync windows to vblank in an efficient way. DRI3 support is not compiled in to the mesa package, so you have to recompile mesa with --enable-dri3 in the ./configure flags (see ABS). Then enable it in the Xorg driver:

/etc/X11/xorg.conf.d/20-intel.conf
Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "DRI"    "3"
EndSection
Mutter tweaks
Note: This workaround has been reported to have side effects and may not fix tearing in all cases.

GNOME Shell's Mutter compositor has a tweak known to address tearing problems (see the original suggestion for this fix and its mention in the Freedesktop bug report). To enable this tweak, append the following line to /etc/environment: CLUTTER_PAINT=disable-clipped-redraws:disable-culling. Then restart the Xorg server.

Window opens behind other windows when using multiple monitors

This is possibly a bug in GNOME Shell which causes new windows to open behind others. To fix this issue, one can run the following command:

$ gsettings set org.gnome.shell.overrides workspaces-only-on-primary false

锁定按钮无法重新启用触摸板

Some laptops have a touchpad lock button that disables the touchpad so that users can type without worrying about touching the touchpad. Currently, it appears that although GNOME can lock the touchpad by pressing this button, it cannot unlock it. If the touchpad gets locked you can run the following to unlock it:

$ xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 1

GNOME Shell键盘源菜单不可见

A menu showing the keyboard input sources (for example 'en' for an English keyboard layout) should be visible next to the status area containing icons for network, volume and power sources. If the keyboard sources menu is not visible, this is probably because you have configured your Xorg keyboard layout in a way which GNOME does not recognise.

To ensure that the menu is visible, remove any Xorg keyboard configuration you might have created and set the keyboard locale using localectl.

Upon running the command and then logging out, you should find that the keyboard input sources menu is visible in GDM and in the GNOME Shell desktop. See Input sources in GNOME for more information.

鼠标指针丢失

When using a separate window manager with gnome-settings-daemon, the mouse cursor may vanish. Run:

$ gsettings set org.gnome.settings-daemon.plugins.cursor active false

在会话菜单中没有重启按钮时,屏幕被锁定

If XScreenSaver is installed, ensure that it is not running at startup, see GNOME#Startup applications.

pulseaudio系统原因延误GNOME和GDM

If you are running PulseAudio in system-wide mode, the PulseAudio 7.0 upgrade breaks GDM and GNOME. See this forum post for more information.

GNOME crashes when trying to reorder applications in the GNOME Shell Dash

The dash is the "toolbar" that appears, by default, on the left when you click Activities. Applications can be reordered in the dash by dragging and dropping. If this fails, and/or causes GNOME to crash, try changing your icon theme.

参见