<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY legal SYSTEM "legal.xml">
<!ENTITY version "2.26.0">
<!ENTITY date "02/10/2009">
<!ENTITY mdash "&#8212;">
<!ENTITY percnt "&#x0025;">
]>
<article id="index" lang="zh_CN">
  <articleinfo>
    <title>GNOME 显示管理器参考手册</title>

    <revhistory>
      <revision>
        <revnumber>0.0</revnumber>
        <date>2008-09</date>
      </revision>
    </revhistory>

    <abstract role="description">
      <para>GDM 是 GNOME 登录管理器，一个图形界面的登录程序。</para>
    </abstract>

    <authorgroup>
      <author>
        <firstname>Martin</firstname><othername>K.</othername>
           <surname>Petersen</surname>
        <affiliation>
          <address><email>mkp@mkp.net</email></address>
        </affiliation>
      </author>
      <author>
        <firstname>George</firstname><surname>Lebl</surname>
        <affiliation>
          <address><email>jirka@5z.com</email></address>
        </affiliation>
      </author>
      <author>
        <firstname>Jon</firstname><surname>McCann</surname>
        <affiliation>
          <address><email>mccann@jhu.edu</email></address>
        </affiliation>
      </author>
      <author>
        <firstname>Ray</firstname><surname>Strode</surname>
        <affiliation>
          <address><email>rstrode@redhat.com</email></address>
        </affiliation>
      </author>
      <author role="maintainer">
        <firstname>Brian</firstname><surname>Cameron</surname>
        <affiliation>
          <address><email>Brian.Cameron@Sun.COM</email></address>
        </affiliation>
      </author>
    </authorgroup>
    <copyright>
      <year>1998</year>
      <year>1999</year>
      <holder>Martin K. Petersen</holder>
    </copyright>
    <copyright>
      <year>2001</year>
      <year>2003</year>
      <year>2004</year>
      <holder>George Lebl</holder>
    </copyright>
    <copyright>
      <year>2003</year>
      <year>2007</year>
      <year>2008</year>
      <holder>Red Hat, Inc.</holder>
    </copyright>
    <copyright>
      <year>2003</year>
      <year>2004</year>
      <year>2005</year>
      <year>2006</year>
      <year>2007</year>
      <year>2008</year>
      <holder>Sun Microsystems, Inc.</holder>
    </copyright>

      <legalnotice id="legalnotice">
	<para>对于本文档的复制、分发和/或修改必须遵循自由软件基金会 (Free Software Foundation) 发布的 GNU 自由文档许可证 (GFDL) 版本 1.1 或更高版本，该许可证没有固定的部分、没有封面和背页文本。您可以在 <ulink type="help" url="ghelp:fdl">link</ulink> 或在随本手册一起分发的 COPYING-DOCS 文件中找到 GFDL 的副本。</para>
         <para>本手册是以 GFDL 协议下发布的 GNOME 手册集的一部分。如果您希望单独发布本手册，您可以通过添加一个这个许可证的一份副本到这个手册来做到，就像在第六节中所描述的这个许可证。</para>

	<para>各个公司使用的许多用于区别它们产品和服务的名称都声明为商标。在所有的 GNOME 文档以及 GNOME 文档项目的成员中，这些名称都是以全大写字母或首字母大写显示，从而表明它们是商标。</para>

	<para>本文档以及文档的修改版本都是在遵循 GNU 自由文档许可证的条款下提供，这表示具有以下含义：<orderedlist>
		<listitem>
		  <para>文档按“原样”提供，不提供任何明示或暗示的保证，包括但不限于：文档或文档的修改版本没有适销性方面的缺陷、适合特定目的的适用性，以及没有侵权行为。您将自行承担本文档以及文档修改版本的质量、准确性以及性能方面的风险。如果任何文档或文档修改版本存在缺陷，您（而不是最初的编写者、作者或撰写人）将承担所有必需的服务、维修或更正的费用。此免责声明是本许可证的重要组成部分。如果不接受此免责声明，那么您就没有权利使用任何文档或文档的修改版本；并且</para>
		</listitem>
		<listitem>
		  <para>无论在任何情况以及在任何法律理论下，本文档或文档修改版本的作者、最初的编写者、任何撰写人或任何分发者，或者任意这些方的任何提供者都不对任何人由于使用本文档或文档修改版本引起或带来的任何直接的、间接的、特殊的、偶然的或继发的损失承担任何民事（包括疏忽）、合同或其它方面的责任，这些损失包括但不限于信誉损失、工作停止、计算机失败或故障，或任何以及所有其它损失或由此引发的或与之相关的损失，即使这些方已被告知存在出现此类损失的可能性时也是如此。</para>
		</listitem>
	  </orderedlist></para>
  </legalnotice>



    <releaseinfo>
       This manual describes version 2.26.0 of the GNOME Display Manager.
       It was last updated on 02/10/2009.
    </releaseinfo>  
  </articleinfo>

  <!-- ============= Preface ================================== -->

  <sect1 id="preface">
    <title>Terms and Conventions Used in This Manual</title>

    <para>
      This manual describes version 2.26.0 of the GNOME Display Manager.
      It was last updated on 02/10/2009.
    </para>  

    <para>
      Chooser - A program used to select a remote host for managing a
      display remotely on the attached display (<command>gdm-host-chooser</command>).
    </para>

    <para>
      FreeDesktop - The organization providing desktop standards, such as the
      Desktop Entry Specification used by GDM.
      <ulink type="http" url="http://www.freedesktop.org/">
      http://www.freedesktop.org</ulink>.
    </para>
    <para>GDM - GNOME 显示管理器，用来描述这个软件包的整体。</para>

    <para>Greeter - 图形登录窗口 (<command>gdm-simple-greeter</command>)。</para>

    <para>PAM - 可插入的认证机制</para>

    <para>XDMCP - X 显示管理协议</para>

    <para>
      Xserver - An implementation of the X Window System.  For example the
      Xorg Xserver provided by the X.org Foundation
      <ulink type="http" url="http://www.x.org/">http://www.x.org</ulink>.
    </para>

    <para>以尖括号中的一个单词开始的路径是相对与安装前缀的。例如，<filename>&lt;share&gt;/pixmaps/</filename>是指<filename>/usr/share/pixmaps</filename>，如果 GDM 是使用如下命令配置的<command>--prefix=/usr</command>。</para>
  </sect1>

  <!-- ============= Overview ================================= -->

  <sect1 id="overview">
    <title>概览</title>

    <sect2 id="introduction">
      <title>导言</title>

      <para>GNOME 显示管理器 (GDM) 是一个实现了管理本地和远程显示所要求的所有重要功能的显示管理器。GDM 是从头开始写的，并且不包含任何 XDM 或 X Consortium 的代码。</para>

      <para>注意 GDM 是可以设置的，并且很多配置对安全有影响。应该知道的问题，在这个文档中高亮显示。</para> 

      <para>请注意，一些操作系统设置 GDM 为不同于本文档中描述的行为。如果 GDM 并不是像文档中这样子，请查看相关的设置是否不同于此处描述的。</para>

      <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>

      <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>

      <para>请在<ulink type="http" url="http://bugzilla.gnome.org/"> http://bugzilla.gnome.org</ulink>的“gdm”分类提交任何错误报告或功能增强要求。</para>
    </sect2>

    <sect2 id="stability">
      <title>	界面稳定性</title>

      <para>GDM 2.20 和更早的版本支持稳定配置界面。但是基础代码在 GDM 2.22 重写了，其并不是完全的向后兼容旧版的。部分原因是，工作方式不同了，所以一些选项没有意义了；一部分原因是一些选项从来没有使用过；另外的一部分原因是一些功能还没有重新实现。</para>

      <para>在稳定样式中将继续支持的界面包括：Init，PreSession， PostSession， PostLogin 和 Xsession 脚本。<filename>&lt;etc&gt;/gdm/custom.conf</filename> 文件中的一些守护进程选项继续被支持。同样，<filename>~/.dmrc</filename> 和 头像登录图像位置仍然被支持。</para>

      <para>GDM 2.20 和更早的版本支持多个显卡上的多个显示器管理功能，就像使用终端服务界面，通过像是 Xnest 或 Xephyr 的程序登录一个窗口，gdmsetup 程序，基于 XML 的欢迎界面主题，以及从登录窗口运行 XDMCP chooser 的能力。2.22版重写之后，这些特性没有添加回来</para>

    </sect2>

    <sect2 id="functionaldesc">
      <title>功能描述</title>

<!--
<para>
        TODO - Would be good to discuss D-Bus, perhaps the new GObject model,
               and to explain the reasons why the rewrite made GDM better.
               From a high-level overview perspective, rather than the
               technical aspects.
</para>
-->

      <para>GDM 负责管理系统上的显示，包括认证用户，开始用户会话，结束用户会话。GDM是可以配置的，其配置方法在本文档的 “配置 GDM”一节说明。GDM 也适合残障人士。</para>

      <para>GDM 提供了管理主控制台显示的能力，且是通过虚拟终端显示。它是和其他程序集成的，例如快速用户切换小程序 (FUSA) 和 gnome-screensaver，以通过 Xserver 虚拟终端 (VT) 接口管理控制台上的多显示器。它也可以管理 XDMCP 显示。</para>

      <para>无论怎样的显示类型，当其管理显示时，GDM 将做如下的工作：将启动 Xserver 进程，然后以 root 用户运行 <filename>Init</filename>，并且在显示器上启动欢迎程序。</para>

      <para>
        The greeter program is run as the unprivileged "gdm"
        user/group.  This user and group are described in the
        "Security" section of this document.  The main function of
        the greeter program is to authenticate the user.  The authentication
        process is driven by Pluggable Authentication Modules (PAM).  The PAM
        modules determine what prompts (if any) are shown to the user to
        authenticate.  On the average system, the greeter program will request
        a username and password for authentication.  However some systems may
        be configured to use alternative mechanisms such as a fingerprint or
        SmartCard reader.  GDM and PAM can be configured to not require any
        input, which will cause GDM to automatically log in and simply
        start a session, which can be useful for some environments, such as
        for kiosks.
      </para>

      <para>除了认证，欢迎程序允许用户选择启动哪个会话，使用哪个语言。会话由以 .desktop 结尾的文件定义，更多关于这个文件的信息可以在本文档的“GDM 用户会话和语言配置”节找到。默认上，GDM 被配置为显示一个头像登陆器，以使用户可以通过在一张图片上点击选择他们的账户，替代输入用户名。GDM 在用户的 <filename>~/.dmrc</filename>保持跟踪用户的默认会话和语言，在用户的确没有在登录界面选择会话和语言使用这些默认的。</para>

      <para> 
        After authenticating a user, the daemon runs the
        <filename>PostLogin</filename> script as root, then runs the  
        <filename>PreSession</filename> script as root.  After running these
        scripts, the user session is started.  When the user exits their 
        session, the <filename>PostSession</filename> script is run as root.
        These scripts are provided as hooks for distributions and end-users
        to customize how sessions are managed.  For example, using these 
        hooks you could set up a machine which creates the user's $HOME
        directory on the fly, and erases it on logout.  The difference 
        between the <filename>PostLogin</filename> and
        <filename>PreSession</filename> scripts is that
        <filename>PostLogin</filename> is run before the pam_open_session call
        so is the right place to do anything which should be run before the
        user session is initialized.  The <filename>PreSession</filename>
        script is called after session initialization.
      </para>
    </sect2>

    <sect2 id="greeterpanel">
      <title>欢迎面板</title>
      <para>
        The GDM greeter program displays a panel docked at the bottom of the
        screen which provides additional functionality.  When a user is
        selected, the panel allows the user to select which session, language,
        and keyboard layout to use after logging in.  The keyboard layout
        selector also changes the keyboard layout used when typing your
        password.  The panel also contains an area for login services to leave
        status icons.  Some example status icons include a battery icon for
        current battery usage, and an icon for enabling accessibility features.
        The greeter program also provides buttons which allow the user to
        shutdown or restart the system.  It is possible to configure GDM to not
        provide the shutdown and restart buttons, if desired.  GDM can also be
        configured via PolicyKit (or via RBAC on Solaris) to require the user
        have appropriate authorization before accepting the shutdown or restart
        request.
      </para>

      <para>注意，键盘布局功能只有在支持 libxklavier 的系统上可以使用。</para>
    </sect2>

    <sect2 id="accessibility">
      <title>无障碍</title>

        <para>GDM 支持“无障碍登录”，允许用户登录他们的桌面，即使他们不能以普通的方式方便地使用屏幕、鼠标或键盘。无障碍技术(AT)功能，比如屏幕键盘、屏幕阅读器、屏幕放大器和 Xserver AccessX 键盘辅助都是可用的。如果需要，也可以放大文本或高对比图标和控制。参考本文档的“无障碍配置”节获取更多关于多少中无障碍功能可以配置。</para>

        <para>在一些操作系统上，确定 GDM 用户是“audio”组的成员是必须的，以使要求声音输出 AT 程序(例如文本语音转换)可以工作。</para>
    </sect2>

    <sect2 id="facebrowser">
      <title>GDM 头像登录器</title>

      <para>头像登陆器是一个允许用户通过在一个图片上点击选择他们的用户名。这项功能可以通过 /apps/gdm/simple-greeter/disable_user_list GConf 键来启用或禁用，其默认是启用的。禁用时，用户必须手动输入他们的完全的用户名。当启用时，它显示本地系统上所有的用来登录的用户名(在 /etc/passwd 文件中定义的有合法的 shell ，并且足够高的 UID 的所有用户)，以及最近登录过的远程用户。GDM 2.20 版和更早版中的头像登录器可能试图显示所有的远程用户，这在大的企业部署中造成了性能问题。</para>

      <para>头像登录器配置为在列表顶端显示最经常登录的用户。这可以确保经常登录的用户可以快速的找到他们的登录图片。</para>

      <para>头像登录器支持前缀字母过滤(type-ahead search)，其依据用户的输入来匹配列表中的用户名，动态移动选中的头像。这意味着，一个有很长用户名的用户在从列表中选择之前将只需要输入用户名开始的几个字符。</para>

      <para>GDM 所使用的额图标可以使用 sysadmin 全局安装，也可以定位于用户主目录。如果全局安装，他们应该位于 <filename>&lt;share&gt;/pixmaps/faces/</filename> 目录，并且文件名应该就是用户的名字。头像图片应该是 GTK+ 可以读的标准图片，例如 PNG 或 JPEG。位于全局头像目录的头像图标应该使 GDM 用户可读。</para>

<!--
<para>
        TODO - In the old GDM the ~/gnome2/gdm file is used, but the new code
               seems to use ~/.gnome/gdm.  Error?
</para>
-->
      <para>如果这个用户没有全局图标，GDM 将在用户的 $HOME 目录查找图像文件。GDM 将首先在 <filename>~/.face</filename> 寻找用户的头像图片。如果没有找到，将尝试 <filename>~/.face.icon</filename>。如果仍然没有发现，它将使用在 <filename>~/.gnome2/gdm</filename> 文件中定义的“face/picture=”的值。</para>

      <para>如果一个用户没有定义的头像图片，GDM 将使用当前 GTK+ 主题的“stock_person”图标。如果没有定义这个图片，将回退使用一个通用的头像图片。</para>

      <para>请注意，加载和缩放位于远程用户主目录的头像可能会是非常消耗时间的任务。因为不通过 NIS 或 NFS 实际加载图片，GDM 不尝试从远程主目录加载头像图片。</para>

      <para>当这个浏览器打开时，这个计算机上的合法用户将暴露给任何人。如果启用了 XDMCP，用户名将暴露给远程用户。 这当然会有点限制安全，因为恶意用户不许要猜测合法用户名。在一些非常严格的环境下，头像登录可能是不适当的。</para>

    </sect2>

    <sect2 id="xdmcp">
      <title>XDMCP</title>

<!--
<para>
        TODO - What XDMCP features actually work?   I know that the
               chooser is missing.
</para>
-->

      <para>GDM 守护进程可以被配置为监听和管理从远程显示器上的 X 显示管理协议(XDMCP)请求。XDMCP 是默认关闭的，但是如果需要可以开启。如果 GDM 构建为支持 TCP Wrapper，则守护进程将只准许在 TCP Wrappers 配置文件指定了 GDM 服务节的主机的访问。</para>

      <para>GDM 包括了一些使它可以在对 XDMCP 服务的拒绝服务攻击更有抵抗力的方法。许多协议参数，握手计时等，可以进行微调。默认设置可以在多数系统上合理的工作。</para>

      <para>GDM 默认使用普通 UDP 的用于 XDMCP 的 177 端口监听 XDMCP 请求，将通过向发端发送一个 WILLING 包响应 QUERY 或 BROADCAST_QUERY 请求。</para>

      <para>
        GDM can also be configured to honor INDIRECT queries and present a
        host chooser to the remote display.  GDM will remember the user's
        choice and forward subsequent requests to the chosen manager.  GDM
        also supports an extension to the protocol which will make it forget
        the redirection once the user's connection succeeds.  This extension
        is only supported if both daemons are GDM.  It is transparent and
        will be ignored by XDM or other daemons that implement XDMCP.
      </para>

      <para>如果 XDMCP 好像不工作，确定所有的机器都在 <filename>/etc/hosts</filename> 指定了。</para>

      <para>参考“安全”部分来获取关于使用 XDMCP 时的安全关切的信息。</para>
    </sect2>

    <sect2 id="logging">
      <title>登录</title>

      <para>
        GDM uses syslog to log errors and status.  It can also log debugging
        information, which can be useful for tracking down problems if GDM is
        not working properly.  Debug output can be enabled by setting the
        debug/Enable key to "true" in the
        <filename>&lt;etc&gt;/gdm/custom.conf</filename> file.
      </para>

      <para>各个 Xservers 的输出存储于 GDM 日志目录中，一般是 <filename>&lt;var&gt;/log/gdm/</filename>。任何  Xserver 信息保存于一个相关于显示器值的文件中，<filename>&lt;display&gt;.log</filename>。</para>

      <para>会话的输出通过 GDM 守护进程传送到 <filename>~/.xsession-errors</filename>文件。这个文件每次登录时都会覆盖掉，所以通过 GDM 注销并重新登录同一个用户，将会造成丢失前一个会话的所有信息。</para>

      <para>注意，如果因为一些原因 GDM 不能创建这个文件，然后一个名为 <filename>~/.xsession-errors.XXXXXXXX</filename> 的备用文件将被创建，这个<filename>XXXXXXXX</filename>是一些随机字符。</para>
    </sect2>

    <sect2 id="fusa">
      <title>快速用户切换</title>

      <para>GDM 允许多个用户同时登录。一个用户登录以后，另一个用户可以使用 GNOME 面板上的 用户切换器登录，或者从 GNOME 屏幕保护的锁住屏幕上的“切换用户”按钮。进行中的会话可以使用同样的机制更改回来并且继续。注意，有些发行版可能没有默认在面板上添加用户切换器。您可以使用面板邮件快捷菜单添加它。</para>
      <para>注意，这个功能可以在支持虚拟终端的系统上使用。如果虚拟终端不可用，这个功能将不工作。</para>
    </sect2>
  </sect1>

  <!-- ============= Security ================================= -->

  <sect1 id="security">
    <title>安全</title>

    <sect2 id="gdmuser">
      <title>GDM 用户和组</title>

      <para>为了安全，建议用一个专用的用户和组 ID 来进行适当的操作。在大多数系统上，这个用户和组一般是“gdm”，但是可以被配置为任何一个用户或组。所有的 GDM 图形程序都以这个用户的身份运行，以使与用户交互的程序都运行在沙盒中。这个用户和组应该具有有限制的特权。</para>

      <para>“gdm”用户唯一需要的特权是读写 <filename>&lt;var&gt;/run/gdm</filename> 中的 Xauth 文件的能力。<filename>&lt;var&gt;/run/gdm</filename> 目录应该有 root:gdm 属主，以及 1777 的权限设置。</para>

      <para>
        You should not, under any circumstances, configure the GDM user/group
        to a user which a user could easily gain access to, such as the user
        <filename>nobody</filename>.  Any user who gains access to an Xauth
        key can snoop on and control running GUI programs running in the
        associated session or perform a denial-of-service attack on it.  It
        is important to ensure that the system is configured properly so that
        only the "gdm" user has access to these files and that it
        is not easy to login to this account.  For example, the account should
        be setup to not have a password or allow non-root users to login to the
        account.
      </para>

      <para>GDM 欢迎界面配置存储于 GConf 中。要允许 GDM 用户更改配置，就需要“gdm”用户有一个可写的 $HOME 目录。用户可以配置默认的 GConf 到希望的样子，以避免需要提供给“gdm”用户一个可写的 $HOME 目录。但是，如果不能写入状态信息到 GConf 配置，一些功能可能被禁用。</para>
    </sect2>

    <sect2 id="PAM">
      <title>PAM</title>

      <para>GDM 使用 PAM 作为登录认证。PAM 代表可插入的认证模块，被您计算机上大多数需要认证的程序使用。它允许管理员为不同的登录程序 (例如 ssh，登录界面，屏幕保护等) 配置特定的认证行为。</para>

      <para>PAM 是复杂和高度可配置的，本文档不打算在细节上解释这些。而是，它打算给出 PAM 配置与 GDM 有怎样的关系的一个概览，GDM 是怎样配置 PAM 的，以及已知的问题。需要操作 PAM 配置的人需要进一步阅读 PAM 文档，以理解怎样配置 PAM 和理解在这节中使用的条目。</para>
        
      <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>

      <para>注意，默认上，GDM 使用“gdm”这个 PAM 服务名作默认登录用，以及使用“gdm-autologin”PAM服务名作自动登录用。这些服务可能没有在您的 pam.d 或 pam.conf 配置文件中定义。如果没有这些条目，GDM 将使用默认的 PAM 行为。在大多数系统上，这应该可以工作的很好。但是，如果 gdm-autologin 服务没有定义，自动登录功能将可能不能失效。</para>

      <para><filename>PostLogin</filename> 脚本在 pam_open_session 被调用之前运行，<filename>PreSession</filename> 在其之后。这允许系统管理员向登录程序添加任何脚本，无论在 PAM 初始化会话之前还是之后。</para>

      <para>如果您想使 GDM 使用其他的认证机制(如 指纹或智能卡)，您应该使用希望使用的认证类型的 PAM 服务模块，而不是试图直接修改 GDM 的源代码。请阅读您系统上的 PAM 文档。怎样做到这一点经常在 <address><email>gdm-list@gnome.org</email></address> 邮件列表上讨论，所以，您可以参考这个列表的归档获取更多信息。</para>

      <para>为了能够同时使用多种认证方式，例如既可使用智能卡也可使用用户名和口令登录系统，PAM 做了一些限制。使这可以工作有一些技巧，当设置这种配置时，最好研究下这个问题一般是怎么解决的。</para>

      <para>如果自动登录在一个系统上不工作，检查在 PAM 配置文件中是否定义了“gdm-autologin”PAM 栈。为了使它工作，必须私用一个不做任何认证的 PAM 模块，或者简单的对它所有的公共界面返回 PAM_SUCCESS。假定您的系统上有个 pam_allow.so PAM模块可以做到这一点，启用“gdm-autologin”的 PAM 配置可能会类似这样：</para>

<screen>
       gdm-autologin auth  required    pam_unix_cred.so.1
       gdm-autologin auth  sufficient  pam_allow.so.1
       gdm-autologin account  sufficient  pam_allow.so.1
       gdm-autologin session  sufficient  pam_allow.so.1
       gdm-autologin password  sufficient  pam_allow.so.1
</screen>

      <para>
        The above setup will cause no lastlog entry to be generated.  If a
        lastlog entry is desired, then use the following for the session:
      </para>

<screen>
       gdm-autologin session required pam_unix_session.so.1
</screen>

      <para>如果计算机由多个人使用，这是自动登录就不合适了，您将可能希望允许一些用户不输入他们的口令就可以登录。这个功能可以作为单个用户选项，使用 gnome-system-tools 中的 users-admin 工具来启用；这由在要求口令之前检查用户是否 Unix 组“nopasswdlogin”的成员来实现。要使这可以工作，“gdm”服务的 PAM 配置文件必须包含类似于如下一行：</para>

<screen>
      gdm auth  sufficient  pam_succeed_if.so  user ingroup nopasswdlogin
</screen>

    </sect2>

    <sect2 id="utmpwtmp">
      <title>utmp 和 wtmp</title>

      <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>
    </sect2>

    <sect2 id="xauth">
      <title>Xserver 认证方案</title>

      <para>Xserver 认证文件存储于启动时 <filename>&lt;var&gt;/run/gdm</filename> 的一个新建的子目录。这些文件用于存储和在 X 客户端和 X 服务器之间共享“password”。这个“password”对于每次登录是唯一的，所以从一个会话的用户并不能窥探另一个会话上的用户。</para>

      <para>GDM 只支持 MIT-MAGIC-COOKIE-1 Xserver 认证方案。通常从其他方案获得的好处非常少，并且至今也没有实现它们做出的努力。尤其要小心地使用 XDMCP，因为 Xserver 认证 cookie 以明文通过线路。如果可以嗅探，攻击者就可以容易的在您登录时嗅探您的认证口令。</para>

    </sect2>

    <sect2 id="xdmcpsecurity">
      <title>XDMCP 安全</title>

      <para>即使您的显示受到 cookies 的保护，输入口令时的 XEvent 和因而的按键仍然是通过明文发送的。捕获它是很平常的。</para>

      <para>XDMCP 主要用于运行瘦客户机，比如在终端实验室。那些瘦客户机只需要到访问服务器的网络连接，于是使这些瘦客户机在一个外部不能访问的分离网络中并且只能连接到服务器好像是最好的安全策略。仅有的需要从外部访问的点就是服务器。这种设置绝不应该使用一个未管理的集线器或其他可嗅探的网络。</para>

    </sect2>

    <sect2 id="xdmcpaccess">
      <title>XDMCP 访问控制</title>

      <para>XDMCP 访问控制是使用的 TCP wrappers。不带 TCP wrappers 地编译 GDM 也是可以的，所以这个功能可能不被一些操作系统支持。</para>

      <para>您应该在文件  <filename>&lt;etc&gt;/hosts.allow</filename> 和 <filename>&lt;etc&gt;/hosts.deny</filename>中使用守护进程名字 <command>gdm</command>。例如要禁止从 <filename>.evil.domain</filename> 访问计算机，请添加</para>
<screen>
gdm: .evil.domain
</screen>
      <para>到 <filename>&lt;etc&gt;/hosts.deny</filename>。您也可能需要添加</para>
<screen>
gdm: .your.domain
</screen>
      <para>到您的 <filename>&lt;etc&gt;/hosts.allow</filename>，如果您通常禁止从所有主机的所有服务。参看 <ulink type="help" url="man:hosts.allow">hosts.allow(5)</ulink> 手册页以获取更多细节。</para>
    </sect2>

    <sect2 id="firewall">
      <title>防火墙安全</title>

      <para>即使是 GDM 尝试尽量智能地防止使攻击者 对 XDMCP 有机可乘，仍然建议您在您的防火墙上阻塞 XMDCP 端口(一般是 UDP 端口 177)，除非真的需要。GDM 防止拒绝服务攻击，但是 X 协议仍然继承了不安全，并且只应该在可控的环境中使用。同样，每个远程连接消耗许多资源，所以通过 XDMCP 进行拒绝服务攻击比攻击一个网页服务器容易的多。</para>

      <para>
        It is also wise to block all of the Xserver ports.  These are TCP
        ports 6000+ (one for each display number) on your firewall.  Note that
        GDM will use display numbers 20 and higher for flexible on-demand
        servers.
      </para>

      <para>X 在通过国际互联网使用时不是一个非常安全的协议，XDMCP 甚至更不安全。</para>
    </sect2>

    <sect2 id="policykit">
      <title>PolicyKit</title>

<!--
<para>
        TODO - Should we say more?
</para>
-->

      <para>GDM 可以配置为使用 PolicyKit，以允许系统管理员控制登录窗口是否应该在欢迎窗口提供关机和重启按钮。</para>

      <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>
 
    </sect2>

    <sect2 id="rbac">
      <title>RBAC (基于角色的访问控制)</title>

      <para>GDM 可以被设置为使用 RBAC 替代 PolicyKit。这是，RBAC 的配置将被用于控制登录窗口是否在欢迎屏幕提供关机和重启键。</para>

      <para>例如，在 Solaris 上，“solaris.system.shutdown”认证被用于控制此项。简单的修改 <filename>/etc/user_attr</filename> 文件，以使 “gdm”用户可以使用这个认证。</para>
    </sect2>

  </sect1>

  <!-- ============= ConsoleKit ================================ -->

  <sect1 id="consolekit">
    <title>ConsoleKit 的支持</title>

<!--
<para>
    TODO - Should we update these docs?  Probably should mention any 
           configuration that users may want to do for using it with GDM?
           If so, perhaps this section should be moved to a subsection of
           the "Configure" section?
</para>
-->

    <para>GDM 包含了对使用用户和会话登录框架，即所谓的ConsoleKit，发布用户登录信息的支持。ConsoleKit 可以跟踪所有的当前登录用户。在这个角度上看，它可以替代大多数类 Unix 操作系统上都有的 utmp 和 utmpx文件。</para>

    <para>当 GDM 将为用户创建一个新的登录进程，为了为此用户打开一个新会话它将调用 ConsoleKit 的一个特权方法。同时 GDM 也提供 ConsoleKit，并附随关于用户会话的信息，例如：用户 ID，将于会话关联的 X11 显示名，会话起源的主机名(在 XDMCP 会话时有用)，此会话是否连接等。就像启用用户会话的其它程序一样，GDM 处于特别的知晓用户会话和被信任并提供他们的信息的位置。这些特权方法的使用是受到使用 D-BUS 系统信息总线安全策略的限制的。</para>

    <para>当一个通过 GDM 认证的现存会话上的用户请求回复一个存在的会话，GDM 调用 ConsoleKit 的一个特权方法来解锁那个会话。关于那个会话收到解锁信号后发生的精确的细节是未定的和与会话有关的。但是，大多数会话会解锁一个屏保作为回应。</para>

    <para>当用户选择登出，或者 GDM 或会话异常退出，用户会话将从 ConsoleKit 注销。</para>
  </sect1>

  <!-- ============= Configuration ============================= -->

  <sect1 id="configuration">
    <title>配置</title>

    <para>GDM 有一些配置界面，包括脚本集成点、守护进程配置、欢迎界面配置、通用会话配置、与 gnome-settings-daemon 配置的集成以及会话配置。这些集成的细节在下边描述。</para>

    <sect2 id="scripting">
      <title>脚本集成点</title>
      
      <para>GDM 脚本集成点可以在 <filename>&lt;etc&gt;/gdm/</filename> 目录中找到：</para>

<screen>
Xsession
Init/
PostLogin/
PreSession/
PostSession/
</screen>

      <para><filename>Init</filename>，<filename>PostLogin</filename>， <filename>PreSession</filename>和 <filename>PostSession</filename> 脚本均按如下描述的运行。</para>

      <para>对于每一种脚本，默认被执行的那个被叫做“Default”并且存储在一个与脚本类型相关的目录中。于是，默认的 <filename>Init</filename> 脚本是 <filename>&lt;etc&gt;/gdm/Init/Default</filename>。可以提供一个对每个显示的脚本，如果存在，其将替代默认脚本运行。这样的脚本保存于和默认脚本相同的目录，并且以这个显示的 Xserver DISPLAY 值为文件名。例如，如果 <filename>&lt;Init&gt;/:0</filename> 脚本存在，其将为 DISPLAY “:0”运行。</para>

     <para>所有的这些脚本都使用 root 特权运行，运行成功时返回 0 ，如果有任何会导致登录会话结束的失败都会返回非零值。同样注意，GDM 将一直阻塞到脚本运行完毕，所以，如果这些脚本的任何一个挂起，都会导致登录进程挂起。</para>

      <para>当这个登录界面的 Xserver 成功启动，但是在登录图形界面的实际显示之前，GDM 将运行 <filename>Init</filename> 脚本。这个脚本在登录窗口显示之前需要启动程序时很有用，或者用于做必要的特定初始化。</para>

      <para>用户成功认证之后，GDM 将运行 <filename>PostLogin</filename> 脚本，这早于任何会话设置，包括早于调用 pam_open_session。这个脚本对需要在会话运行之前对会话进行初始化有用。例如，您可以设置用户的  $HOME 目录，如果需要的话。</para>

      <para>在用户会话初始化之后，GDM 将运行 <filename>PreSession</filename>脚本。这个脚本对需要在会话初始化之后进行的初始化有用。例如，它可用于会话管理或审计。</para>

      <para>当一个用户结束他的会话，GDM 将会运行 <filename>PostSession</filename> 脚本。注意 Xserver 在脚本运行时将会停止，所以它是不可访问的。</para>

      <para>注意，<filename>PostSession</filename> 将可能甚至在显示器因为 IO 错误或相关的错误没有反应是运行。于是，不保证在脚本执行时 X 程序运行。</para>

      <para>所有的上述脚本将设置 <filename>$RUNNING_UNDER_GDM</filename> 环境变量为值 <filename>yes</filename>。如果脚本也与其他显示管理器共享，这允许您定义 GDM 何时调用这些脚本，于是您可以在使用 GDM 时运行指定代码。</para>
    </sect2>

    <sect2 id="autostart">
      <title>自启动配置</title>
      
      <para>文件 <filename>&lt;share&gt;/gdm/autostart/LoginWindow</filename> 目录包含《FreeDesktop.org 桌面程序自启动规范》中规定的格式的文件。规范中的标准特性可以被用于指定应该自启动或只有设置了 GConf 配置值等的。</para>

      <para>
        Any <filename>.desktop</filename> files in this directory will cause
        the associated program to automatically start with the login GUI
        greeter.  By default, GDM is shipped with files which will autostart
        the gdm-simple-greeter login GUI greeter itself, the
        gnome-power-manager application, the gnome-settings-daemon, and the
        metacity window manager.  These programs are needed for the greeter
        program to work.  In addition, desktop files are provided for starting
        various AT programs if the configuration values specified in the
        Accessibility Configuration section below are set.
      </para>
    </sect2>

    <sect2 id="xsessionscript">
      <title>Xsession 脚本</title>

      <para>在 <filename>&lt;etc&gt;/gdm/Xsession</filename> 也有一个  <filename>Xsession</filename> 脚本，其在 <filename>PreSession</filename> 和 <filename>PostSession</filename> 之间被调用。这个脚本不像其他脚本那样支持为每个显示配置。这个脚本以用户名义运行，并且其将运行用户在桌面会话文件中选定启动的任何会话。</para>
    </sect2>

    <sect2 id="daemonconfig">
      <title>守护进程配置</title>

      <para>
        The GDM daemon is configured using the
        <filename>&lt;etc&gt;/gdm/custom.conf</filename> file.  Default
        values are stored in GConf in the <filename>gdm.schemas</filename>
        file.  It is recommended that end-users modify the
        <filename>&lt;etc&gt;/gdm/custom.conf</filename> file because the
        schemas file may be overwritten when the user updates their system to
        have a newer version of GDM.
      </para>

      <para>注意，旧版的 GDM 支持其他的配置选项，但是最新版的 GDM 已经不支持他们了。</para>

      <para><filename>&lt;etc&gt;/gdm/custom.conf</filename> 文件使用 <filename>keyfile</filename> 的格式。括号中的关键词定义了节组，等号(=)之前的字符串是键，等号数的值代表他们的值。空行或以 # 开始的行被忽略。</para>

      <para>
        The file <filename>&lt;etc&gt;/gdm/custom.conf</filename> supports the
        "[daemon]", "[security]", and "[xdmcp]"
        group sections.  Within each group, there are particular key/value
        pairs that can be specified to modify how GDM behaves.  For example,
        to enable timed login and specify the timed login user to be a user
        named "you", you would modify the file so it contains the
        following lines:
      </para>
     
<screen>
[daemon]
TimedLoginEnable=true
TimedLogin=you
</screen>

      <para>下边是支持的配置键全表：</para>

      <sect3 id="choosersection">
        <title>[chooser]</title>
        <variablelist>

          <varlistentry>
            <term>Multicast</term>
            <listitem>
              <synopsis>Multicast=false</synopsis>
              <para>如果为 true 且启用了 IPv6，chooser 将向本地网络发送一个多播请求然后收集已经加入多播组的机器的回应。</para>
            </listitem>
          </varlistentry>
         
          <varlistentry>
            <term>MulticastAddr</term>
            <listitem>
              <synopsis>MulticastAddr=ff02::1</synopsis>
              <para>
                This is the Link-local multicast address.
              </para>
            </listitem>
          </varlistentry>
        </variablelist>
      </sect3>

      <sect3 id="daemonsection">
        <title>[daemon]</title>
        <variablelist>
          <varlistentry>
            <term>启用定时自动登录</term>
            <listitem>
              <synopsis>TimedLoginEnable=false</synopsis>
              <para>
                 If the user given in <filename>TimedLogin</filename> should be
                logged in after a number of seconds (set with
                <filename>TimedLoginDelay</filename>) of inactivity on the
                login screen.  This is useful for public access terminals or
                perhaps even home use.  If the user uses the keyboard or
                browses the menus, the timeout will be reset to 
                <filename>TimedLoginDelay</filename> or 30 seconds, whichever 
                is higher.   If the user does not enter a username but just
                hits the ENTER key while the login program is requesting the
                username, then GDM will assume the user wants to login
                immediately as the timed user.  Note that no password will be
                asked for this user so you should be careful, although if using
                PAM it can be configured to require password entry before
                allowing login.  Refer to the "Security-&gt;PAM"
                section of the manual for more information, or for help if this
                feature does not seem to work.
              </para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>TimedLogin</term>
            <listitem>
              <synopsis>TimedLogin=</synopsis>
              <para>这是会在闲置指定的秒数之后自动登录的用户。</para>
              <para>
                If the value ends with a vertical bar | (the pipe symbol),
                then GDM will execute the program specified and use whatever
                value is returned on standard out from the program as the user.
                The program is run with the DISPLAY environment variable set so
                that it is possible to specify the user in a per-display
                fashion.  For example if the value is "/usr/bin/getloginuser|",
                then the program "/usr/bin/getloginuser" will be run to get the
                user value.
              </para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>TimedLoginDelay</term>
            <listitem>
              <synopsis>TimedLoginDelay=30</synopsis>
              <para>在 <filename>TimedLogin</filename> 用户登录之前等待的秒数。</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>AutomaticLoginEnable</term>
            <listitem>
              <synopsis>AutomaticLoginEnable=false</synopsis>
              <para>如果为 true，<filename>AutomaticLogin</filename>中指定的用户将会立即登录。这个特性就像使用延时为 0 秒的计时登录。</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>AutomaticLogin</term>
            <listitem>
              <synopsis>AutomaticLogin=</synopsis>
              <para>这是如果 <filename>AutomaticLoginEnable</filename> 为 true 时，会立即登录的用户。</para>
              <para>
                If the value ends with a vertical bar | (the pipe symbol),
                then GDM will execute the program specified and use whatever
                value is returned on standard out from the program as the user.
                The program is run with the DISPLAY environment variable set so
                that it is possible to specify the user in a per-display
                fashion.  For example if the value is "/usr/bin/getloginuser|",
                then the program "/usr/bin/getloginuser" will be run to get the
                user value.
              </para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>User</term>
            <listitem>
              <synopsis>User=gdm</synopsis>
              <para>
                The username under which the greeter and other GUI programs
                are run.  Refer to the <filename>Group</filename>
                configuration key and to the "Security-&gt;GDM User And
                Group" section of this document for more information.
              </para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>Group</term>
            <listitem>
              <synopsis>Group=gdm</synopsis>
              <para>
                The group name under which the greeter and other GUI programs
                are run.  Refer to the <filename>User</filename>
                configuration key and to the "Security-&gt;GDM User And
                Group" section of this document for more information.
              </para>
            </listitem>
          </varlistentry>
        </variablelist>
      </sect3>

      <sect3 id="debugsection">
        <title>Debug Options</title>
      
        <variablelist>
          <title>[debug]</title>
          
          <varlistentry>
            <term>Enable</term>
            <listitem>
              <synopsis>Enable=false</synopsis>
              <para>
                To enable debugging, set the debug/Enable key to
                "true" in the
                <filename>&lt;etc&gt;/gdm/custom.conf</filename>
                file and restart GDM.  Then debug output will be sent to the
                system log file (<filename>&lt;var&gt;/log/messages</filename>
                or <filename>&lt;var&gt;/adm/messages</filename> depending on
                your Operating System).
              </para>
            </listitem>
          </varlistentry>
        </variablelist>
      </sect3>

      <sect3 id="greetersection">
        <title>Greeter Options</title>
      
        <variablelist>
          <title>[greeter]</title>
          
          <varlistentry>
            <term>IncludeAll</term>
            <listitem>
              <synopsis>IncludeAll=true</synopsis>
              <para>
                If true, then the face browser will show all users on the local
                machine.  If false, the face browser will only show users who
                have recently logged in.
              </para>

              <para>
                When this key is true, GDM will call fgetpwent() to get a list
                of local users on the system.  Any users with a user id less
                than 500 (or 100 if running on Solaris) are filtered out.  The
                Face Browser also will display any users that have previously
                logged in on the system  (for example NIS/LDAP users).  It gets
                this list via calling the <command>ck-history</command>
                ConsoleKit interface.  It will also filter out any users which
                do not have a valid shell (valid shells are any shell that
                getusershell() returns - /sbin/nologin or /bin/false are
                considered invalid shells even if getusershell() returns them).
              </para>

              <para>
                If false, then GDM more simply only displays users that have
                previously logged in on the system (local or NIS/LDAP users) by
                calling the <command>ck-history</command> ConsoleKit interface.
              </para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>Include</term>
            <listitem>
              <synopsis>Include=</synopsis>
              <para>
                Set to a list of users to always include in the Face Browser.
                This value is set to a list of users separated by commas.  By
                default, the value is empty.
              </para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>Exclude</term>
            <listitem>
              <synopsis>Exclude=bin,root,daemon,adm,lp,sync,shutdown,halt,mail,news,uucp,operator,nobody,nobody4,noaccess,postgres,pvm,rpm,nfsnobody,pcap</synopsis>
              <para>
                Set to a list of users to always exclude in the Face Browser.
                This value is set to a list of users separated by commas.  Note
                that the setting in the <filename>custom.conf</filename>
                overrides the default value, so if you wish to add additional
                users to the list, then you need to set the value to the
                default value with additional users appended to the list.
              </para>
            </listitem>
          </varlistentry>
        </variablelist>
      </sect3>

      <sect3 id="securitysection">
        <title>安全选项</title>
      
        <variablelist>
          <title>[security]</title>
          
          <varlistentry>
            <term>DisallowTCP</term>
            <listitem>
              <synopsis>DisallowTCP=true</synopsis>
              <para>如果为 true,在启动关联的 Xservers 时将总是跟随 <filename>-nolisten tcp</filename> 到命令行，即禁用了 TCP 连接。这是一个更安全的配置，如果您不使用远程连接。</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </sect3>

      <sect3 id="xdmcpsection">
        <title>XDCMP 支持</title>

        <variablelist>
          <title>[xdmcp]</title>
          
          <varlistentry>
            <term>DisplaysPerHost</term>
            <listitem>
              <synopsis>DisplaysPerHost=1</synopsis>
              <para>为了防止攻击者填满等待队列，GDM 只允许一台远程计算机发起一个连接。如果希望为有多个显示器的计算机提供服务，您需要增加这个值。</para>

              <para>注意连接到本地的显示器数目允许值没有被限制。只有通过 XDMCP 的远程连接被这个配置选项限制。</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>Enable</term>
            <listitem>
              <synopsis>Enable=false</synopsis>
              <para>
                Setting this to true enables XDMCP support allowing remote
                displays/X terminals to be managed by GDM.
              </para>
            
              <para><filename>gdm</filename> 监听 UDP 177 端口的请求。参看 Port 选项以获取更多信息。</para>
              
              <para>如果 GDM 编译为支持它，从远程显示的访问可以使用 TCP Wrappers 库控制。服务名是 <filename>gdm</filename></para>
            
              <para>您应该添加 <screen>
gdm:.my.domain
</screen> 到您的 <filename>&lt;etc&gt;/hosts.allow</filename>, 依赖于您的 TCP Wrappers 配置. 参看 <ulink type="help" url="man:hosts.allow">hosts.allow</ulink> 手册页，=获取更多细节。</para>
              
              <para>请注意，XDMCP 不是一个相当安全的协议，使用防火墙堵住 UDP 的 177 端口是个好注意，除非您真的需要它。</para>
            </listitem>
          </varlistentry>
          
          <varlistentry>
            <term>HonorIndirect</term>
            <listitem>
              <synopsis>HonorIndirect=true</synopsis>
              <para>
                Enables XDMCP INDIRECT choosing (i.e. remote execution of
                <filename>gdmchooser</filename>) for X-terminals which do not
                supply their own display browser.
              </para>
            </listitem>
          </varlistentry>
        
          <varlistentry>
            <term>MaxPending</term>
            <listitem>
              <synopsis>MaxPending=4</synopsis>
              <para>为了避免拒绝服务攻击，GDM 固定了等待连接的队列的大小。只有 MaxPending 个显示可以同时开启。</para>
            
              <para>请注意，这个参数不限制可以管理的远程显示的数目，只限制同时启动的显示连接的数目。</para>
            </listitem>
          </varlistentry>
          
          <varlistentry>
            <term>MaxSessions</term>
            <listitem>
              <synopsis>MaxSessions=16</synopsis>
              <para>定义可同时管理的远程显示连接的最大数目，比如，您的主机上可以使用的远程显示的总数目。</para>
            </listitem>
          </varlistentry>
        
          <varlistentry>
            <term>MaxWait</term>
            <listitem>
              <synopsis>MaxWait=30</synopsis>
              <para>当 GDM 准备好管理一个显示，一个包含一个唯一的会话 ID 的 ACCEPT 包被发送给它，这个会话 ID 在将来的 XDMCP 交谈中使用。</para>
            
              <para>
                GDM will then place the session id in the pending queue
                waiting for the display to respond with a MANAGE request.
              </para>
            
              <para>如果在 MaxWait 秒内仍然没有反应，GDM 将声明显示器死机并且将其从等待队列中清除，为其他显示清理出槽。</para>
            </listitem>
          </varlistentry>
          
          <varlistentry>
            <term>MaxWaitIndirect</term>
            <listitem>
              <synopsis>MaxWaitIndirect=30</synopsis>
              <para>
                The MaxWaitIndirect parameter determines the maximum number of
                seconds between the time where a user chooses a host and the
                subsequent indirect query where the user is connected to the
                host.  When the timeout is exceeded, the information about the
                chosen host is forgotten and the indirect slot freed up for
                other displays.  The information may be forgotten earlier if
                there are more hosts trying to send indirect queries then
                <filename>MaxPendingIndirect</filename>.
              </para>
            </listitem>
          </varlistentry>
        
          <varlistentry>
            <term>PingIntervalSeconds</term>
            <listitem>
              <synopsis>PingIntervalSeconds=60</synopsis>
              <para>
                If the Xserver does not respond in the specified number of
                seconds, then the connection is stopped and the session ended.
                When this happens the slave daemon dies with an ALARM signal.
                Note that GDM 2.20 and earlier multiplied this setting by 2,
                so it may be necessary to increase the timeout if upgrading
                from GDM 2.20 and earlier to a newer version.
              </para>

              <para>
                Note that GDM in the past used to have a
                <filename>PingInterval</filename> configuration key which was
                also in minutes.  For most purposes you'd want this setting
                to be lower than one minute. However since in most cases where
                XDMCP would be used (such as terminal labs), a lag of more
                than 15 or so seconds would really mean that the terminal was
                turned off or restarted and you would want to end the session.
              </para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>Port</term>
            <listitem>
              <synopsis>Port=177</synopsis>
              <para><filename>gdm</filename> 会监听 XDMCP 请求的 UDP 端口号。不要更改这项，除非你很清楚你在干什么。</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>Willing</term>
            <listitem>
              <synopsis>Willing=&lt;etc&gt;/gdm/Xwilling</synopsis>
              <para>
                When the machine sends a WILLING packet back after a QUERY it
                sends a string that gives the current status of this server.
                The default message is the system ID, but it is possible to
                create a script that displays customized message.  If this
                script does not exist or this key is empty the default message
                is sent.  If this script succeeds and produces some output,
                the first line of it's output is sent (and only the first
                line).  It runs at most once every 3 seconds to prevent
                possible denial of service by flooding the machine with QUERY
                packets.
              </para>
            </listitem>
          </varlistentry>
        </variablelist>
      </sect3>
    </sect2>

    <sect2 id="greeterconfiguration">
        <title>简单欢迎界面配置。</title>

        <para>GDM 默认的欢迎界面被叫做简单的欢迎界面，并且通过 GConf 配置。默认上，值存储于 GConf 的 <filename>gdm-simple-greeter.schemas</filename> 文件。如果“gdm”用户有一个可写的 $HOME 目录来盛放 GConf 设置这些默认值将被覆盖。这些值可以使用 <command>gconftool-2</command> 或 <command>gconf-editor</command> 程序修改。下列的配置选项被支持：</para>

        <variablelist>
          <title>欢迎界面配置键</title>

          <varlistentry>
            <term>/apps/gdm/simple-greeter/banner_message_enable</term>
            <listitem>
              <synopsis>false (boolean)</synopsis>
              <para>控制旗帜信息文本是否显示。</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>/apps/gdm/simple-greeter/banner_message_text</term>
            <listitem>
              <synopsis>NULL (string)</synopsis>
              <para>指定在欢迎窗口显示文本旗帜消息</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>/apps/gdm/simple-greeter/disable_restart_buttons</term>
            <listitem>
              <synopsis>false (boolean)</synopsis>
              <para>控制是否在登录窗口显示重启按钮。</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>/apps/gdm/simple-greeter/disable_user_list</term>
            <listitem>
              <synopsis>false (boolean)</synopsis>
              <para>如果为 true，不在登录窗口显示已知用户的头像登录功能。</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>/apps/gdm/simple-greeter/logo_icon_name</term>
            <listitem>
              <synopsis>computer (string)</synopsis>
              <para>设置为要使用的主题图标名，以获取欢迎标志。</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>/apps/gdm/simple-greeter/recent-languages</term>
            <listitem>
              <synopsis>[] (string list)</synopsis>
              <para>
                Set to a list of languages to be shown by default in the login
                window.  Default value is "[]".  With the default setting only
                the system default language is shown and the option "Other..."
                which pops-up a dialog box showing a full list of available
                languages which the user can select.
              </para>

              <para>不希望用户手动更改这项设置，而是，GDM 跟踪在配置键中选中的任何语言，并且在语言组合框中与“其他...”一起单独显示他们。这种方式，使常用的语言可以容易的选择。</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>/apps/gdm/simple-greeter/recent-layouts</term>
            <listitem>
              <synopsis>[] (string list)</synopsis>
              <para>设置在默认的登录面板上显示的键盘布局的列表。默认值是“[]”。使用默认的配置时，只显示默认的键盘布局，其他的选项在“其他...”中，其弹出一个对话框，显示所有可用的键盘布局，以供用户选择。</para>

              <para>不希望用户手动更改这项设置，而是，GDM 跟踪在配置键中选中的任何语言布局，并且在键盘布局组合框中与“其他...”一起单独显示他们。这种方式，使常用的键盘布局可以容易的选择。</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>/apps/gdm/simple-greeter/wm_use_compiz</term>
            <listitem>
              <synopsis>false (boolean)</synopsis>
              <para>控制是否使用 compiz 替换 metacity 作为窗口管理器。</para>
            </listitem>
          </varlistentry>
        </variablelist>
    </sect2>

    <sect2 id="accessibilityconfiguration">
     <title>无障碍功能设置</title>

      <para>本节描述 GDM 可用的无障碍配置选项。</para>

      <sect3 id="accessibilitydialog">
        <title>GDM Accessibility Dialog And GConf Keys</title>

        <para>登录界面的 GDM 欢迎面板显示一个无障碍图标。点击这个图标，打开 GDM 无障碍对话框。在 GDM 无障碍对话框中，有一列复选框，用户可以启用或禁用相关的辅助选项。</para>

        <para>
         The checkboxes that correspond to the on-screen keyboard, screen
         magnifier and screen reader assistive tools act on the three GConf
         keys that are described in the next section of this document. By
         enabling or disabling these checkboxes, the associated GConf key is
         set to "true" or "false".  When the GConf key is set to true, the 
         assistive tools linked to this GConf key are launched.  When the 
         GConf key is set to "false", any running assistive tool linked to
         this GConf key are terminated.  These GConf keys are not automatically
         reset to a default state after the user has logged in.  Consequently,
         the assistive tools that were running during the last GDM login
         session will automatically be launched at the next GDM login session.
        </para>

        <para>
         The other checkboxes in the GDM Accessibility Dialog do not have
         corresponding GConf keys because no additional program is launched to
         provide the accessibility features that they offer.  These other
         options correspond to accessibility features that are provided by the
         Xserver, which is always running during the GDM session.
        </para>
      </sect3>

      <sect3 id="accessibilitygconfconfiguration">
        <title>无障碍 GConf 键</title>

        <para>GDM 提供如下的 GConf 键来控制它的无障碍功能：</para>

        <variablelist>
          <title>GDM 配置键</title>

          <varlistentry>
            <term>/desktop/gnome/interface/accessibility</term>
            <listitem>
              <synopsis>false (boolean)</synopsis>
              <para>控制无障碍设施是否由 GDM 图形界面启动。这被许多无障碍程序的工作所需要。</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>/desktop/gnome/applications/at/screen_magnifier_enabled</term>
            <listitem>
              <synopsis>false (boolean)</synopsis>
              <para>如果设置了，链接到 GConf 键的辅助工具将随着 GDM 图形界面程序启动。默认这是一个屏幕放大镜程序。</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>/desktop/gnome/applications/at/screen_keyboard_enabled</term>
            <listitem>
              <synopsis>false (boolean)</synopsis>
              <para>如果设置了，链接到 GConf 键的辅助工具将随着 GDM 图形界面程序启动。默认这是一个屏幕键盘程序。</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>/desktop/gnome/applications/at/screen_reader_enabled</term>
            <listitem>
              <synopsis>false (boolean)</synopsis>
              <para>如果设置了，链接到 GConf 键的辅助工具将随着 GDM 图形界面程序启动。默认这是一个屏幕阅读程序。</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </sect3>

      <sect3 id="accessibilitytoolsconfiguration">
        <title>链接 GConf 键到无障碍工具</title>

        <para>
         For the screen_magnifier_enabled, the screen_keyboard_enabled, and the
         screen_reader_enabled GConf keys, the assistive tool which gets
         launched depends on the desktop files located in the GDM autostart
         directory as described in the "Autostart Configuration" section of
         this manual.  Any desktop file in the GDM autostart directory can be
         linked to these GConf key via specifying that GConf key in the
         AutostartCondition value in the desktop file.  So the exact
         AutostartCondition line in the desktop file could be one of the
         following:
        </para>

<screen>
AutostartCondition=GNOME /desktop/gnome/applications/at/screen_keyboard_enabled
AutostartCondition=GNOME /desktop/gnome/applications/at/screen_magnifier_enabled
AutostartCondition=GNOME /desktop/gnome/applications/at/screen_reader_enabled
</screen>

        <para>
         When an accessibility key is true, then any program which is linked to
         that key in a GDM autostart desktop file will be launched (unless the
         Hidden key is set to true in that desktop file).  A single GConf key
         can even start multiple assistive tools if there are multiple desktop
         files with this AutostartCondition in the GDM autostart directory.
        </para>
      </sect3>

      <sect3 id="accessibilitytoolexample">
        <title>修改无障碍工具配置的例子</title>

        <para>
         For example, if GNOME is distributed with GOK as the default on-screen
         keyboard, then this could be replaced with a different program if
         desired.  To replace GOK with the on-screen keyboard application
         "onboard" and additionally activate the assistive tool "mousetweaks"
         for dwelling support, then the following configuration is needed.
        </para>

        <para>
         Create a desktop file for onboard and a second one for mousetweaks;
         for example, onboard.desktop and mousetweaks.desktop. These files
         must be placed in the GDM autostart directory and be in the format
         as explained in the "Autostart Configuration" section of this
         document.
        </para>

        <para>下边是作为例子的 <filename>onboard.desktop</filename> 文件：</para>

<screen>
[Desktop Entry]
Encoding=UTF-8
Name=Onboard 屏幕键盘
Comment=使用屏幕键盘
TryExec=onboard
Exec=onboard --size 500x180 -x 20 -y 10
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Accessibility;
AutostartCondition=GNOME /desktop/gnome/applications/at/screen_keyboard_enabled
</screen>

        <para>下边是一个作为例子的 <filename>mousetweaks.desktop</filename> 文件：</para>

<screen>
[Desktop Entry]
Encoding=UTF-8
Name=Software Mouse-Clicks
Comment=Perform clicks by dwelling with the pointer
TryExec=mousetweaks
Exec=mousetweaks --enable-dwell -m window -c -x 20 -y 240 
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Accessibility;
AutostartCondition=GNOME /desktop/gnome/applications/at/screen_keyboard_enabled
</screen>

        <para>
         Note the line with the AutostartCondition that links both desktop
         files to the GConf key for the on-screen keyboard.
        </para>

        <para>
         To disable GOK from starting, the desktop file for the GOK on-screen
         keyboard must be removed or deactivated.  Otherwise onboard and GOK
         would simultaneously be started.  This can be done by removing the
         gok.desktop file from the GDM autostart directory, or by adding the
         "Hidden=true" key setting to the gok.desktop file.
        </para>

        <para>
         After making these changes, GOK will no longer be started when the
         user activates the on-screen keyboard in the GDM session; but onboard
         and mousetweaks will instead be launched.
        </para>
      </sect3>
    </sect2>

    <sect2 id="generalsessionconfig">
      <title>通用会话设置</title>
<!--
<para>
          TODO - I think this section should be expanded upon.  What specific
                 keys are of interest, or would some users be likely to want
                 to configure?  Also, would be good to be more specific about
                 how lock down management is handled.
</para>
-->
        <para>
          The GDM Greeter uses some of the same framework that your desktop
          session will use. And so, it is influenced by a number of the same
          GConf settings. For each of these settings the Greeter will use the
          default value unless it is specifically overridden by a) GDM's
          installed mandatory policy b) system mandatory policy. GDM installs
          its own mandatory policy to lock down some settings for security.
        </para>
    </sect2>

    <sect2 id="gnomesettingsdaemon">
      <title>GNOME 设置守护进程</title>
<!--
<para>
          TODO - I think this section should be expanded upon.  What specific
                 keys are of interest, or would some users be likely to want
                 to configure?  Also, would be good to give a more complete
                 list of plugins that users might want to consider disabling.
                 Also, shouldn't we list the sound/active key in the Greeter
                 configuration setting?  Oddly I do not find this key used
                 in anything but the chooser in SVN.
</para>
-->

        <para>GDM 启用了 gnome-settings-daemon 的下列插件：a11y-keyboard, background, sound, xsettings。</para>

        <para>他们负责例如背景图片，字体和主题设置，声音事件等。</para>

        <para>也可以使用 GConf 禁用插件。例如，如果您想禁用声音插件，就可以不设置下边这个键：<filename>/apps/gdm/simple-greeter/settings-manager-plugins/sound/active</filename>。</para>
    </sect2>

    <sect2 id="sessionconfig">
      <title>GDM 会话配置</title>

      <para>
        GDM sessions are specified using the FreeDesktop.org Desktop Entry
        Specification, which can be referenced at the following URL:
        <ulink url="http://www.freedesktop.org/wiki/Specifications/desktop-entry-spec">
        http://www.freedesktop.org/wiki/Specifications/desktop-entry-spec</ulink>.
      </para>

      <para>
        By default, GDM will install desktop files in the
        <filename>&lt;share&gt;/xsessions</filename> directory.  GDM will
        search the following directories in this order to find desktop files:
        <filename>&lt;etc&gt;/X11/sessions/</filename>,
        <filename>&lt;dmconfdir&gt;/Sessions</filename>, 
        <filename>&lt;share&gt;/xsessions</filename>, and
        <filename>&lt;share&gt;/gdm/BuiltInSessions</filename>.  By default the
        <filename>&lt;dmconfdir&gt;</filename> is set to
        <filename>&lt;etc&gt;/dm/</filename> unless GDM is configured to use
        a different directory via the "--with-dmconfdir" option.
      </para>

      <para>
        A session can be disabled by editing the desktop file and adding a line
        as follows: <filename>Hidden=true</filename>.
      </para>

      <para>
        GDM desktop files support a GDM-specific extension, a key named
        "X-GDM-BypassXsession".  If the key is not specified in a
        desktop file, the value defaults to "false".  If this key is
        specified to be "true" in a desktop file, then GDM will
        launch the program specified by the desktop file "Exec" key
        directly when starting the user session.  It will not run the program
        via the <filename>&lt;etc&gt;/gdm/Xsession</filename> script, which is
        the normal behavior.  Since bypassing the
        <filename>&lt;etc&gt;/gdm/Xsession</filename> script avoids setting up
        the user session with the normal system and user settings, sessions
        started this way can be useful for debugging problems in the system or
        user scripts that might be preventing a user from being able to start
        a session.
      </para>

    </sect2>

    <sect2 id="userconfig">
      <title>GDM 用户会话和语言配置</title>
      <para>
        The user's default session and language choices are stored in the
        <filename>~/.dmrc</filename> file.  When a user logs in for the first
        time, this file is created with the user's initial choices.  The user
        can change these default values by simply changing to a different value
        when logging in.  GDM will remember this change for subsequent logins.
      </para>

      <para>
        The <filename>~/.dmrc</filename> file is in the standard
        <filename>INI</filename> format.  It has one section called
        <filename>[Desktop]</filename> which has two keys:
        <filename>Session</filename> and <filename>Language</filename>.
      </para>

      <para>
        The <filename>Session</filename> key specifies the basename of the
        session <filename>.desktop</filename> file that the user wishes to
        normally use without the <filename>.desktop</filename> extension.
        The <filename>Language</filename> key specifies the language that the
        user wishes to use by default.  If either of these keys is missing, the
        system default is used.  The file would normally look as follows:
      </para>

<screen>
[Desktop]
Session=gnome
Language=cs_CZ.UTF-8
</screen>
    </sect2>

  </sect1>

  <!-- ============= GDM Commands ============================= -->

  <sect1 id="binaries">
    <title>GDM 命令</title>

    <sect2 id="sbindir_binaries">
      <title>GDM 根用户命令</title>

      <para>GDM 包在<filename>sbindir</filename>中提供了下列供根用户使用的命令：</para>

      <sect3 id="gdmcommandline">
        <title><command>gdm</command> 和 <command>gdm-binary</command>命令行选项</title>

        <para>
          The <command>gdm</command> command is really just a script which
          runs the <command>gdm-binary</command>, passing along any options.
          Before launching <command>gdm-binary</command>, the gdm wrapper
          script will source the <filename>&lt;etc&gt;/profile</filename> file
          to set the standard system environment variables.  In order to better
          support internationalization, it will also set the LC_MESSAGES
          environment variable to LANG if neither LC_MESSAGES or LC_ALL are
          set.  The <command>gdm-binary</command> is the actual GDM daemon.
        </para>

        <variablelist>
          <title><command>gdm</command> 和 <command>gdm-binary</command>命令行选项</title>

          <varlistentry>
            <term>-?, --help</term>
            <listitem>
              <para>给出命令行选项的一个简单概述。</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>--fatal-warnings</term>
            <listitem>
              <para>使所有的警告都可以造成 GDM 退出。</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>--timed-exit</term>
            <listitem>
              <para>30秒之后退出，对调试有用。</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>--version</term>
            <listitem>
              <para>显示 GDM 守护进程的版本。</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </sect3>

      <sect3 id="gdmrestartcommandline">
        <title><command>gdm-restart</command> 命令行选项</title>

        <para><command>gdm-restart</command> 通过给 GDM 守护京城一个 HUP 信号停止并重启 GDM。这个命令将立即结束会话并且注销当前使用 GDM 登录的用户。</para>
      </sect3>

      <sect3 id="gdmsaferestartcommandline">
        <title><command>gdm-safe-restart</command> 命令行选项</title>
  
        <para><command>gdm-safe-restart</command> 通过给 GDM 守护进程一个 USR1 信号停止并重启 GDM。GDM 将在所有用户注销之后重启。</para>
      </sect3>

      <sect3 id="gdmstopcommandline">
        <title><command>gdm-stop</command> 命令行选项</title>

        <para><command>gdm-stop</command> 通过给 GDM 守护进程一个 TERM 信号停止GDM。</para>
      </sect3>
    </sect2>
  </sect1>

  <!-- ============= Troubleshooting =========================== -->

  <sect1 id="troubleshooting">
    <title>疑难解答</title>
<!--
<para>
      TODO - any other tips we should add?  Might be useful to highlight any
             common D-Bus configuration issues?
</para>
-->

    <para>
      This section discusses helpful tips for getting GDM working.  In general,
      if you have a problem using GDM, you can submit a bug or send an email
      to the gdm-list mailing list.  Information about how to do this is in
      the Introduction section of the document.
    </para>

    <para>
      If GDM is failing to work properly, it is always a good idea to include
      debug information.  To enable debugging, set the debug/Enable key to
      "true" in the <filename>&lt;etc&gt;/gdm/custom.conf</filename>
      file and restart GDM.  Then use GDM to the point where it fails, and
      debug output will be sent to the system log file
      (<filename>&lt;var&gt;/log/messages</filename> or
      <filename>&lt;var&gt;/adm/messages</filename> depending on your Operating
      System).  If you share this output with the GDM community via a bug
      report or email, please only include the GDM related debug information
      and not the entire file since it can be large.  If you do not see any
      GDM syslog output, you may need to configure syslog (refer to the
      <ulink type="help" url="man:syslog">syslog</ulink> man page).
    </para>

    <sect2 id="wontstart">
      <title>GDM 将不会启动</title>

      <para>
         There are a many problems that can cause GDM to fail to start, but
         this section will discuss a few common problems and how to approach
         tracking down a problem with GDM starting.   Some problems will 
         cause GDM to respond with an error message or dialog when it tries
         to start, but it can be difficult to track down problems when GDM
         fails silently.
      </para>

      <para>
         First make sure that the Xserver is configured properly.  The 
         GDM configuration file contains a command in the [server-Standard]
         section that is used for starting the Xserver.  Verify that this
         command works on your system.  Running this command from the 
         console should start the Xserver.  If it fails, then the problem
         is likely with your Xserver configuration.  Refer to your Xserver
         error log for an idea of what the problem may be.  The problem may
         also be that your Xserver requires different command-line options.
         If so, then modify the Xserver command in the GDM configuration file
         so that it is correct for your system.
      </para>

      <para>
         Also make sure that the <filename>/tmp</filename> directory has
         reasonable ownership and permissions, and that the machine's file
         system is not full.  These problems will cause GDM to fail to start.
      </para>
    </sect2>
  </sect1>

  <!-- ============= Application License ============================= -->

  <sect1 id="license">
    <title>许可证</title>
    <para>本程序是自由软件；您可以在自由软件基金会发布的 <ulink type="help" url="gnome-help:gpl"><citetitle>GNU 通用公共许可证</citetitle></ulink>下重新发布或修改它；许可证应使用第二版本或您所选择的更新的版本。</para>
    <para>本程序的发布是希望它能够对你有所帮助，但是没有任何保证；包括商业适用性的默示担保以及特定目的适用性。查阅<citetitle> GNU 通用公共许可证</citetitle>以了解更多内容。</para>
    <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>
  </sect1>
</article>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:t
sgml-parent-document:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->
