📄 x-xdm.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="generator" content="HTML Tidy, see www.w3.org" /><title>The X Display Manager</title><meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.7" /><link rel="HOME" title="FreeBSD Handbook" href="index.html" /><link rel="UP" title="The X Window System" href="x11.html" /><link rel="PREVIOUS" title="Using Fonts in X11" href="x-fonts.html" /><link rel="NEXT" title="Desktop Environments" href="x11-wm.html" /><link rel="STYLESHEET" type="text/css" href="docbook.css" /></head><body class="SECT1" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#840084"alink="#0000FF"><div class="NAVHEADER"><table summary="Header navigation table" width="100%" border="0" cellpadding="0"cellspacing="0"><tr><th colspan="3" align="center">FreeBSD Handbook</th></tr><tr><td width="10%" align="left" valign="bottom"><a href="x-fonts.html"accesskey="P">Prev</a></td><td width="80%" align="center" valign="bottom">Chapter 5 The X Window System</td><td width="10%" align="right" valign="bottom"><a href="x11-wm.html"accesskey="N">Next</a></td></tr></table><hr align="LEFT" width="100%" /></div><div class="SECT1"><h1 class="SECT1"><a id="X-XDM" name="X-XDM">5.6 The X Display Manager</a></h1><i class="AUTHORGROUP"><span class="CONTRIB">Contributed by</span> Seth Kingsley.</i> <div class="SECT2"><h2 class="SECT2"><a id="AEN6719" name="AEN6719">5.6.1 Overview</a></h2><p>The X Display Manager (<b class="APPLICATION">XDM</b>) is an optional part of the XWindow System that is used for login session management. This is useful for several typesof situations, including minimal ``X Terminals'', desktops, and large network displayservers. Since the X Window System is network and protocol independent, there are a widevariety of possible configurations for running X clients and servers on differentmachines connected by a network. <b class="APPLICATION">XDM</b> provides a graphicalinterface for choosing which display server to connect to, and entering authorizationinformation such as a login and password combination.</p><p>Think of <b class="APPLICATION">XDM</b> as providing the same functionality to theuser as the <a href="http://www.FreeBSD.org/cgi/man.cgi?query=getty&sektion=8"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">getty</span>(8)</span></a> utility (see<a href="term.html#TERM-CONFIG">Section 20.3.2</a> for details). That is, it performssystem logins to the display being connected to and then runs a session manager on behalfof the user (usually an X window manager). <b class="APPLICATION">XDM</b> then waits forthis program to exit, signaling that the user is done and should be logged out of thedisplay. At this point, <b class="APPLICATION">XDM</b> can display the login and displaychooser screens for the next user to login.</p></div><div class="SECT2"><h2 class="SECT2"><a id="AEN6735" name="AEN6735">5.6.2 Using XDM</a></h2><p>The <b class="APPLICATION">XDM</b> daemon program is located in <ttclass="FILENAME">/usr/X11R6/bin/xdm</tt>. This program can be run at any time as <ttclass="USERNAME">root</tt> and it will start managing the X display on the local machine.If <b class="APPLICATION">XDM</b> is to be run every time the machine boots up, aconvenient way to do this is by adding an entry to <tt class="FILENAME">/etc/ttys</tt>.For more information about the format and usage of this file, see <ahref="term.html#TERM-ETCTTYS">Section 20.3.2.1</a>. There is a line in the default <ttclass="FILENAME">/etc/ttys</tt> file for running the <b class="APPLICATION">XDM</b>daemon on a virtual terminal:</p><pre class="SCREEN">ttyv8 "/usr/X11R6/bin/xdm -nodaemon" xterm off secure</pre><p>By default this entry is disabled; in order to enable it change field 5 from <varclass="LITERAL">off</var> to <var class="LITERAL">on</var> and restart <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=init&sektion=8"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">init</span>(8)</span></a> using thedirections in <a href="term.html#TERM-HUP">Section 20.3.2.2</a>. The first field, thename of the terminal this program will manage, is <var class="LITERAL">ttyv8</var>. Thismeans that <b class="APPLICATION">XDM</b> will start running on the 9th virtualterminal.</p></div><div class="SECT2"><h2 class="SECT2"><a id="AEN6756" name="AEN6756">5.6.3 Configuring XDM</a></h2><p>The <b class="APPLICATION">XDM</b> configuration directory is located in <ttclass="FILENAME">/usr/X11R6/lib/X11/xdm</tt>. In this directory there are several filesused to change the behavior and appearance of <b class="APPLICATION">XDM</b>. Typicallythese files will be found:</p><div class="INFORMALTABLE"><a id="AEN6762" name="AEN6762"></a><table border="0" frame="void" class="CALSTABLE"><col /><col /><thead><tr><th>File</th><th>Description</th></tr></thead><tbody><tr><td><tt class="FILENAME">Xaccess</tt></td><td>Client authorization ruleset.</td></tr><tr><td><tt class="FILENAME">Xresources</tt></td><td>Default X resource values.</td></tr><tr><td><tt class="FILENAME">Xservers</tt></td><td>List of remote and local displays to manage.</td></tr><tr><td><tt class="FILENAME">Xsession</tt></td><td>Default session script for logins.</td></tr><tr><td><tt class="FILENAME">Xsetup_</tt>*</td><td>Script to launch applications before the login interface.</td></tr><tr><td><tt class="FILENAME">xdm-config</tt></td><td>Global configuration for all displays running on this machine.</td></tr><tr><td><tt class="FILENAME">xdm-errors</tt></td><td>Errors generated by the server program.</td></tr><tr><td><tt class="FILENAME">xdm-pid</tt></td><td>The process ID of the currently running XDM.</td></tr></tbody></table></div><p>Also in this directory are a few scripts and programs used to set up the desktop when<b class="APPLICATION">XDM</b> is running. The purpose of each of these files will bebriefly described. The exact syntax and usage of all of these files is described in <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=xdm&sektion=1&manpath=XFree86+4.4.0"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">xdm</span>(1)</span></a>.</p><p>The default configuration is a simple rectangular login window with the hostname ofthe machine displayed at the top in a large font and ``Login:'' and ``Password:'' promptsbelow. This is a good starting point for changing the look and feel of <bclass="APPLICATION">XDM</b> screens.</p><div class="SECT3"><h3 class="SECT3"><a id="AEN6810" name="AEN6810">5.6.3.1 Xaccess</a></h3><p>The protocol for connecting to <b class="APPLICATION">XDM</b> controlled displays iscalled the X Display Manager Connection Protocol (XDMCP). This file is a ruleset forcontrolling XDMCP connections from remote machines. By default, it allows any client toconnect, but that does not matter unless the <tt class="FILENAME">xdm-config</tt> ischanged to listen for remote connections.</p></div><div class="SECT3"><h3 class="SECT3"><a id="AEN6815" name="AEN6815">5.6.3.2 Xresources</a></h3><p>This is an application-defaults file for the display chooser and the login screens.This is where the appearance of the login program can be modified. The format isidentical to the app-defaults file described in the X11 documentation.</p></div><div class="SECT3"><h3 class="SECT3"><a id="AEN6818" name="AEN6818">5.6.3.3 Xservers</a></h3><p>This is a list of the remote displays the chooser should provide as choices.</p></div><div class="SECT3"><h3 class="SECT3"><a id="AEN6821" name="AEN6821">5.6.3.4 Xsession</a></h3><p>This is the default session script for <b class="APPLICATION">XDM</b> to run after auser has logged in. Normally each user will have a customized session script in <ttclass="FILENAME">~/.xsession</tt> that overrides this script.</p></div><div class="SECT3"><h3 class="SECT3"><a id="AEN6826" name="AEN6826">5.6.3.5 Xsetup_*</a></h3><p>These will be run automatically before displaying the chooser or login interfaces.There is a script for each display being used, named <tt class="FILENAME">Xsetup_</tt>followed by the local display number (for instance <tt class="FILENAME">Xsetup_0</tt>).Typically these scripts will run one or two programs in the background such as <ttclass="COMMAND">xconsole</tt>.</p></div><div class="SECT3"><h3 class="SECT3"><a id="AEN6832" name="AEN6832">5.6.3.6 xdm-config</a></h3><p>This contains settings in the form of app-defaults that are applicable to everydisplay that this installation manages.</p></div><div class="SECT3"><h3 class="SECT3"><a id="AEN6835" name="AEN6835">5.6.3.7 xdm-errors</a></h3><p>This contains the output of the X servers that <b class="APPLICATION">XDM</b> istrying to run. If a display that <b class="APPLICATION">XDM</b> is trying to start hangsfor some reason, this is a good place to look for error messages. These messages are alsowritten to the user's <tt class="FILENAME">~/.xsession-errors</tt> file on a per-sessionbasis.</p></div></div><div class="SECT2"><h2 class="SECT2"><a id="AEN6841" name="AEN6841">5.6.4 Running a Network DisplayServer</a></h2><p>In order for other clients to connect to the display server, edit the access controlrules, and enable the connection listener. By default these are set to conservativevalues. To make <b class="APPLICATION">XDM</b> listen for connections, first comment outa line in the <tt class="FILENAME">xdm-config</tt> file:</p><pre class="SCREEN">! SECURITY: do not listen for XDMCP or Chooser requests! Comment out this line if you want to manage X terminals with xdmDisplayManager.requestPort: 0</pre><p>and then restart <b class="APPLICATION">XDM</b>. Remember that comments inapp-defaults files begin with a ``!'' character, not the usual ``#''. More strict accesscontrols may be desired. Look at the example entries in <ttclass="FILENAME">Xaccess</tt>, and refer to the <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=xdm&sektion=1&manpath=XFree86+4.4.0"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">xdm</span>(1)</span></a> manualpage.</p></div><div class="SECT2"><h2 class="SECT2"><a id="AEN6855" name="AEN6855">5.6.5 Replacements for XDM</a></h2><p>Several replacements for the default <b class="APPLICATION">XDM</b> program exist. Oneof them, <b class="APPLICATION">kdm</b> (bundled with <b class="APPLICATION">KDE</b>) isdescribed later in this chapter. The <b class="APPLICATION">kdm</b> display manageroffers many visual improvements and cosmetic frills, as well as the functionality toallow users to choose their window manager of choice at login time.</p></div></div><div class="NAVFOOTER"><hr align="LEFT" width="100%" /><table summary="Footer navigation table" width="100%" border="0" cellpadding="0"cellspacing="0"><tr><td width="33%" align="left" valign="top"><a href="x-fonts.html"accesskey="P">Prev</a></td><td width="34%" align="center" valign="top"><a href="index.html"accesskey="H">Home</a></td><td width="33%" align="right" valign="top"><a href="x11-wm.html"accesskey="N">Next</a></td></tr><tr><td width="33%" align="left" valign="top">Using Fonts in X11</td><td width="34%" align="center" valign="top"><a href="x11.html" accesskey="U">Up</a></td><td width="33%" align="right" valign="top">Desktop Environments</td></tr></table></div><p align="center"><small>This, and other documents, can be downloaded from <ahref="ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/">ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/</a>.</small></p><p align="center"><small>For questions about FreeBSD, read the <ahref="http://www.FreeBSD.org/docs.html">documentation</a> before contacting <<ahref="mailto:questions@FreeBSD.org">questions@FreeBSD.org</a>>.<br />For questions about this documentation, e-mail <<ahref="mailto:doc@FreeBSD.org">doc@FreeBSD.org</a>>.</small></p></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -