GNOME (简体中文)
相关文章
GNOME (读音是gah-nohm 或 nohm)是一个简单易用的桌面环境. 它由GNOME 项目组设计,完全自由和开源. GNOME是GNU 项目的一部分.
Contents
安装
以下两个软件组均包含 GNOME 的组件:
- gnome-extra 包组包含剩余的可选工具,例如文本编辑器、压缩文件管理器、光盘烧录工具、邮件客户端、游戏、开发工具及其它非必需的软件。 gnome 软件组是这个组的基础。
基础桌面环境包含了 GNOME Shell, 它是 Mutter 窗口管理器的插件,可以通过软件包 gnome-shell 单独安装。
附加的软件包
上面提到的包组不包括这些包:
- GNOME Initial Setup — 准备新系统的简单、易用和安全的工具。
- GNOME PackageKit — GNOME 使用 PackageKit 的工具集。
- Nemiver — C/C++ 调试器.
- Software — 安装和更新软件和系统扩展.
GNOME会话
GNOME 有三个可用的会话,都使用 GNOME Shell
- GNOME 是默认会话, 有创新的布局,默认在 Wayland 协议上运行。
- GNOME Classic 的桌面布局类似于传统的GNOME 2, 使用预先激活的插件和参数。[1] 所以它只是一个定制的 GNOME Shell,并不是完全独立的模式。
- GNOME on Xorg 曾经的默认选项,在 Xorg 上运行。
运行 GNOME
GNOME可以通过 显示管理器以图形方式启动,或者从控制台手动启动。 为优化桌面整合, 建议使用GNOME显示管理器 。 注意 启用 一个显示管理器(例如GDM)意味着Xorg将会以root权限运行.
图形界面登录
可以在登录管理器中选择 GNOME, GNOME Classic 或 GNOME on Xorg 作为登录选项。
手动启动
- 对于标准的GNOME会话, 在
~/.xinitrc
中添加:exec gnome-session
. - 对于经典的gnome会话,在
~/.xinitrc
中添加:export XDG_CURRENT_DESKTOP=GNOME-Classic:GNOME export GNOME_SHELL_SESSION_MODE=classic exec gnome-session --session=gnome-classic
现在的/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. xinitrc 包含了保留登陆会话的方式等其他信息。设置完 ~/.xinitrc
文件后,可以选择登录时启动X.
Wayland 中的 GNOME 应用程序
根据当前的默认情况,GNOME 应用程序会利用 XWayland,以传统 X 应用程序的方式运行。若需在 Wayland 下测试 GNOME 应用,请以命令行方式运行程序,并加上以下前缀: env GDK_BACKEND=wayland <command>
。
请查看以下页面以了解开发进展: GNOME Applications under Wayland.
导览
您可以阅读这篇文章: GNOME Shell cheat sheet 以了解如何高效地使用 GNOME shell,它展示了 GNOME shell 的特色与使用快捷键。文章内容包括怎么切换任务,使用键盘,窗口控制,使用面板,预览模式等。 部分常用的快捷键:
-
Super
: 进入预览模式 -
Super
+m
: 显示消息托盘 -
Super
+a
:显示应用程序菜单 -
Alt
+F2
:输入命令以快速启动应用 -
Alt
+F2
,然后输入r
或restart
,再Enter
:重启 GNOME shell。这一条在你遇到 shell 图形界面错误时十分有用。
重启 GNOME shell
当修改过界面之后你可能需要重启 GNOME shell。你可以重新登陆,不过有一个简单快捷的方法。 按 Alt
+ F2
再输入 r
再 Enter
GNOME Shell 崩溃
一些特定的微调或者经常性重启 Shell 会导致 shell 在将要重启的时候崩溃。这个时候你必须做好心理准备,然后强制注销。有一些修改,例如在GNOME Shell 和 fallback mode, 之间切换,不能简单地使用 r 重启;必须重登陆来应用这个效果。
丑话说在前面,在重启 shell 前请先把有用的文档保存(或者关闭)。虽然这不是必要的,因为窗口和文档在重启了 shell 之后应该还在。
遗留名称
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[broken link: invalid section]. 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
其他主题的站点:
- DeviantArt.
- gnome-look.org.
- GTK3 themes in the AUR.
- Cursor themes in the AUR.
- Icon themes in the AUR.
一旦安装,就可以使用 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
标题栏的高度
~/.config/gtk-3.0/gtk.css
headerbar.default-decoration { padding-top: 0px; padding-bottom: 0px; min-height: 0px; font-size: 0.6em; } headerbar.default-decoration button.titlebutton { padding: 0px; min-height: 0px; }
更多信息请阅读 [3].
标题栏按钮重新排序
设置 GNOME 窗口管理器顺序 (Mutter, Metacity):
$ gsettings set org.gnome.desktop.wm.preferences button-layout ':minimize,maximize,close'
最大化时隐藏标题栏
- Install gnome-shell-extension-pixel-saver-gitAUR or gnome-shell-extension-pixel-saverAUR. Maximized windows get the title bar merged into the activity bar, saving precious pixels.
- 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.
The default GNOME schema doesn't display any icon on menus. To display icons on menus, issue the following command.
$ gsettings set org.gnome.settings-daemon.plugins.xsettings overrides "{'Gtk/ButtonImages': <1>, 'Gtk/MenuImages': <1>}"
桌面
各种桌面设置可以应用。
桌面上的图标
锁屏和背景
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'
扩展
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-shell-extension-lockkeys-gitAUR 一个指示 NumLock/CapsLock 激活情况的扩展。
- gnome-shell-extension-weather-gitAUR 一个可以显示天气通知的扩展。
- gnome-shell-extension-nohotcorner-gitAUR 一个禁用“Hot Corner”功能的拓展。
- gnome-shell-extension-insensitive-message-tray-gitAUR[broken link: archived in aur-mirror] 使鼠标在屏幕底部激活信息托盘的行为变迟钝的拓展。
- Alternative Status Menu 让你的用户菜单里显示休眠和关机的扩展。
另外,想要在屏幕底部显示一个任务栏,但又不想使用 GNOME Classic 的用户可以考虑使用 Window list 扩展 (由 gnome-shell-extensions 提供).
在安装完一个扩展之后可能需要重启 GNOME shell 。故障排除信息参照安装扩展导致GNOME停止工作[broken link: invalid section]。
输入法
GNOME集成了的通过IBus的输入法, 只有ibus和添加想要的输入法引擎 (例如:ibus-libpinyin for Intelligent Pinyin) 需要安装,安装后,输入法引擎可以加入GNOME的区域和语言设置键盘布局。
字体
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/
.
gnome-tweak-tool 支持管理 autostart-entries。
电源
你可能希望修改基本的电源管理设置(以下的设置以笔记本电脑用户为例,请按需调整):
$ 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
如需在合上盖子后依然保持显示器开启:
$ gsettings set org.gnome.settings-daemon.plugins.xrandr default-monitors-setup do-nothing
配置合上盖子时的行为
GNOME TWEAK Tool 自 3.17.1 开始,可以阻止 systemd 在“合上盖子”这一 ACPI 事件发生后采取默认行动。[4] 若想要阻止 systemd 的默认行为,打开 Tweak Tool,在“电源”标签页下选择“合上盖子后不待机”的选项。此选项意味着在盖子合上后,系统将不会默认待机,而是不采取任何措施。如果选择了此选项,一个自启动项目~/.config/autostart/ignore-lid-switch-tweak.desktop
将会被创建,用于阻止systemd的默认行为。
如果你在合上盖子后既不希望系统待机,也不希望系统不动于衷,你首先要确保你并没有打开上述的选项,然后再配置systemd的HandleLidSwitch=默认行为
选项,详见Power management#ACPI events中的说明。
修改电池电量严重不足时的行为
The settings panel does not provide an option for changing the critical battery level action. These settings have been removed from dconf as well. They are now managed by upower. Edit the upower settings in /etc/UPower/UPower.conf
. Find these settings and adjust to your needs.
/etc/UPower/UPower.conf
PercentageLow=10 PercentageCritical=3 PercentageAction=2 CriticalPowerAction=HybridSleep
Sort applications into application (app) folders
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-shell扩展
- 主题、图标和壁纸:
- GTK/GNOME 程序:
- 自定义 GNOME Shell
- GNOME 代码和镜像: