1
<?xml version="1.0" encoding="utf-8"?>
2
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
3
<!ENTITY legal SYSTEM "legal.xml">
4
<!ENTITY version "2.26.0">
5
<!ENTITY date "02/10/2009">
6
<!ENTITY mdash "—">
7
<!ENTITY percnt "%">
9
<article id="index" lang="zh_CN">
11
<title>GNOME 显示管理器参考手册</title>
15
<revnumber>0.0</revnumber>
20
<abstract role="description">
21
<para>GDM 是 GNOME 登录管理器,一个图形界面的登录程序。</para>
26
<firstname>Martin</firstname><othername>K.</othername>
27
<surname>Petersen</surname>
29
<address><email>mkp@mkp.net</email></address>
33
<firstname>George</firstname><surname>Lebl</surname>
35
<address><email>jirka@5z.com</email></address>
39
<firstname>Jon</firstname><surname>McCann</surname>
41
<address><email>mccann@jhu.edu</email></address>
45
<firstname>Ray</firstname><surname>Strode</surname>
47
<address><email>rstrode@redhat.com</email></address>
50
<author role="maintainer">
51
<firstname>Brian</firstname><surname>Cameron</surname>
53
<address><email>Brian.Cameron@Sun.COM</email></address>
60
<holder>Martin K. Petersen</holder>
66
<holder>George Lebl</holder>
72
<holder>Red Hat, Inc.</holder>
81
<holder>Sun Microsystems, Inc.</holder>
84
<legalnotice id="legalnotice">
85
<para>对于本文档的复制、分发和/或修改必须遵循自由软件基金会 (Free Software Foundation) 发布的 GNU 自由文档许可证 (GFDL) 版本 1.1 或更高版本,该许可证没有固定的部分、没有封面和背页文本。您可以在 <ulink type="help" url="ghelp:fdl">link</ulink> 或在随本手册一起分发的 COPYING-DOCS 文件中找到 GFDL 的副本。</para>
86
<para>本手册是以 GFDL 协议下发布的 GNOME 手册集的一部分。如果您希望单独发布本手册,您可以通过添加一个这个许可证的一份副本到这个手册来做到,就像在第六节中所描述的这个许可证。</para>
88
<para>各个公司使用的许多用于区别它们产品和服务的名称都声明为商标。在所有的 GNOME 文档以及 GNOME 文档项目的成员中,这些名称都是以全大写字母或首字母大写显示,从而表明它们是商标。</para>
90
<para>本文档以及文档的修改版本都是在遵循 GNU 自由文档许可证的条款下提供,这表示具有以下含义:<orderedlist>
92
<para>文档按“原样”提供,不提供任何明示或暗示的保证,包括但不限于:文档或文档的修改版本没有适销性方面的缺陷、适合特定目的的适用性,以及没有侵权行为。您将自行承担本文档以及文档修改版本的质量、准确性以及性能方面的风险。如果任何文档或文档修改版本存在缺陷,您(而不是最初的编写者、作者或撰写人)将承担所有必需的服务、维修或更正的费用。此免责声明是本许可证的重要组成部分。如果不接受此免责声明,那么您就没有权利使用任何文档或文档的修改版本;并且</para>
95
<para>无论在任何情况以及在任何法律理论下,本文档或文档修改版本的作者、最初的编写者、任何撰写人或任何分发者,或者任意这些方的任何提供者都不对任何人由于使用本文档或文档修改版本引起或带来的任何直接的、间接的、特殊的、偶然的或继发的损失承担任何民事(包括疏忽)、合同或其它方面的责任,这些损失包括但不限于信誉损失、工作停止、计算机失败或故障,或任何以及所有其它损失或由此引发的或与之相关的损失,即使这些方已被告知存在出现此类损失的可能性时也是如此。</para>
103
This manual describes version 2.26.0 of the GNOME Display Manager.
104
It was last updated on 02/10/2009.
108
<!-- ============= Preface ================================== -->
111
<title>Terms and Conventions Used in This Manual</title>
114
This manual describes version 2.26.0 of the GNOME Display Manager.
115
It was last updated on 02/10/2009.
119
Chooser - A program used to select a remote host for managing a
120
display remotely on the attached display (<command>gdm-host-chooser</command>).
124
FreeDesktop - The organization providing desktop standards, such as the
125
Desktop Entry Specification used by GDM.
126
<ulink type="http" url="http://www.freedesktop.org/">
127
http://www.freedesktop.org</ulink>.
129
<para>GDM - GNOME 显示管理器,用来描述这个软件包的整体。</para>
131
<para>Greeter - 图形登录窗口 (<command>gdm-simple-greeter</command>)。</para>
133
<para>PAM - 可插入的认证机制</para>
135
<para>XDMCP - X 显示管理协议</para>
138
Xserver - An implementation of the X Window System. For example the
139
Xorg webserver provided by the X.org Foundation
140
<ulink type="http" url="http://www.x.org/">http://www.x.org</ulink>.
143
<para>以尖括号中的一个单词开始的路径是相对与安装前缀的。例如,<filename><share>/pixmaps/</filename>是指<filename>/usr/share/pixmaps</filename>,如果 GDM 是使用如下命令配置的<command>--prefix=/usr</command>。</para>
146
<!-- ============= Overview ================================= -->
148
<sect1 id="overview">
151
<sect2 id="introduction">
154
<para>GNOME 显示管理器 (GDM) 是一个实现了管理本地和远程显示所要求的所有重要功能的显示管理器。GDM 是从头开始写的,并且不包含任何 XDM 或 X Consortium 的代码。</para>
156
<para>注意 GDM 是可以设置的,并且很多配置对安全有影响。应该知道的问题,在这个文档中高亮显示。</para>
158
<para>请注意,一些操作系统设置 GDM 为不同于本文档中描述的行为。如果 GDM 并不是像文档中这样子,请查看相关的设置是否不同于此处描述的。</para>
160
<para>获取更多关于 GDM 的信息,参考项目网站 <ulink type="http" url="http://www.gnome.org/projects/gdm/"> http://www.gnome.org/projects/gdm</ulink> and the project Wiki <ulink type="http" url="http://live.gnome.org/GDM"> http://live.gnome.org/GDM</ulink>。</para>
162
<para>讨论和查询 GDM,请参考邮件列表 <address><email>gdm-list@gnome.org</email></address>。这个列表已经打包,并且是一个寻找普通问题答案的好资源。这个邮件列表打包在 <ulink type="http" url="http://mail.gnome.org/archives/gdm-list/"> http://mail.gnome.org/archives/gdm-list/</ulink>,并且有一个搜索功能以使用关键字寻找消息。</para>
164
<para>请在<ulink type="http" url="http://bugzilla.gnome.org/"> http://bugzilla.gnome.org</ulink>的“gdm”分类提交任何错误报告或功能增强要求。</para>
167
<sect2 id="stability">
168
<title> 界面稳定性</title>
170
<para>GDM 2.20 和更早的版本支持稳定配置界面。但是基础代码在 GDM 2.22 重写了,其并不是完全的向后兼容旧版的。部分原因是,工作方式不同了,所以一些选项没有意义了;一部分原因是一些选项从来没有使用过;另外的一部分原因是一些功能还没有重新实现。</para>
172
<para>在稳定样式中将继续支持的界面包括:Init,PreSession, PostSession, PostLogin 和 Xsession 脚本。<filename><etc>/gdm/custom.conf</filename> 文件中的一些守护进程选项继续被支持。同样,<filename>~/.dmrc</filename> 和 头像登录图像位置仍然被支持。</para>
174
<para>GDM 2.20 和更早的版本支持多个显卡上的多个显示器管理功能,就像使用终端服务界面,通过像是 Xnest 或 Xephyr 的程序登录一个窗口,gdmsetup 程序,基于 XML 的欢迎界面主题,以及从登录窗口运行 XDMCP chooser 的能力。2.22版重写之后,这些特性没有添加回来</para>
178
<sect2 id="functionaldesc">
183
TODO - Would be good to discuss D-Bus, perhaps the new GObject model,
184
and to explain the reasons why the rewrite made GDM better.
185
From a high-level overview perspective, rather than the
190
<para>GDM 负责管理系统上的显示,包括认证用户,开始用户会话,结束用户会话。GDM是可以配置的,其配置方法在本文档的 “配置 GDM”一节说明。GDM 也适合残障人士。</para>
192
<para>GDM 提供了管理主控制台显示的能力,且是通过虚拟终端显示。它是和其他程序集成的,例如快速用户切换小程序 (FUSA) 和 gnome-screensaver,以通过 Xserver 虚拟终端 (VT) 接口管理控制台上的多显示器。它也可以管理 XDMCP 显示。</para>
194
<para>无论怎样的显示类型,当其管理显示时,GDM 将做如下的工作:将启动 Xserver 进程,然后以 root 用户运行 <filename>Init</filename>,并且在显示器上启动欢迎程序。</para>
197
The greeter program is run as the unprivileged "gdm"
198
user/group. This user and group are described in the
199
"Security" section of this document. The main function of
200
the greeter program is to authenticate the user. The authentication
201
process is driven by Pluggable Authentication Modules (PAM). The PAM
202
modules determine what prompts (if any) are shown to the user to
203
authenticate. On the average system, the greeter program will request
204
a username and password for authentication. However some systems may
205
be configured to use alternative mechanisms such as a fingerprint or
206
SmartCard reader. GDM and PAM can be configured to not require any
207
input, which will cause GDM to automatically log in and simply
208
start a session, which can be useful for some environments, such as
212
<para>除了认证,欢迎程序允许用户选择启动哪个会话,使用哪个语言。会话由以 .desktop 结尾的文件定义,更多关于这个文件的信息可以在本文档的“GDM 用户会话和语言配置”节找到。默认上,GDM 被配置为显示一个头像登陆器,以使用户可以通过在一张图片上点击选择他们的账户,替代输入用户名。GDM 在用户的 <filename>~/.dmrc</filename>保持跟踪用户的默认会话和语言,在用户的确没有在登录界面选择会话和语言使用这些默认的。</para>
215
After authenticating a user, the daemon runs the
216
<filename>PostLogin</filename> script as root, then runs the
217
<filename>PreSession</filename> script as root. After running these
218
scripts, the user session is started. When the user exits their
219
session, the <filename>PostSession</filename> script is run as root.
220
These scripts are provided as hooks for distributions and end-users
221
to customize how sessions are managed. For example, using these
222
hooks you could set up a machine which creates the user's $HOME
223
directory on the fly, and erases it on logout. The difference
224
between the <filename>PostLogin</filename> and
225
<filename>PreSession</filename> scripts is that
226
<filename>PostLogin</filename> is run before the pam_open_session call
227
so is the right place to do anything which should be run before the
228
user session is initialized. The <filename>PreSession</filename>
229
script is called after session initialization.
233
<sect2 id="greeterpanel">
236
The GDM greeter program displays a panel docked at the bottom of the
237
screen which provides additional functionality. When a user is
238
selected, the panel allows the user to select which session, language,
239
and keyboard layout to use after logging in. The keyboard layout
240
selector also changes the keyboard layout used when typing your
241
password. The panel also contains an area for login services to leave
242
status icons. Some example status icons include a battery icon for
243
current battery usage, and an icon for enabling accessibility features.
244
The greeter program also provides buttons which allow the user to
245
shutdown or restart the system. It is possible to configure GDM to not
246
provide the shutdown and restart buttons, if desired. GDM can also be
247
configured via PolicyKit (or via RBAC on Solaris) to require the user
248
have appropriate authorization before accepting the shutdown or restart
252
<para>注意,键盘布局功能只有在支持 libxklavier 的系统上可以使用。</para>
255
<sect2 id="accessibility">
258
<para>GDM 支持“无障碍登录”,允许用户登录他们的桌面,即使他们不能以普通的方式方便地使用屏幕、鼠标或键盘。无障碍技术(AT)功能,比如屏幕键盘、屏幕阅读器、屏幕放大器和 Xserver AccessX 键盘辅助都是可用的。如果需要,也可以放大文本或高对比图标和控制。参考本文档的“无障碍配置”节获取更多关于多少中无障碍功能可以配置。</para>
260
<para>在一些操作系统上,确定 GDM 用户是“audio”组的成员是必须的,以使要求声音输出 AT 程序(例如文本语音转换)可以工作。</para>
263
<sect2 id="facebrowser">
264
<title>GDM 头像登录器</title>
266
<para>头像登陆器是一个允许用户通过在一个图片上点击选择他们的用户名。这项功能可以通过 /apps/gdm/simple-greeter/disable_user_list GConf 键来启用或禁用,其默认是启用的。禁用时,用户必须手动输入他们的完全的用户名。当启用时,它显示本地系统上所有的用来登录的用户名(在 /etc/passwd 文件中定义的有合法的 shell ,并且足够高的 UID 的所有用户),以及最近登录过的远程用户。GDM 2.20 版和更早版中的头像登录器可能试图显示所有的远程用户,这在大的企业部署中造成了性能问题。</para>
268
<para>头像登录器配置为在列表顶端显示最经常登录的用户。这可以确保经常登录的用户可以快速的找到他们的登录图片。</para>
270
<para>头像登录器支持前缀字母过滤(type-ahead search),其依据用户的输入来匹配列表中的用户名,动态移动选中的头像。这意味着,一个有很长用户名的用户在从列表中选择之前将只需要输入用户名开始的几个字符。</para>
272
<para>GDM 所使用的额图标可以使用 sysadmin 全局安装,也可以定位于用户主目录。如果全局安装,他们应该位于 <filename><share>/pixmaps/faces/</filename> 目录,并且文件名应该就是用户的名字。头像图片应该是 GTK+ 可以读的标准图片,例如 PNG 或 JPEG。位于全局头像目录的头像图标应该使 GDM 用户可读。</para>
276
TODO - In the old GDM the ~/gnome2/gdm file is used, but the new code
277
seems to use ~/.gnome/gdm. Error?
280
<para>如果这个用户没有全局图标,GDM 将在用户的 $HOME 目录查找图像文件。GDM 将首先在 <filename>~/.face</filename> 寻找用户的头像图片。如果没有找到,将尝试 <filename>~/.face.icon</filename>。如果仍然没有发现,它将使用在 <filename>~/.gnome2/gdm</filename> 文件中定义的“face/picture=”的值。</para>
282
<para>如果一个用户没有定义的头像图片,GDM 将使用当前 GTK+ 主题的“stock_person”图标。如果没有定义这个图片,将回退使用一个通用的头像图片。</para>
284
<para>请注意,加载和缩放位于远程用户主目录的头像可能会是非常消耗时间的任务。因为不通过 NIS 或 NFS 实际加载图片,GDM 不尝试从远程主目录加载头像图片。</para>
286
<para>当这个浏览器打开时,这个计算机上的合法用户将暴露给任何人。如果启用了 XDMCP,用户名将暴露给远程用户。 这当然会有点限制安全,因为恶意用户不许要猜测合法用户名。在一些非常严格的环境下,头像登录可能是不适当的。</para>
295
TODO - What XDMCP features actually work? I know that the
300
<para>GDM 守护进程可以被配置为监听和管理从远程显示器上的 X 显示管理协议(XDMCP)请求。XDMCP 是默认关闭的,但是如果需要可以开启。如果 GDM 构建为支持 TCP Wrapper,则守护进程将只准许在 TCP Wrappers 配置文件指定了 GDM 服务节的主机的访问。</para>
302
<para>GDM 包括了一些使它可以在对 XDMCP 服务的拒绝服务攻击更有抵抗力的方法。许多协议参数,握手计时等,可以进行微调。默认设置可以在多数系统上合理的工作。</para>
304
<para>GDM 默认使用普通 UDP 的用于 XDMCP 的 177 端口监听 XDMCP 请求,将通过向发端发送一个 WILLING 包响应 QUERY 或 BROADCAST_QUERY 请求。</para>
307
GDM can also be configured to honor INDIRECT queries and present a
308
host chooser to the remote display. GDM will remember the user's
309
choice and forward subsequent requests to the chosen manager. GDM
310
also supports an extension to the protocol which will make it forget
311
the redirection once the user's connection succeeds. This extension
312
is only supported if both daemons are GDM. It is transparent and
313
will be ignored by XDM or other daemons that implement XDMCP.
316
<para>如果 XDMCP 好像不工作,确定所有的机器都在 <filename>/etc/hosts</filename> 指定了。</para>
318
<para>参考“安全”部分来获取关于使用 XDMCP 时的安全关切的信息。</para>
325
GDM uses syslog to log errors and status. It can also log debugging
326
information, which can be useful for tracking down problems if GDM is
327
not working properly. Debug output can be enabled by setting the
328
debug/Enable key to "true" in the
329
<filename><etc>/gdm/custom.conf</filename> file.
332
<para>各个 Xservers 的输出存储于 GDM 日志目录中,一般是 <filename><var>/log/gdm/</filename>。任何 Xserver 信息保存于一个相关于显示器值的文件中,<filename><display>.log</filename>。</para>
334
<para>会话的输出通过 GDM 守护进程传送到 <filename>~/.xsession-errors</filename>文件。这个文件每次登录时都会覆盖掉,所以通过 GDM 注销并重新登录同一个用户,将会造成丢失前一个会话的所有信息。</para>
336
<para>注意,如果因为一些原因 GDM 不能创建这个文件,然后一个名为 <filename>~/.xsession-errors.XXXXXXXX</filename> 的备用文件将被创建,这个<filename>XXXXXXXX</filename>是一些随机字符。</para>
340
<title>快速用户切换</title>
342
<para>GDM 允许多个用户同时登录。一个用户登录以后,另一个用户可以使用 GNOME 面板上的 用户切换器登录,或者从 GNOME 屏幕保护的锁住屏幕上的“切换用户”按钮。进行中的会话可以使用同样的机制更改回来并且继续。注意,有些发行版可能没有默认在面板上添加用户切换器。您可以使用面板邮件快捷菜单添加它。</para>
343
<para>注意,这个功能可以在支持虚拟终端的系统上使用。如果虚拟终端不可用,这个功能将不工作。</para>
347
<!-- ============= Security ================================= -->
349
<sect1 id="security">
353
<title>GDM 用户和组</title>
355
<para>为了安全,建议用一个专用的用户和组 ID 来进行适当的操作。在大多数系统上,这个用户和组一般是“gdm”,但是可以被配置为任何一个用户或组。所有的 GDM 图形程序都以这个用户的身份运行,以使与用户交互的程序都运行在沙盒中。这个用户和组应该具有有限制的特权。</para>
357
<para>“gdm”用户唯一需要的特权是读写 <filename><var>/run/gdm</filename> 中的 Xauth 文件的能力。<filename><var>/run/gdm</filename> 目录应该有 root:gdm 属主,以及 1777 的权限设置。</para>
360
You should not, under any circumstances, configure the GDM user/group
361
to a user which a user could easily gain access to, such as the user
362
<filename>nobody</filename>. Any user who gains access to an Xauth
363
key can snoop on and control running GUI programs running in the
364
associated session or perform a denial-of-service attack on it. It
365
is important to ensure that the system is configured properly so that
366
only the "gdm" user has access to these files and that it
367
is not easy to login to this account. For example, the account should
368
be setup to not have a password or allow non-root users to login to the
372
<para>GDM 欢迎界面配置存储于 GConf 中。要允许 GDM 用户更改配置,就需要“gdm”用户有一个可写的 $HOME 目录。用户可以配置默认的 GConf 到希望的样子,以避免需要提供给“gdm”用户一个可写的 $HOME 目录。但是,如果不能写入状态信息到 GConf 配置,一些功能可能被禁用。</para>
378
<para>GDM 使用 PAM 作为登录认证。PAM 代表可插入的认证模块,被您计算机上大多数需要认证的程序使用。它允许管理员为不同的登录程序 (例如 ssh,登录界面,屏幕保护等) 配置特定的认证行为。</para>
380
<para>PAM 是复杂和高度可配置的,本文档不打算在细节上解释这些。而是,它打算给出 PAM 配置与 GDM 有怎样的关系的一个概览,GDM 是怎样配置 PAM 的,以及已知的问题。需要操作 PAM 配置的人需要进一步阅读 PAM 文档,以理解怎样配置 PAM 和理解在这节中使用的条目。</para>
382
<para>PAM 配置在不同的操作系统上有不同但相似的界面,所以查看 <ulink type="help" url="man:pam.d">pam.d</ulink> or <ulink type="help" url="man:pam.conf">pam.conf</ulink> 手册页以获取更多细节。请确定您阅读 PAM 文档并且了解您要对您的配置做的改变对安全的影响。</para>
384
<para>注意,默认上,GDM 使用“gdm”这个 PAM 服务名作默认登录用,以及使用“gdm-autologin”PAM服务名作自动登录用。这些服务可能没有在您的 pam.d 或 pam.conf 配置文件中定义。如果没有这些条目,GDM 将使用默认的 PAM 行为。在大多数系统上,这应该可以工作的很好。但是,如果 gdm-autologin 服务没有定义,自动登录功能将可能不能失效。</para>
386
<para><filename>PostLogin</filename> 脚本在 pam_open_session 被调用之前运行,<filename>PreSession</filename> 在其之后。这允许系统管理员向登录程序添加任何脚本,无论在 PAM 初始化会话之前还是之后。</para>
388
<para>如果您想使 GDM 使用其他的认证机制(如 指纹或智能卡),您应该使用希望使用的认证类型的 PAM 服务模块,而不是试图直接修改 GDM 的源代码。请阅读您系统上的 PAM 文档。怎样做到这一点经常在 <address><email>gdm-list@gnome.org</email></address> 邮件列表上讨论,所以,您可以参考这个列表的归档获取更多信息。</para>
390
<para>为了能够同时使用多种认证方式,例如既可使用智能卡也可使用用户名和口令登录系统,PAM 做了一些限制。使这可以工作有一些技巧,当设置这种配置时,最好研究下这个问题一般是怎么解决的。</para>
392
<para>如果自动登录在一个系统上不工作,检查在 PAM 配置文件中是否定义了“gdm-autologin”PAM 栈。为了使它工作,必须私用一个不做任何认证的 PAM 模块,或者简单的对它所有的公共界面返回 PAM_SUCCESS。假定您的系统上有个 pam_allow.so PAM模块可以做到这一点,启用“gdm-autologin”的 PAM 配置可能会类似这样:</para>
395
gdm-autologin auth required pam_unix_cred.so.1
396
gdm-autologin auth sufficient pam_allow.so.1
397
gdm-autologin account sufficient pam_allow.so.1
398
gdm-autologin session sufficient pam_allow.so.1
399
gdm-autologin password sufficient pam_allow.so.1
403
The above setup will cause no lastlog entry to be generated. If a
404
lastlog entry is desired, then use the following for the session:
408
gdm-autologin session required pam_unix_session.so.1
411
<para>如果计算机由多个人使用,这是自动登录就不合适了,您将可能希望允许一些用户不输入他们的口令就可以登录。这个功能可以作为单个用户选项,使用 gnome-system-tools 中的 users-admin 工具来启用;这由在要求口令之前检查用户是否 Unix 组“nopasswdlogin”的成员来实现。要使这可以工作,“gdm”服务的 PAM 配置文件必须包含类似于如下一行:</para>
414
gdm auth sufficient pam_succeed_if.so user ingroup nopasswdlogin
419
<sect2 id="utmpwtmp">
420
<title>utmp 和 wtmp</title>
422
<para>GDM 经会话登录和注销生成 utmp 和 wtmp 用户账户数据库条目。utmp 数据库包含用户访问和审计信息,这些可以通过例如 <command>finger</command>、 <command>last</command>、<command>login</command> 和 <command>who</command>这些命令访问。wtmp 数据库包含用户访问和伸进信息的 utmp 数据库历史。参考您系统上的 <ulink type="help" url="man:utmp">utmp</ulink> and <ulink type="help" url="man:wtmp">wtmp</ulink> 手册页以获取更多信息。</para>
426
<title>Xserver 认证方案</title>
428
<para>Xserver 认证文件存储于启动时 <filename><var>/run/gdm</filename> 的一个新建的子目录。这些文件用于存储和在 X 客户端和 X 服务器之间共享“password”。这个“password”对于每次登录是唯一的,所以从一个会话的用户并不能窥探另一个会话上的用户。</para>
430
<para>GDM 只支持 MIT-MAGIC-COOKIE-1 Xserver 认证方案。通常从其他方案获得的好处非常少,并且至今也没有实现它们做出的努力。尤其要小心地使用 XDMCP,因为 Xserver 认证 cookie 以明文通过线路。如果可以嗅探,攻击者就可以容易的在您登录时嗅探您的认证口令。</para>
434
<sect2 id="xdmcpsecurity">
435
<title>XDMCP 安全</title>
437
<para>即使您的显示受到 cookies 的保护,输入口令时的 XEvent 和因而的按键仍然是通过明文发送的。捕获它是很平常的。</para>
439
<para>XDMCP 主要用于运行瘦客户机,比如在终端实验室。那些瘦客户机只需要到访问服务器的网络连接,于是使这些瘦客户机在一个外部不能访问的分离网络中并且只能连接到服务器好像是最好的安全策略。仅有的需要从外部访问的点就是服务器。这种设置绝不应该使用一个未管理的集线器或其他可嗅探的网络。</para>
443
<sect2 id="xdmcpaccess">
444
<title>XDMCP 访问控制</title>
446
<para>XDMCP 访问控制是使用的 TCP wrappers。不带 TCP wrappers 地编译 GDM 也是可以的,所以这个功能可能不被一些操作系统支持。</para>
448
<para>您应该在文件 <filename><etc>/hosts.allow</filename> 和 <filename><etc>/hosts.deny</filename>中使用守护进程名字 <command>gdm</command>。例如要禁止从 <filename>.evil.domain</filename> 访问计算机,请添加</para>
452
<para>到 <filename><etc>/hosts.deny</filename>。您也可能需要添加</para>
456
<para>到您的 <filename><etc>/hosts.allow</filename>,如果您通常禁止从所有主机的所有服务。参看 <ulink type="help" url="man:hosts.allow">hosts.allow(5)</ulink> 手册页以获取更多细节。</para>
459
<sect2 id="firewall">
462
<para>即使是 GDM 尝试尽量智能地防止使攻击者 对 XDMCP 有机可乘,仍然建议您在您的防火墙上阻塞 XMDCP 端口(一般是 UDP 端口 177),除非真的需要。GDM 防止拒绝服务攻击,但是 X 协议仍然继承了不安全,并且只应该在可控的环境中使用。同样,每个远程连接消耗许多资源,所以通过 XDMCP 进行拒绝服务攻击比攻击一个网页服务器容易的多。</para>
465
It is also wise to block all of the Xserver ports. These are TCP
466
ports 6000+ (one for each display number) on your firewall. Note that
467
GDM will use display numbers 20 and higher for flexible on-demand
471
<para>X 在通过国际互联网使用时不是一个非常安全的协议,XDMCP 甚至更不安全。</para>
474
<sect2 id="policykit">
475
<title>PolicyKit</title>
479
TODO - Should we say more?
483
<para>GDM 可以配置为使用 PolicyKit,以允许系统管理员控制登录窗口是否应该在欢迎窗口提供关机和重启按钮。</para>
485
<para>这些按钮是由 <filename>org.freedesktop.consolekit.system.stop-multiple-users</filename> 和 <filename>org.freedesktop.consolekit.system.restart-multiple-users</filename> 动作分别控制。这些动作的策略可以使用 polkit-gnome-authorization 工具或 polkit-auth 命令行程序。</para>
490
<title>RBAC (基于角色的访问控制)</title>
492
<para>GDM 可以被设置为使用 RBAC 替代 PolicyKit。这是,RBAC 的配置将被用于控制登录窗口是否在欢迎屏幕提供关机和重启键。</para>
494
<para>例如,在 Solaris 上,“solaris.system.shutdown”认证被用于控制此项。简单的修改 <filename>/etc/user_attr</filename> 文件,以使 “gdm”用户可以使用这个认证。</para>
499
<!-- ============= ConsoleKit ================================ -->
501
<sect1 id="consolekit">
502
<title>ConsoleKit 的支持</title>
506
TODO - Should we update these docs? Probably should mention any
507
configuration that users may want to do for using it with GDM?
508
If so, perhaps this section should be moved to a subsection of
509
the "Configure" section?
513
<para>GDM 包含了对使用用户和会话登录框架,即所谓的ConsoleKit,发布用户登录信息的支持。ConsoleKit 可以跟踪所有的当前登录用户。在这个角度上看,它可以替代大多数类 Unix 操作系统上都有的 utmp 和 utmpx文件。</para>
515
<para>当 GDM 将为用户创建一个新的登录进程,为了为此用户打开一个新会话它将调用 ConsoleKit 的一个特权方法。同时 GDM 也提供 ConsoleKit,并附随关于用户会话的信息,例如:用户 ID,将于会话关联的 X11 显示名,会话起源的主机名(在 XDMCP 会话时有用),此会话是否连接等。就像启用用户会话的其它程序一样,GDM 处于特别的知晓用户会话和被信任并提供他们的信息的位置。这些特权方法的使用是受到使用 D-BUS 系统信息总线安全策略的限制的。</para>
517
<para>当一个通过 GDM 认证的现存会话上的用户请求回复一个存在的会话,GDM 调用 ConsoleKit 的一个特权方法来解锁那个会话。关于那个会话收到解锁信号后发生的精确的细节是未定的和与会话有关的。但是,大多数会话会解锁一个屏保作为回应。</para>
519
<para>当用户选择登出,或者 GDM 或会话异常退出,用户会话将从 ConsoleKit 注销。</para>
522
<!-- ============= Configuration ============================= -->
524
<sect1 id="configuration">
527
<para>GDM 有一些配置界面,包括脚本集成点、守护进程配置、欢迎界面配置、通用会话配置、与 gnome-settings-daemon 配置的集成以及会话配置。这些集成的细节在下边描述。</para>
529
<sect2 id="scripting">
532
<para>GDM 脚本集成点可以在 <filename><etc>/gdm/</filename> 目录中找到:</para>
542
<para><filename>Init</filename>,<filename>PostLogin</filename>, <filename>PreSession</filename>和 <filename>PostSession</filename> 脚本均按如下描述的运行。</para>
544
<para>对于每一种脚本,默认被执行的那个被叫做“Default”并且存储在一个与脚本类型相关的目录中。于是,默认的 <filename>Init</filename> 脚本是 <filename><etc>/gdm/Init/Default</filename>。可以提供一个对每个显示的脚本,如果存在,其将替代默认脚本运行。这样的脚本保存于和默认脚本相同的目录,并且以这个显示的 Xserver DISPLAY 值为文件名。例如,如果 <filename><Init>/:0</filename> 脚本存在,其将为 DISPLAY “:0”运行。</para>
546
<para>所有的这些脚本都使用 root 特权运行,运行成功时返回 0 ,如果有任何会导致登录会话结束的失败都会返回非零值。同样注意,GDM 将一直阻塞到脚本运行完毕,所以,如果这些脚本的任何一个挂起,都会导致登录进程挂起。</para>
548
<para>当这个登录界面的 Xserver 成功启动,但是在登录图形界面的实际显示之前,GDM 将运行 <filename>Init</filename> 脚本。这个脚本在登录窗口显示之前需要启动程序时很有用,或者用于做必要的特定初始化。</para>
550
<para>用户成功认证之后,GDM 将运行 <filename>PostLogin</filename> 脚本,这早于任何会话设置,包括早于调用 pam_open_session。这个脚本对需要在会话运行之前对会话进行初始化有用。例如,您可以设置用户的 $HOME 目录,如果需要的话。</para>
552
<para>在用户会话初始化之后,GDM 将运行 <filename>PreSession</filename>脚本。这个脚本对需要在会话初始化之后进行的初始化有用。例如,它可用于会话管理或审计。</para>
554
<para>当一个用户结束他的会话,GDM 将会运行 <filename>PostSession</filename> 脚本。注意 Xserver 在脚本运行时将会停止,所以它是不可访问的。</para>
556
<para>注意,<filename>PostSession</filename> 将可能甚至在显示器因为 IO 错误或相关的错误没有反应是运行。于是,不保证在脚本执行时 X 程序运行。</para>
558
<para>所有的上述脚本将设置 <filename>$RUNNING_UNDER_GDM</filename> 环境变量为值 <filename>yes</filename>。如果脚本也与其他显示管理器共享,这允许您定义 GDM 何时调用这些脚本,于是您可以在使用 GDM 时运行指定代码。</para>
561
<sect2 id="autostart">
564
<para>文件 <filename><share>/gdm/autostart/LoginWindow</filename> 目录包含《FreeDesktop.org 桌面程序自启动规范》中规定的格式的文件。规范中的标准特性可以被用于指定应该自启动或只有设置了 GConf 配置值等的。</para>
567
Any <filename>.desktop</filename> files in this directory will cause
568
the associated program to automatically start with the login GUI
569
greeter. By default, GDM is shipped with files which will autostart
570
the gdm-simple-greeter login GUI greeter itself, the
571
gnome-power-manager application, the gnome-settings-daemon, and the
572
metacity window manager. These programs are needed for the greeter
573
program to work. In addition, desktop files are provided for starting
574
various AT programs if the configuration values specified in the
575
Accessibility Configuration section below are set.
579
<sect2 id="xsessionscript">
580
<title>Xsession 脚本</title>
582
<para>在 <filename><etc>/gdm/Xsession</filename> 也有一个 <filename>Xsession</filename> 脚本,其在 <filename>PreSession</filename> 和 <filename>PostSession</filename> 之间被调用。这个脚本不像其他脚本那样支持为每个显示配置。这个脚本以用户名义运行,并且其将运行用户在桌面会话文件中选定启动的任何会话。</para>
585
<sect2 id="daemonconfig">
586
<title>守护进程配置</title>
589
The GDM daemon is configured using the
590
<filename><etc>/gdm/custom.conf</filename> file. Default
591
values are stored in GConf in the <filename>gdm.schemas</filename>
592
file. It is recommended that end-users modify the
593
<filename><etc>/gdm/custom.conf</filename> file because the
594
schemas file may be overwritten when the user updates their system to
595
have a newer version of GDM.
598
<para>注意,旧版的 GDM 支持其他的配置选项,但是最新版的 GDM 已经不支持他们了。</para>
600
<para><filename><etc>/gdm/custom.conf</filename> 文件使用 <filename>keyfile</filename> 的格式。括号中的关键词定义了节组,等号(=)之前的字符串是键,等号数的值代表他们的值。空行或以 # 开始的行被忽略。</para>
603
The file <filename><etc>/gdm/custom.conf</filename> supports the
604
"[daemon]", "[security]", and "[xdmcp]"
605
group sections. Within each group, there are particular key/value
606
pairs that can be specified to modify how GDM behaves. For example,
607
to enable timed login and specify the timed login user to be a user
608
named "you", you would modify the file so it contains the
614
TimedLoginEnable=true
618
<para>下边是支持的配置键全表:</para>
620
<sect3 id="choosersection">
621
<title>[chooser]</title>
625
<term>Multicast</term>
627
<synopsis>Multicast=false</synopsis>
628
<para>如果为 true 且启用了 IPv6,chooser 将向本地网络发送一个多播请求然后收集已经加入多播组的机器的回应。</para>
633
<term>MulticastAddr</term>
635
<synopsis>MulticastAddr=ff02::1</synopsis>
637
This is the Link-local multicast address.
644
<sect3 id="daemonsection">
645
<title>[daemon]</title>
648
<term>启用定时自动登录</term>
650
<synopsis>TimedLoginEnable=false</synopsis>
652
If the user given in <filename>TimedLogin</filename> should be
653
logged in after a number of seconds (set with
654
<filename>TimedLoginDelay</filename>) of inactivity on the
655
login screen. This is useful for public access terminals or
656
perhaps even home use. If the user uses the keyboard or
657
browses the menus, the timeout will be reset to
658
<filename>TimedLoginDelay</filename> or 30 seconds, whichever
659
is higher. If the user does not enter a username but just
660
hits the ENTER key while the login program is requesting the
661
username, then GDM will assume the user wants to login
662
immediately as the timed user. Note that no password will be
663
asked for this user so you should be careful, although if using
664
PAM it can be configured to require password entry before
665
allowing login. Refer to the "Security->PAM"
666
section of the manual for more information, or for help if this
667
feature does not seem to work.
673
<term>TimedLogin</term>
675
<synopsis>TimedLogin=</synopsis>
676
<para>这是会在闲置指定的秒数之后自动登录的用户。</para>
678
If the value ends with a vertical bar | (the pipe symbol),
679
then GDM will execute the program specified and use whatever
680
value is returned on standard out from the program as the user.
681
The program is run with the DISPLAY environment variable set so
682
that it is possible to specify the user in a per-display
683
fashion. For example if the value is "/usr/bin/getloginuser|",
684
then the program "/usr/bin/getloginuser" will be run to get the
691
<term>TimedLoginDelay</term>
693
<synopsis>TimedLoginDelay=30</synopsis>
694
<para>在 <filename>TimedLogin</filename> 用户登录之前等待的秒数。</para>
699
<term>AutomaticLoginEnable</term>
701
<synopsis>AutomaticLoginEnable=false</synopsis>
702
<para>如果为 true,<filename>AutomaticLogin</filename>中指定的用户将会立即登录。这个特性就像使用延时为 0 秒的计时登录。</para>
707
<term>AutomaticLogin</term>
709
<synopsis>AutomaticLogin=</synopsis>
710
<para>这是如果 <filename>AutomaticLoginEnable</filename> 为 true 时,会立即登录的用户。</para>
712
If the value ends with a vertical bar | (the pipe symbol),
713
then GDM will execute the program specified and use whatever
714
value is returned on standard out from the program as the user.
715
The program is run with the DISPLAY environment variable set so
716
that it is possible to specify the user in a per-display
717
fashion. For example if the value is "/usr/bin/getloginuser|",
718
then the program "/usr/bin/getloginuser" will be run to get the
727
<synopsis>User=gdm</synopsis>
729
The username under which the greeter and other GUI programs
730
are run. Refer to the <filename>Group</filename>
731
configuration key and to the "Security->GDM User And
732
Group" section of this document for more information.
740
<synopsis>Group=gdm</synopsis>
742
The group name under which the greeter and other GUI programs
743
are run. Refer to the <filename>User</filename>
744
configuration key and to the "Security->GDM User And
745
Group" section of this document for more information.
752
<sect3 id="debugsection">
753
<title>Debug Options</title>
756
<title>[debug]</title>
761
<synopsis>Enable=false</synopsis>
763
To enable debugging, set the debug/Enable key to
765
<filename><etc>/gdm/custom.conf</filename>
766
file and restart GDM. Then debug output will be sent to the
767
system log file (<filename><var>/log/messages</filename>
768
or <filename><var>/adm/messages</filename> depending on
769
your Operating System).
776
<sect3 id="greetersection">
777
<title>Greeter Options</title>
780
<title>[greeter]</title>
783
<term>IncludeAll</term>
785
<synopsis>IncludeAll=true</synopsis>
787
If true, then the face browser will show all users on the local
788
machine. If false, the face browser will only show users who
789
have recently logged in.
793
When this key is true, GDM will call fgetpwent() to get a list
794
of local users on the system. Any users with a user id less
795
than 500 (or 100 if running on Solaris) are filtered out. The
796
Face Browser also will display any users that have previously
797
logged in on the system (for example NIS/LDAP users). It gets
798
this list via calling the <command>ck-history</command>
799
ConsoleKit interface. It will also filter out any users which
800
do not have a valid shell (valid shells are any shell that
801
getusershell() returns - /sbin/nologin or /bin/false are
802
considered invalid shells even if getusershell() returns them).
806
If false, then GDM more simply only displays users that have
807
previously logged in on the system (local or NIS/LDAP users) by
808
calling the <command>ck-history</command> ConsoleKit interface.
816
<synopsis>Include=</synopsis>
818
Set to a list of users to always include in the Face Browser.
819
This value is set to a list of users separated by commas. By
820
default, the value is empty.
828
<synopsis>Exclude=bin,root,daemon,adm,lp,sync,shutdown,halt,mail,news,uucp,operator,nobody,nobody4,noaccess,postgres,pvm,rpm,nfsnobody,pcap</synopsis>
830
Set to a list of users to always exclude in the Face Browser.
831
This value is set to a list of users separated by commas. Note
832
that the setting in the <filename>custom.conf</filename>
833
overrides the default value, so if you wish to add additional
834
users to the list, then you need to set the value to the
835
default value with additional users appended to the list.
842
<sect3 id="securitysection">
846
<title>[security]</title>
849
<term>DisallowTCP</term>
851
<synopsis>DisallowTCP=true</synopsis>
852
<para>如果为 true,在启动关联的 Xservers 时将总是跟随 <filename>-nolisten tcp</filename> 到命令行,即禁用了 TCP 连接。这是一个更安全的配置,如果您不使用远程连接。</para>
858
<sect3 id="xdmcpsection">
859
<title>XDCMP 支持</title>
862
<title>[xdmcp]</title>
865
<term>DisplaysPerHost</term>
867
<synopsis>DisplaysPerHost=1</synopsis>
868
<para>为了防止攻击者填满等待队列,GDM 只允许一台远程计算机发起一个连接。如果希望为有多个显示器的计算机提供服务,您需要增加这个值。</para>
870
<para>注意连接到本地的显示器数目允许值没有被限制。只有通过 XDMCP 的远程连接被这个配置选项限制。</para>
877
<synopsis>Enable=false</synopsis>
879
Setting this to true enables XDMCP support allowing remote
880
displays/X terminals to be managed by GDM.
883
<para><filename>gdm</filename> 监听 UDP 177 端口的请求。参看 Port 选项以获取更多信息。</para>
885
<para>如果 GDM 编译为支持它,从远程显示的访问可以使用 TCP Wrappers 库控制。服务名是 <filename>gdm</filename></para>
889
</screen> 到您的 <filename><etc>/hosts.allow</filename>, 依赖于您的 TCP Wrappers 配置. 参看 <ulink type="help" url="man:hosts.allow">hosts.allow</ulink> 手册页,=获取更多细节。</para>
891
<para>请注意,XDMCP 不是一个相当安全的协议,使用防火墙堵住 UDP 的 177 端口是个好注意,除非您真的需要它。</para>
896
<term>HonorIndirect</term>
898
<synopsis>HonorIndirect=true</synopsis>
900
Enables XDMCP INDIRECT choosing (i.e. remote execution of
901
<filename>gdmchooser</filename>) for X-terminals which do not
902
supply their own display browser.
908
<term>MaxPending</term>
910
<synopsis>MaxPending=4</synopsis>
911
<para>为了避免拒绝服务攻击,GDM 固定了等待连接的队列的大小。只有 MaxPending 个显示可以同时开启。</para>
913
<para>请注意,这个参数不限制可以管理的远程显示的数目,只限制同时启动的显示连接的数目。</para>
918
<term>MaxSessions</term>
920
<synopsis>MaxSessions=16</synopsis>
921
<para>定义可同时管理的远程显示连接的最大数目,比如,您的主机上可以使用的远程显示的总数目。</para>
928
<synopsis>MaxWait=30</synopsis>
929
<para>当 GDM 准备好管理一个显示,一个包含一个唯一的会话 ID 的 ACCEPT 包被发送给它,这个会话 ID 在将来的 XDMCP 交谈中使用。</para>
932
GDM will then place the session id in the pending queue
933
waiting for the display to respond with a MANAGE request.
936
<para>如果在 MaxWait 秒内仍然没有反应,GDM 将声明显示器死机并且将其从等待队列中清除,为其他显示清理出槽。</para>
941
<term>MaxWaitIndirect</term>
943
<synopsis>MaxWaitIndirect=30</synopsis>
945
The MaxWaitIndirect parameter determines the maximum number of
946
seconds between the time where a user chooses a host and the
947
subsequent indirect query where the user is connected to the
948
host. When the timeout is exceeded, the information about the
949
chosen host is forgotten and the indirect slot freed up for
950
other displays. The information may be forgotten earlier if
951
there are more hosts trying to send indirect queries then
952
<filename>MaxPendingIndirect</filename>.
958
<term>PingIntervalSeconds</term>
960
<synopsis>PingIntervalSeconds=15</synopsis>
961
<para>以秒计的 ping Xserver 的间隔。如果在下次 ping 它之前,Xserver 没有反应,这个连接被停止并且会话结束。这是和 XDM PingInterval 及 PingTimeout 关联的,但是是以秒计。</para>
964
Note that GDM in the past used to have a
965
<filename>PingInterval</filename> configuration key which was
966
also in minutes. For most purposes you'd want this setting
967
to be lower than one minute. However since in most cases where
968
XDMCP would be used (such as terminal labs), a lag of more
969
than 15 or so seconds would really mean that the terminal was
970
turned off or restarted and you would want to end the session.
978
<synopsis>Port=177</synopsis>
979
<para><filename>gdm</filename> 会监听 XDMCP 请求的 UDP 端口号。不要更改这项,除非你很清楚你在干什么。</para>
986
<synopsis>Willing=<etc>/gdm/Xwilling</synopsis>
988
When the machine sends a WILLING packet back after a QUERY it
989
sends a string that gives the current status of this server.
990
The default message is the system ID, but it is possible to
991
create a script that displays customized message. If this
992
script does not exist or this key is empty the default message
993
is sent. If this script succeeds and produces some output,
994
the first line of it's output is sent (and only the first
995
line). It runs at most once every 3 seconds to prevent
996
possible denial of service by flooding the machine with QUERY
1005
<sect2 id="greeterconfiguration">
1006
<title>简单欢迎界面配置。</title>
1008
<para>GDM 默认的欢迎界面被叫做简单的欢迎界面,并且通过 GConf 配置。默认上,值存储于 GConf 的 <filename>gdm-simple-greeter.schemas</filename> 文件。如果“gdm”用户有一个可写的 $HOME 目录来盛放 GConf 设置这些默认值将被覆盖。这些值可以使用 <command>gconftool-2</command> 或 <command>gconf-editor</command> 程序修改。下列的配置选项被支持:</para>
1011
<title>欢迎界面配置键</title>
1014
<term>/apps/gdm/simple-greeter/banner_message_enable</term>
1016
<synopsis>false (boolean)</synopsis>
1017
<para>控制旗帜信息文本是否显示。</para>
1022
<term>/apps/gdm/simple-greeter/banner_message_text</term>
1024
<synopsis>NULL (string)</synopsis>
1025
<para>指定在欢迎窗口显示文本旗帜消息</para>
1030
<term>/apps/gdm/simple-greeter/disable_restart_buttons</term>
1032
<synopsis>false (boolean)</synopsis>
1033
<para>控制是否在登录窗口显示重启按钮。</para>
1038
<term>/apps/gdm/simple-greeter/disable_user_list</term>
1040
<synopsis>false (boolean)</synopsis>
1041
<para>如果为 true,不在登录窗口显示已知用户的头像登录功能。</para>
1046
<term>/apps/gdm/simple-greeter/logo_icon_name</term>
1048
<synopsis>computer (string)</synopsis>
1049
<para>设置为要使用的主题图标名,以获取欢迎标志。</para>
1054
<term>/apps/gdm/simple-greeter/recent-languages</term>
1056
<synopsis>[] (string list)</synopsis>
1058
Set to a list of languages to be shown by default in the login
1059
window. Default value is "[]". With the default setting only
1060
the system default language is shown and the option "Other..."
1061
which pops-up a dialog box showing a full list of available
1062
languages which the user can select.
1065
<para>不希望用户手动更改这项设置,而是,GDM 跟踪在配置键中选中的任何语言,并且在语言组合框中与“其他...”一起单独显示他们。这种方式,使常用的语言可以容易的选择。</para>
1070
<term>/apps/gdm/simple-greeter/recent-layouts</term>
1072
<synopsis>[] (string list)</synopsis>
1073
<para>设置在默认的登录面板上显示的键盘布局的列表。默认值是“[]”。使用默认的配置时,只显示默认的键盘布局,其他的选项在“其他...”中,其弹出一个对话框,显示所有可用的键盘布局,以供用户选择。</para>
1075
<para>不希望用户手动更改这项设置,而是,GDM 跟踪在配置键中选中的任何语言布局,并且在键盘布局组合框中与“其他...”一起单独显示他们。这种方式,使常用的键盘布局可以容易的选择。</para>
1080
<term>/apps/gdm/simple-greeter/wm_use_compiz</term>
1082
<synopsis>false (boolean)</synopsis>
1083
<para>控制是否使用 compiz 替换 metacity 作为窗口管理器。</para>
1089
<sect2 id="accessibilityconfiguration">
1090
<title>无障碍功能设置</title>
1092
<para>本节描述 GDM 可用的无障碍配置选项。</para>
1094
<sect3 id="accessibilitydialog">
1095
<title>GDM Accessibility Dialog And GConf Keys</title>
1097
<para>登录界面的 GDM 欢迎面板显示一个无障碍图标。点击这个图标,打开 GDM 无障碍对话框。在 GDM 无障碍对话框中,有一列复选框,用户可以启用或禁用相关的辅助选项。</para>
1100
The checkboxes that correspond to the on-screen keyboard, screen
1101
magnifier and screen reader assistive tools act on the three GConf
1102
keys that are described in the next section of this document. By
1103
enabling or disabling these checkboxes, the associated GConf key is
1104
set to "true" or "false". When the GConf key is set to true, the
1105
assistive tools linked to this GConf key are launched. When the
1106
GConf key is set to "false", any running assistive tool linked to
1107
this GConf key are terminated. These GConf keys are not automatically
1108
reset to a default state after the user has logged in. Consequently,
1109
the assistive tools that were running during the last GDM login
1110
session will automatically be launched at the next GDM login session.
1114
The other checkboxes in the GDM Accessibility Dialog do not have
1115
corresponding GConf keys because no additional program is launched to
1116
provide the accessibility features that they offer. These other
1117
options correspond to accessibility features that are provided by the
1118
Xserver, which is always running during the GDM session.
1122
<sect3 id="accessibilitygconfconfiguration">
1123
<title>无障碍 GConf 键</title>
1125
<para>GDM 提供如下的 GConf 键来控制它的无障碍功能:</para>
1128
<title>GDM 配置键</title>
1131
<term>/desktop/gnome/interface/accessibility</term>
1133
<synopsis>false (boolean)</synopsis>
1134
<para>控制无障碍设施是否由 GDM 图形界面启动。这被许多无障碍程序的工作所需要。</para>
1138
<term>/desktop/gnome/applications/at/screen_magnifier_enabled</term>
1140
<synopsis>false (boolean)</synopsis>
1141
<para>如果设置了,链接到 GConf 键的辅助工具将随着 GDM 图形界面程序启动。默认这是一个屏幕放大镜程序。</para>
1145
<term>/desktop/gnome/applications/at/screen_keyboard_enabled</term>
1147
<synopsis>false (boolean)</synopsis>
1148
<para>如果设置了,链接到 GConf 键的辅助工具将随着 GDM 图形界面程序启动。默认这是一个屏幕键盘程序。</para>
1152
<term>/desktop/gnome/applications/at/screen_reader_enabled</term>
1154
<synopsis>false (boolean)</synopsis>
1155
<para>如果设置了,链接到 GConf 键的辅助工具将随着 GDM 图形界面程序启动。默认这是一个屏幕阅读程序。</para>
1161
<sect3 id="accessibilitytoolsconfiguration">
1162
<title>链接 GConf 键到无障碍工具</title>
1165
For the screen_magnifier_enabled, the screen_keyboard_enabled, and the
1166
screen_reader_enabled GConf keys, the assistive tool which gets
1167
launched depends on the desktop files located in the GDM autostart
1168
directory as described in the "Autostart Configuration" section of
1169
this manual. Any desktop file in the GDM autostart directory can be
1170
linked to these GConf key via specifying that GConf key in the
1171
AutostartCondition value in the desktop file. So the exact
1172
AutostartCondition line in the desktop file could be one of the
1177
AutostartCondition=GNOME /desktop/gnome/applications/at/screen_keyboard_enabled
1178
AutostartCondition=GNOME /desktop/gnome/applications/at/screen_magnifier_enabled
1179
AutostartCondition=GNOME /desktop/gnome/applications/at/screen_reader_enabled
1183
When an accessibility key is true, then any program which is linked to
1184
that key in a GDM autostart desktop file will be launched (unless the
1185
Hidden key is set to true in that desktop file). A single GConf key
1186
can even start multiple assistive tools if there are multiple desktop
1187
files with this AutostartCondition in the GDM autostart directory.
1191
<sect3 id="accessibilitytoolexample">
1192
<title>修改无障碍工具配置的例子</title>
1195
For example, if GNOME is distributed with GOK as the default on-screen
1196
keyboard, then this could be replaced with a different program if
1197
desired. To replace GOK with the on-screen keyboard application
1198
"onboard" and additionally activate the assistive tool "mousetweaks"
1199
for dwelling support, then the following configuration is needed.
1203
Create a desktop file for onboard and a second one for mousetweaks;
1204
for example, onboard.desktop and mousetweaks.desktop. These files
1205
must be placed in the GDM autostart directory and be in the format
1206
as explained in the "Autostart Configuration" section of this
1210
<para>下边是作为例子的 <filename>onboard.desktop</filename> 文件:</para>
1218
Exec=onboard --size 500x180 -x 20 -y 10
1222
Categories=GNOME;GTK;Accessibility;
1223
AutostartCondition=GNOME /desktop/gnome/applications/at/screen_keyboard_enabled
1226
<para>下边是一个作为例子的 <filename>mousetweaks.desktop</filename> 文件:</para>
1231
Name=Software Mouse-Clicks
1232
Comment=Perform clicks by dwelling with the pointer
1234
Exec=mousetweaks --enable-dwell -m window -c -x 20 -y 240
1238
Categories=GNOME;GTK;Accessibility;
1239
AutostartCondition=GNOME /desktop/gnome/applications/at/screen_keyboard_enabled
1243
Note the line with the AutostartCondition that links both desktop
1244
files to the GConf key for the on-screen keyboard.
1248
To disable GOK from starting, the desktop file for the GOK on-screen
1249
keyboard must be removed or deactivated. Otherwise onboard and GOK
1250
would simultaneously be started. This can be done by removing the
1251
gok.desktop file from the GDM autostart directory, or by adding the
1252
"Hidden=true" key setting to the gok.desktop file.
1256
After making these changes, GOK will no longer be started when the
1257
user activates the on-screen keyboard in the GDM session; but onboard
1258
and mousetweaks will instead be launched.
1263
<sect2 id="generalsessionconfig">
1264
<title>通用会话设置</title>
1267
TODO - I think this section should be expanded upon. What specific
1268
keys are of interest, or would some users be likely to want
1269
to configure? Also, would be good to be more specific about
1270
how lock down management is handled.
1274
The GDM Greeter uses some of the same framework that your desktop
1275
session will use. And so, it is influenced by a number of the same
1276
GConf settings. For each of these settings the Greeter will use the
1277
default value unless it is specifically overridden by a) GDM's
1278
installed mandatory policy b) system mandatory policy. GDM installs
1279
its own mandatory policy to lock down some settings for security.
1283
<sect2 id="gnomesettingsdaemon">
1284
<title>GNOME 设置守护进程</title>
1287
TODO - I think this section should be expanded upon. What specific
1288
keys are of interest, or would some users be likely to want
1289
to configure? Also, would be good to give a more complete
1290
list of plugins that users might want to consider disabling.
1291
Also, shouldn't we list the sound/active key in the Greeter
1292
configuration setting? Oddly I do not find this key used
1293
in anything but the chooser in SVN.
1297
<para>GDM 启用了 gnome-settings-daemon 的下列插件:a11y-keyboard, background, sound, xsettings。</para>
1299
<para>他们负责例如背景图片,字体和主题设置,声音事件等。</para>
1301
<para>也可以使用 GConf 禁用插件。例如,如果您想禁用声音插件,就可以不设置下边这个键:<filename>/apps/gdm/simple-greeter/settings-manager-plugins/sound/active</filename>。</para>
1304
<sect2 id="sessionconfig">
1305
<title>GDM 会话配置</title>
1308
GDM sessions are specified using the FreeDesktop.org Desktop Entry
1309
Specification, which can be referenced at the following URL:
1310
<ulink url="http://www.freedesktop.org/wiki/Specifications/desktop-entry-spec">
1311
http://www.freedesktop.org/wiki/Specifications/desktop-entry-spec</ulink>.
1315
By default, GDM will install desktop files in the
1316
<filename><share>/xsessions</filename> directory. GDM will
1317
search the following directories in this order to find desktop files:
1318
<filename><etc>/X11/sessions/</filename>,
1319
<filename><dmconfdir>/Sessions</filename>,
1320
<filename><share>/xsessions</filename>, and
1321
<filename><share>/gdm/BuiltInSessions</filename>. By default the
1322
<filename><dmconfdir></filename> is set to
1323
<filename><etc>/dm/</filename> unless GDM is configured to use
1324
a different directory via the "--with-dmconfdir" option.
1328
A session can be disabled by editing the desktop file and adding a line
1329
as follows: <filename>Hidden=true</filename>.
1333
GDM desktop files support a GDM-specific extension, a key named
1334
"X-GDM-BypassXsession". If the key is not specified in a
1335
desktop file, the value defaults to "false". If this key is
1336
specified to be "true" in a desktop file, then GDM will
1337
launch the program specified by the desktop file "Exec" key
1338
directly when starting the user session. It will not run the program
1339
via the <filename><etc>/gdm/Xsession</filename> script, which is
1340
the normal behavior. Since bypassing the
1341
<filename><etc>/gdm/Xsession</filename> script avoids setting up
1342
the user session with the normal system and user settings, sessions
1343
started this way can be useful for debugging problems in the system or
1344
user scripts that might be preventing a user from being able to start
1350
<sect2 id="userconfig">
1351
<title>GDM 用户会话和语言配置</title>
1353
The user's default session and language choices are stored in the
1354
<filename>~/.dmrc</filename> file. When a user logs in for the first
1355
time, this file is created with the user's initial choices. The user
1356
can change these default values by simply changing to a different value
1357
when logging in. GDM will remember this change for subsequent logins.
1361
The <filename>~/.dmrc</filename> file is in the standard
1362
<filename>INI</filename> format. It has one section called
1363
<filename>[Desktop]</filename> which has two keys:
1364
<filename>Session</filename> and <filename>Language</filename>.
1368
The <filename>Session</filename> key specifies the basename of the
1369
session <filename>.desktop</filename> file that the user wishes to
1370
normally use without the <filename>.desktop</filename> extension.
1371
The <filename>Language</filename> key specifies the language that the
1372
user wishes to use by default. If either of these keys is missing, the
1373
system default is used. The file would normally look as follows:
1379
Language=cs_CZ.UTF-8
1385
<!-- ============= GDM Commands ============================= -->
1387
<sect1 id="binaries">
1388
<title>GDM 命令</title>
1390
<sect2 id="sbindir_binaries">
1391
<title>GDM 根用户命令</title>
1393
<para>GDM 包在<filename>sbindir</filename>中提供了下列供根用户使用的命令:</para>
1395
<sect3 id="gdmcommandline">
1396
<title><command>gdm</command> 和 <command>gdm-binary</command>命令行选项</title>
1399
The <command>gdm</command> command is really just a script which
1400
runs the <command>gdm-binary</command>, passing along any options.
1401
Before launching <command>gdm-binary</command>, the gdm wrapper
1402
script will source the <filename><etc>/profile</filename> file
1403
to set the standard system environment variables. In order to better
1404
support internationalization, it will also set the LC_MESSAGES
1405
environment variable to LANG if neither LC_MESSAGES or LC_ALL are
1406
set. The <command>gdm-binary</command> is the actual GDM daemon.
1410
<title><command>gdm</command> 和 <command>gdm-binary</command>命令行选项</title>
1413
<term>-?, --help</term>
1415
<para>给出命令行选项的一个简单概述。</para>
1420
<term>--fatal-warnings</term>
1422
<para>使所有的警告都可以造成 GDM 退出。</para>
1427
<term>--timed-exit</term>
1429
<para>30秒之后退出,对调试有用。</para>
1434
<term>--version</term>
1436
<para>显示 GDM 守护进程的版本。</para>
1442
<sect3 id="gdmrestartcommandline">
1443
<title><command>gdm-restart</command> 命令行选项</title>
1445
<para><command>gdm-restart</command> 通过给 GDM 守护京城一个 HUP 信号停止并重启 GDM。这个命令将立即结束会话并且注销当前使用 GDM 登录的用户。</para>
1448
<sect3 id="gdmsaferestartcommandline">
1449
<title><command>gdm-safe-restart</command> 命令行选项</title>
1451
<para><command>gdm-safe-restart</command> 通过给 GDM 守护进程一个 USR1 信号停止并重启 GDM。GDM 将在所有用户注销之后重启。</para>
1454
<sect3 id="gdmstopcommandline">
1455
<title><command>gdm-stop</command> 命令行选项</title>
1457
<para><command>gdm-stop</command> 通过给 GDM 守护进程一个 TERM 信号停止GDM。</para>
1462
<!-- ============= Troubleshooting =========================== -->
1464
<sect1 id="troubleshooting">
1468
TODO - any other tips we should add? Might be useful to highlight any
1469
common D-Bus configuration issues?
1474
This section discusses helpful tips for getting GDM working. In general,
1475
if you have a problem using GDM, you can submit a bug or send an email
1476
to the gdm-list mailing list. Information about how to do this is in
1477
the Introduction section of the document.
1481
If GDM is failing to work properly, it is always a good idea to include
1482
debug information. To enable debugging, set the debug/Enable key to
1483
"true" in the <filename><etc>/gdm/custom.conf</filename>
1484
file and restart GDM. Then use GDM to the point where it fails, and
1485
debug output will be sent to the system log file
1486
(<filename><var>/log/messages</filename> or
1487
<filename><var>/adm/messages</filename> depending on your Operating
1488
System). If you share this output with the GDM community via a bug
1489
report or email, please only include the GDM related debug information
1490
and not the entire file since it can be large. If you do not see any
1491
GDM syslog output, you may need to configure syslog (refer to the
1492
<ulink type="help" url="man:syslog">syslog</ulink> man page).
1495
<sect2 id="wontstart">
1496
<title>GDM 将不会启动</title>
1499
There are a many problems that can cause GDM to fail to start, but
1500
this section will discuss a few common problems and how to approach
1501
tracking down a problem with GDM starting. Some problems will
1502
cause GDM to respond with an error message or dialog when it tries
1503
to start, but it can be difficult to track down problems when GDM
1508
First make sure that the Xserver is configured properly. The
1509
GDM configuration file contains a command in the [server-Standard]
1510
section that is used for starting the Xserver. Verify that this
1511
command works on your system. Running this command from the
1512
console should start the Xserver. If it fails, then the problem
1513
is likely with your Xserver configuration. Refer to your Xserver
1514
error log for an idea of what the problem may be. The problem may
1515
also be that your Xserver requires different command-line options.
1516
If so, then modify the Xserver command in the GDM configuration file
1517
so that it is correct for your system.
1521
Also make sure that the <filename>/tmp</filename> directory has
1522
reasonable ownership and permissions, and that the machine's file
1523
system is not full. These problems will cause GDM to fail to start.
1528
<!-- ============= Application License ============================= -->
1530
<sect1 id="license">
1532
<para>本程序是自由软件;您可以在自由软件基金会发布的 <ulink type="help" url="gnome-help:gpl"><citetitle>GNU 通用公共许可证</citetitle></ulink>下重新发布或修改它;许可证应使用第二版本或您所选择的更新的版本。</para>
1533
<para>本程序的发布是希望它能够对你有所帮助,但是没有任何保证;包括商业适用性的默示担保以及特定目的适用性。查阅<citetitle> GNU 通用公共许可证</citetitle>以了解更多内容。</para>
1534
<para><citetitle>GNU 通用公共许可证</citetitle>作为附录包含在了 <citetitle>GNOME 用户指导</citetitle>中。您也可以通过访问 <ulink type="http" url="http://www.fsf.org">their Web site</ulink>或写信给<address> Free Software Foundation, Inc. <street>51 Franklin Street, Fifth Floor</street><city>Boston</city>, <state>MA</state><postcode>02110-1301</postcode><country>USA</country></address>以从自由软件基金会获取<citetitle>GNU 通用公共许可证</citetitle>的一份副本。</para>
1537
<!-- Keep this comment at the end of the file
1542
sgml-minimize-attributes:nil
1543
sgml-always-quote-attributes:t
1546
sgml-parent-document:nil
1547
sgml-exposed-tags:nil
1548
sgml-local-catalogs:nil
1549
sgml-local-ecat-files:nil