<para>This chapter documents the files that control &tdm;'s behaviour. Some of this can be also controlled from the &kcontrol; module, but not all.</para>
<title>&tdmrc; - The &tdm; master configuration file</title>
<para>The basic format of the file is <quote>INI-like</quote>. Options are key/value pairs, placed in sections. Everything in the file is case sensitive. Syntactic errors and unrecognised key/section identifiers cause &tdm; to issue non-fatal error messages.</para>
<para>Lines beginning with <literal>#</literal> are comments; empty lines are ignored as well.</para>
<para>Sections are denoted by <literal>[</literal><replaceable>Name of Section</replaceable><literal>]</literal>. </para>
<para>You can configure every X-display individually.</para>
<para>Every display has a display name, which consists of a host name (which is empty for local displays specified in the Xservers file), a colon and a display number. Additionally, a display belongs to a display class (which can be ignored in most cases).</para>
<para>Sections with display-specific settings have the formal syntax <literal>[X-</literal> <replaceable>host</replaceable> [ <literal>:</literal> <replaceable>number</replaceable> [ <literal>_</literal> <replaceable>class</replaceable> ] ] <literal>-</literal> <replaceable>sub-section</replaceable> <literal>]</literal> </para>
<para>All sections with the same <replaceable>sub-section</replaceable> make up a section class.</para>
<para>You can use the <literal>*</literal> wildcard for <replaceable>host</replaceable>, <replaceable>number</replaceable> and <replaceable>class</replaceable>. You may omit trailing components; they are assumed to be <literal>*</literal> then. The host part may be a domain specification like <replaceable>.inf.tu-dresden.de</replaceable>.</para>
<para>From which section a setting is actually taken is determined by these rules:</para>
<para>The format for all keys is <userinput><option><replaceable>key</replaceable></option> <literal>=</literal> <parameter>value</parameter></userinput>. Keys are only valid in the section class they are defined for. Some keys do not apply to particular displays, in which case they are ignored. </para>
<note><para>A pristine &tdmrc; is very thoroughly commented. All comments will be lost if you change this file with the kcontrol frontend.</para></note>
<para>This option exists solely for the purpose of clean automatic upgrades. <emphasis>Do not</emphasis> change it, you may interfere with future upgrades and this could result in &tdm; failing to run. </para>
<para>If the value starts with a slash (/), it specifies a file to read &X-Server; definitions from; otherwise, it is an &X-Server; definition by itself. See <xref linkend="tdmrc-xservers"/> for the details. </para><para>The default is an &X-Server; definition that is usually reasonable for the system on which &tdm; was built. </para>
<para>List of Virtual Terminals to allocate to &X-Server;s. For negative numbers the absolute value is used, and the <acronym>VT</acronym> will be allocated only if the kernel says it is free. If &tdm; exhausts this list, it will allocate free <acronym>VT</acronym>s greater than the absolute value of the last entry in this list. </para>
<para>The filename specified will be created to contain an ASCII representation of the process ID of the main &tdm; process; the PID will not be stored if the filename is empty. </para>
<para>This names a directory under which &tdm; stores &X-Server; authorisation files while initialising the session. &tdm; expects the system to clean up this directory from stale files on reboot. </para><para>The authorisation file to be used for a particular display can be specified with the <option>AuthFile</option> option in [X-*-Core]. </para>
<para>The default is <quote>/var/run/xauth</quote>.</para>
<para>Additional environment variables &tdm; should pass on to all programs it runs. <envar>LD_LIBRARY_PATH</envar> and <envar>XCURSOR_THEME</envar> are good candidates; otherwise, it should not be necessary very often. </para>
<para>If the system has no native entropy source like /dev/urandom (see <option>RandomDevice</option>) and no entropy daemon like EGD (see <option>PrngdSocket</option> and <option>PrngdPort</option>) is running, &tdm; will fall back to its own pseudo-random number generator that will, among other things, successively checksum parts of this file (which, obviously, should change frequently). </para><para>This option does not exist on Linux and various BSDs. </para>
<para>The default is <quote>/dev/mem</quote>.</para>
<para>If the system has no native entropy source like /dev/urandom (see <option>RandomDevice</option>), read random data from a Pseudo-Random Number Generator Daemon, like EGD (http://egd.sourceforge.net) via this UNIX domain socket. </para><para>This option does not exist on Linux and various BSDs. </para>
<para>The path to a character device which TDM should read random data from. Empty means to use the system's preferred entropy device if there is one. </para><para>This option does not exist on OpenBSD, as it uses the arc4_random function instead. </para>
<para>The directory in which &tdm; should store persistent working data; such data is, for example, the previous user that logged in on a particular display. </para>
<para>The default is <quote>/var/lib/tdm</quote>.</para>
<para>The directory in which &tdm; should store users' <filename>.dmrc</filename> files. This is only needed if the home directories are not readable before actually logging in (like with AFS). </para>
<para>This indicates the UDP port number which &tdm; uses to listen for incoming &XDMCP; requests. Unless you need to debug the system, leave this with its default value. </para>
<para>XDM-AUTHENTICATION-1 style &XDMCP; authentication requires a private key to be shared between &tdm; and the terminal. This option specifies the file containing those values. Each entry in the file consists of a display name and the shared key. </para>
<para>To prevent unauthorised &XDMCP; service and to allow forwarding of &XDMCP; IndirectQuery requests, this file contains a database of hostnames which are either allowed direct access to this machine, or have a list of hosts to which queries should be forwarded to. The format of this file is described in <xref linkend="tdmrc-xaccess"/>. </para>
<para>The default is <quote>${<envar>kde_confdir</envar>}/tdm/Xaccess</quote>.</para>
<para>Number of seconds to wait for the display to respond after the user has selected a host from the chooser. If the display sends an &XDMCP; IndirectQuery within this time, the request is forwarded to the chosen host; otherwise, it is assumed to be from a new session and the chooser is offered again. </para>
<para>When computing the display name for &XDMCP; clients, the name resolver will typically create a fully qualified host name for the terminal. As this is sometimes confusing, &tdm; will remove the domain name portion of the host name if it is the same as the domain name of the local host when this option is enabled. </para>
<para>Use the numeric IP address of the incoming connection on multihomed hosts instead of the host name. This is to avoid trying to connect on the wrong interface which might be down at this time. </para>
<para>This specifies a program which is run (as <systemitem class="username">root</systemitem>) when an &XDMCP; DirectQuery or BroadcastQuery is received and this host is configured to offer &XDMCP; display management. The output of this program may be displayed in a chooser window. If no program is specified, the string <quote>Willing to manage</quote> is sent. </para>
<para>The command to run to halt/poweroff the system. </para><para>The default is something reasonable for the system on which &tdm; was built, like <command>/sbin/shutdown <option>-h</option> <parameter>now</parameter></command>. </para>
<para>The command to run to reboot the system. </para><para>The default is something reasonable for the system &tdm; on which was built, like <command>/sbin/shutdown <option>-r</option> <parameter>now</parameter></command>. </para>
<para>Whether it is allowed to abort active sessions when shutting down the system via the global command <acronym>FiFo</acronym>. </para><para>This will have no effect unless <option>AllowFifo</option> is enabled. </para>
<para>These options control the behaviour of &tdm; when attempting to open a connection to an &X-Server;. <option>OpenDelay</option> is the length of the pause (in seconds) between successive attempts, <option>OpenRepeat</option> is the number of attempts to make and <option>OpenTimeout</option> is the amount of time to spend on a connection attempt. After <option>OpenRepeat</option> attempts have been made, or if <option>OpenTimeout</option> seconds elapse in any particular connection attempt, the start attempt is considered failed. </para>
<para>How many times &tdm; should attempt to start a <literal>foreign</literal> display listed in the <filename>Xservers</filename> file before giving up and disabling it. Local displays are attempted only once, and &XDMCP; displays are retried indefinitely by the client (unless the option <option>-once</option> was given to the &X-Server;). </para>
<para>To discover when <emphasis>remote</emphasis> displays disappear, &tdm; regularly pings them. <option>PingInterval</option> specifies the time (in minutes) between the pings and <option>PingTimeout</option> specifies the maximum amount of time (in minutes) to wait for the terminal to respond to the request. If the terminal does not respond, the session is declared dead and terminated. </para><para>If you frequently use X terminals which can become isolated from the managing host, you may wish to increase the timeout. The only worry is that sessions will continue to exist after the terminal has been accidentally disabled. </para>
<para>Whether &tdm; should restart the local &X-Server; after session exit instead of resetting it. Use this if the &X-Server; leaks memory or crashes the system on reset attempts. </para>
<para>Controls whether &tdm; generates and uses authorisation for <emphasis>local</emphasis> &X-Server; connections. For &XDMCP; displays the authorisation requested by the display is used; foreign non-&XDMCP; displays do not support authorisation at all. </para>
<para>If <option>Authorize</option> is true, use the authorisation mechanisms listed herein. The MIT-MAGIC-COOKIE-1 authorisation is always available; XDM-AUTHORIZATION-1, SUN-DES-1 and MIT-KERBEROS-5 might be available as well, depending on the build configuration. </para>
<para>The default is <quote>DEF_AUTH_NAME</quote>.</para>
<para>Some <emphasis>old</emphasis> &X-Server;s re-read the authorisation file at &X-Server; reset time, instead of when checking the initial connection. As &tdm; generates the authorisation information just before connecting to the display, an old &X-Server; would not get up-to-date authorisation information. This option causes &tdm; to send SIGHUP to the &X-Server; after setting up the file, causing an additional &X-Server; reset to occur, during which time the new authorisation information will be read. </para>
<para>This file is used to communicate the authorisation data from &tdm; to the &X-Server;, using the <option>-auth</option> &X-Server; command line option. It should be kept in a directory which is not world-writable as it could easily be removed, disabling the authorisation mechanism in the &X-Server;. If not specified, a random name is generated from <option>AuthDir</option> and the name of the display. </para>
<para>This option specifies the name of the file to be loaded by <command>xrdb</command> as the resource database onto the root window of screen 0 of the display. KDE programs generally do not use X-resources, so this option is only needed if the <option>Setup</option> program needs some X-resources. </para>
<para>This specifies a program which is run (as <systemitem class="username">root</systemitem>) before offering the greeter window. This may be used to change the appearance of the screen around the greeter window or to put up other windows (e.g., you may want to run <command>xconsole</command> here). The conventional name for a file used here is <command>Xsetup</command>. See <xref linkend="tdmrc-xsetup"/>. </para>
<para>This specifies a program which is run (as <systemitem class="username">root</systemitem>) after the user authentication process succeeds. The conventional name for a file used here is <command>Xstartup</command>. See <xref linkend="tdmrc-xstartup"/>. </para>
<para>This specifies a program which is run (as <systemitem class="username">root</systemitem>) after the session terminates. The conventional name for a file used here is <command>Xreset</command>. See <xref linkend="tdmrc-xreset"/>. </para>
<para>This specifies the session program to be executed (as the user owning the session). The conventional name for a file used here is <command>Xsession</command>. See <xref linkend="tdmrc-xsession"/>. </para>
<para>The default is <quote>${<envar>x_bindir</envar>}/xterm -ls -T</quote>.</para>
<para>If the <option>Session</option> program fails to execute, &tdm; will fall back to this program. This program is executed with no arguments, but executes using the same environment variables as the session would have had (see <xref linkend="tdmrc-xsession"/>). </para>
<para>The default is <quote>${<envar>x_bindir</envar>}/xterm</quote>.</para>
<para>The <envar>PATH</envar> environment variable for non-<systemitem class="username">root</systemitem> <option>Session</option>s. </para><para>The default depends on the system &tdm; was built on. </para>
<para>The <envar>PATH</envar> environment variable for all programs but non-<systemitem class="username">root</systemitem> <option>Session</option>s. Note that it is good practice not to include <literal>.</literal> (the current directory) into this entry. </para><para>The default depends on the system &tdm; was built on. </para>
<para>When &tdm; is unable to write to the usual user authorisation file ($<envar>HOME</envar>/.Xauthority), it creates a unique file name in this directory and points the environment variable <envar>XAUTHORITY</envar> at the created file. </para>
<para>If enabled, &tdm; will automatically restart a session after an &X-Server; crash (or if it is killed by Alt-Ctrl-BackSpace). Note that enabling this feature opens a security hole: a secured display lock can be circumvented (unless &kde;'s built-in screen locker is used). </para>
<para>The users that do not need to provide a password to log in. Items which are prefixed with <literal>@</literal> represent all users in the user group named by that item. <literal>*</literal> means all users but <systemitem class="username">root</systemitem> (and any other user with UID = 0). <emphasis>Never</emphasis> list <systemitem class="username">root</systemitem>. </para>
<para>The password for the user to log in automatically. This is <emphasis>not</emphasis> required unless the user is logged into a <acronym>NIS</acronym> or Kerberos domain. If you use this option, you should <command>chmod <option>600</option> <filename>tdmrc</filename></command> for obvious reasons. </para>
<para>The file (relative to the user's home directory) to redirect the session output to. One occurrence of <parameter>%s</parameter> in this string will be substituted with the display name. Use <parameter>%%</parameter> to obtain a literal <literal>%</literal>. </para>
<para>The default is <quote>.xsession-errors</quote>.</para>
<para>Specify the widget colour scheme for the greeter. Empty means to use the built-in default which currently is yellowish grey with some light blue and yellow elements. </para>
<para>What should be shown in the greeter righthand of the input lines (if <option>UserList</option> is disabled) or above them (if <option>UserList</option> is enabled): </para>
<para>The relative coordinates (percentages of the screen size; X,Y) at which the centre of the greeter is put. &tdm; aligns the greeter to the edges of the screen it would cross otherwise. </para>
<para>The screen the greeter should be displayed on in multi-headed and Xinerama setups. The numbering starts with 0. For Xinerama, it corresponds to the listing order in the active ServerLayout section of XF86Config; -1 means to use the upper-left screen, -2 means to use the upper-right screen. </para>
<para>The headline in the greeter. An empty greeting means none at all. </para><para>The following character pairs are replaced by their value: <variablelist>
<para>This option controls which users will be shown in the user view (<option>UserList</option>) and/or offered for autocompletion (<option>UserCompletion</option>). If it is <literal>Selected</literal>, <option>SelectedUsers</option> contains the final list of users. If it is <literal>NotHidden</literal>, the initial user list are all users found on the system. Users contained in <option>HiddenUsers</option> are removed from the list, just like all users with a UID greater than specified in <option>MaxShowUID</option> and users with a non-zero UID less than specified in <option>MinShowUID</option>. Items in <option>SelectedUsers</option> and <option>HiddenUsers</option> which are prefixed with <literal>@</literal> represent all users in the user group named by that item. Finally, the user list will be sorted alphabetically, if <option>SortUsers</option> is enabled. </para>
<para>The default is <quote>NotHidden</quote>.</para>
<para>The images can be in any format Qt recognises, but the filename must match &tdm;'s expectations: <literal>.face.icon</literal> should be a 48x48 icon, while <literal>.face</literal> should be a 300x300 image. Currently the big image is used only as a fallback and is scaled down, but in the future it might be displayed full-size in the logo area or a tooltip. </para>
<para>The default is <quote>AdminOnly</quote>.</para>
<para>If <option>FocusPasswd</option> is enabled and a user was preselected, the cursor is placed in the password input field automatically. </para>
<note><para>Enabling user preselection can be considered a security hole, as it presents a valid login name to a potential attacker, so he <quote>only</quote> needs to guess the password. On the other hand, one could set <option>DefaultUser</option> to a fake login name.</para></note>
<para>If enabled, &tdm; will automatically start the <command>krootimage</command> program to set up the background; otherwise, the <option>Setup</option> program is responsible for the background. </para>
<para>The configuration file to be used by <command>krootimage</command>. It contains a section named <literal>[Desktop0]</literal> like <filename>kdesktoprc</filename> does. Its options are not described herein; guess their meanings or use the control centre. </para>
<para>The default is <quote>${<envar>kde_confdir</envar>}/tdm/backgroundrc</quote>.</para>
<para>To improve security, the greeter grabs the &X-Server; and then the keyboard when it starts up. This option specifies if the &X-Server; grab should be held for the duration of the name/password reading. When disabled, the &X-Server; is ungrabbed after the keyboard grab succeeds; otherwise, the &X-Server; is grabbed until just before the session begins. </para>
<note><para>Enabling this option disables <option>UseBackground</option> and <option>Setup</option>.</para></note>
<para>This option specifies the maximum time &tdm; will wait for the grabs to succeed. A grab may fail if some other X-client has the &X-Server; or the keyboard grabbed, or possibly if the network latencies are very high. You should be cautious when raising the timeout, as a user can be spoofed by a look-alike window on the display. If a grab fails, &tdm; kills and restarts the &X-Server; (if possible) and the session. </para>
<para>Specify whether the greeter of local displays should start up in host chooser (remote) or login (local) mode and whether it is allowed to switch to the other mode. </para>
<para>A list of hosts to be automatically added to the remote login menu. The special name <literal>*</literal> means broadcast. Has no effect if <option>LoginMode</option> is <literal>LocalOnly</literal>. </para>
<para>Use this number as a random seed when forging saved session types, etc. of unknown users. This is used to avoid telling an attacker about existing users by reverse conclusion. This value should be random but constant across the login domain. </para>
<para>Enable &tdm;'s built-in <command>xconsole</command>. Note that this can be enabled for only one display at a time. This option is available only if &tdm; was <command>configure</command>d with <option>--enable-tdm-xconsole</option>. </para>
<para>The data source for &tdm;'s built-in <command>xconsole</command>. If empty, a console log redirection is requested from <filename>/dev/console</filename>. Has no effect if <option>ShowLog</option> is disabled. </para>
<para>Specify conversation plugins for the login dialogue; the first in the list is selected initially. Each plugin can be specified as a base name (which expands to <filename>$<envar>kde_modulesdir</envar>/kgreet_<replaceable>base</replaceable></filename>) or as a full pathname. </para><para>Conversation plugins are modules for the greeter which obtain authentication data from the user. Currently only the <literal>classic</literal> plugin is shipped with &kde;; it presents the well-known username and password form. </para>
<para>The default is <quote>classic</quote>.</para>
<para>A list of options of the form <replaceable>Key</replaceable><literal>=</literal><replaceable>Value</replaceable>. The conversation plugins can query these settings; it is up to them what possible keys are. </para>
<para>Show the <guilabel>Console Login</guilabel> action in the greeter. For this to work, a console must be configured for this particular display, see <xref linkend="tdmrc-xservers"/>. </para>
<para>A program to run while the greeter is visible. It is supposed to preload as much as possible of the session that is going to be started (most probably). </para>
<para>Each specification indicates a display which should constantly be managed and which is not using &XDMCP;. This method is typically used only for local &X-Server;s that are started by &tdm;, but &tdm; can manage externally started (<quote>foreign</quote>) &X-Server;s as well, may they run on the local machine or rather remotely.</para>
<para>The formal syntax of a specification is <screen>
<para>The <replaceable>display name</replaceable> must be something that can be passed in the <option>-display</option> option to an X program. This string is used to generate the display-specific section names, so be careful to match the names. The display name of &XDMCP; displays is derived from the display's address by reverse host name resolution. For configuration purposes, the <literal>localhost</literal> prefix from locally running &XDMCP; displays is <emphasis>not</emphasis> stripped to make them distinguishable from local &X-Server;s started by &tdm;.</para>
<para>The <replaceable>display class</replaceable> portion is also used in the display-specific sections. This is useful if you have a large collection of similar displays (such as a corral of X terminals) and would like to set options for groups of them. When using &XDMCP;, the display is required to specify the display class, so the manual for your particular X terminal should document the display class string for your device. If it does not, you can run &tdm; in debug mode and <command>grep</command> the log for <quote>class</quote>.</para>
<para>The <replaceable>tty</replaceable> specifies which text console an &X-Server; is <quote>covering</quote>, so &tdm; knows which console it should monitor for activity after switching to <guilabel>Console login</guilabel> to find out when the console session ends. Note that this concept (originating from Solaris) is not perfectly suited for Linux, as there &X-Server;s run on separate virtual terminals and consequently do not actually cover consoles (<command>getty</command>s). </para>
<para>The <literal>reserve</literal> keyword instructs &tdm; to start the display not when &tdm; starts up, but when it is explicitly requested via the command <acronym>FiFo</acronym>. If reserve displays are specified, the &kde; menu will have a <guilabel>Start New Session</guilabel> item near the bottom; use that to activate a reserve display with a new login session. The monitor will switch to the new display, and you will have a minute to login. If there are no more reserve displays available, selecting the menu item will have no effect.</para>
<para>The <replaceable>server command</replaceable> specifies the complete &X-Server; command line, including a display number for secondary displays. When &tdm; starts a session, it sets up authorisation data for the &X-Server;. For local servers, &tdm; passes <command><option>-auth</option> <filename><replaceable>filename</replaceable></filename></command> on the &X-Server;'s command line to point it at its authorisation data. For &XDMCP; displays, &tdm; passes the authorisation data to the &X-Server; via the <quote>Accept</quote> &XDMCP; message.</para>
<para>The file specified by the <option>AccessFile</option> option provides information which &tdm; uses to control access from displays requesting service via &XDMCP;. The file contains four types of entries: entries which control the response to <quote>Direct</quote> and <quote>Broadcast</quote> queries, entries which control the response to <quote>Indirect</quote> queries, macro definitions for <quote>Indirect</quote> entries and entries which control on which network interfaces &tdm; listens for &XDMCP; queries. Blank lines are ignored, <literal>#</literal> is treated as a comment delimiter causing the rest of that line to be ignored and <literal>\</literal> causes an immediately following newline to be ignored, allowing indirect host lists to span multiple lines. </para>
<para>The format of the <quote>Direct</quote> entries is simple, either a host name or a pattern, which is compared against the host name of the display device. Patterns are distinguished from host names by the inclusion of one or more meta characters; <literal>*</literal> matches any sequence of 0 or more characters, and <literal>?</literal> matches any single character. If the entry is a host name, all comparisons are done using network addresses, so any name which converts to the correct network address may be used. Note that only the first network address returned for a host name is used. For patterns, only canonical host names are used in the comparison, so ensure that you do not attempt to match aliases. Host names from &XDMCP; queries always contain the local domain name even if the reverse lookup returns a short name, so you can use patterns for the local domain. Preceding the entry with a <literal>!</literal> character causes hosts which match that entry to be excluded. To only respond to <quote>Direct</quote> queries for a host or pattern, it can be followed by the optional <literal>NOBROADCAST</literal> keyword. This can be used to prevent a &tdm; server from appearing on menus based on <quote>Broadcast</quote> queries.</para>
<para>An <quote>Indirect</quote> entry also contains a host name or pattern, but follows it with a list of host names or macros to which the queries should be forwarded. <quote>Indirect</quote> entries can be excluding as well, in which case a (valid) dummy host name must be supplied to make the entry distinguishable from a <quote>Direct</quote> entry. If compiled with IPv6 support, multicast address groups may also be included in the list of addresses the queries are forwarded to. If the indirect host list contains the keyword <literal>CHOOSER</literal>, <quote>Indirect</quote> queries are not forwarded, but instead a host chooser dialogue is displayed by &tdm;. The chooser will send a <quote>Direct</quote> query to each of the remaining host names in the list and offer a menu of all the hosts that respond. The host list may contain the keyword <literal>BROADCAST</literal>, to make the chooser send a <quote>Broadcast</quote> query as well; note that on some operating systems, UDP packets cannot be broadcast, so this feature will not work. </para>
<para>When checking access for a particular display host, each entry is scanned in turn and the first matching entry determines the response. <quote>Direct</quote> and <quote>Broadcast</quote> entries are ignored when scanning for an <quote>Indirect</quote> entry and vice-versa.</para>
<para>A macro definition contains a macro name and a list of host names and other macros that the macro expands to. To distinguish macros from hostnames, macro names start with a <literal>%</literal> character.</para>
<para>The last entry type is the <literal>LISTEN</literal> directive. The formal syntax is <screen>
</screen> If one or more <literal>LISTEN</literal> lines are specified, &tdm; listens for &XDMCP; requests only on the specified interfaces. <replaceable>interface</replaceable> may be a hostname or IP address representing a network interface on this machine, or the wildcard <literal>*</literal> to represent all available network interfaces. If multicast group addresses are listed on a <literal>LISTEN</literal> line, &tdm; joins the multicast groups on the given interface. For IPv6 multicasts, the IANA has assigned ff0<replaceable>X</replaceable>:0:0:0:0:0:0:12b as the permanently assigned range of multicast addresses for &XDMCP;. The <replaceable>X</replaceable> in the prefix may be replaced by any valid scope identifier, such as 1 for Node-Local, 2 for Link-Local, 5 for Site-Local, and so on (see IETF RFC 2373 or its replacement for further details and scope definitions). &tdm; defaults to listening on the Link-Local scope address ff02:0:0:0:0:0:0:12b to most closely match the IPv4 subnet broadcast behavior. If no <literal>LISTEN</literal> lines are given, &tdm; listens on all interfaces and joins the default &XDMCP; IPv6 multicast group (when compiled with IPv6 support). To disable listening for &XDMCP; requests altogether, a <literal>LISTEN</literal> line with no addresses may be specified, but using the <literal>[Xdmcp]</literal> <option>Enable</option> option is preferred. </para>
<para>The Setup, Startup and Reset programs are run as <systemitem class="username">root</systemitem>, so they should be careful about security. Their first argument is <literal>auto</literal> if the session results from an automatic login; otherwise, no arguments are passed to them. </para>
<para>The <filename>Xsetup</filename> program is run after the &X-Server; is started or reset, but before the greeter is offered. This is the place to change the root background (if <option>UseBackground</option> is disabled) or bring up other windows that should appear on the screen along with the greeter. </para>
<para>In addition to any specified by <option>ExportList</option>, the following environment variables are passed:</para>
<para>Note that since &tdm; grabs the keyboard, any other windows will not be able to receive keyboard input. They will be able to interact with the mouse, however; beware of potential security holes here. If <option>GrabServer</option> is set, <filename>Xsetup</filename> will not be able to connect to the display at all. Resources for this program can be put into the file named by <option>Resources</option>. </para>
<para>The <filename>Xstartup</filename> program is run as <systemitem class="username">root</systemitem> when the user logs in. This is the place to put commands which add entries to <filename>utmp</filename> (the <command>sessreg</command> program may be useful here), mount users' home directories from file servers, or abort the session if some requirements are not met (but note that on modern systems, many of these tasks are already taken care of by <acronym>PAM</acronym> modules).</para>
<para>In addition to any specified by <option>ExportList</option>, the following environment variables are passed:</para>
<para>&tdm; waits until this program exits before starting the user session. If the exit value of this program is non-zero, &tdm; discontinues the session and starts another authentication cycle.</para>
<para>The <filename>Xsession</filename> program is the command which is run as the user's session. It is run with the permissions of the authorised user. One of the keywords <literal>failsafe</literal>, <literal>default</literal> or <literal>custom</literal>, or a string to <command>eval</command> by a Bourne-compatible shell is passed as the first argument.</para>
<para>In addition to any specified by <option>ExportList</option>, the following environment variables are passed:</para>
<listitem><para>the value of <option>UserPath</option> (or <option>SystemPath</option> for <systemitem class="username">root</systemitem> user sessions)</para>
<listitem><para>will contain a comma-separated list of parameters the session might find interesting, like the location of the command <acronym>FiFo</acronym> and its capabilities, and which conversation plugin was used for the login</para>
<para>Symmetrical with <filename>Xstartup</filename>, the <filename>Xreset</filename> program is run after the user session has terminated. Run as <systemitem class="username">root</systemitem>, it should contain commands that undo the effects of commands in <filename>Xstartup</filename>, removing entries from <filename>utmp</filename> or unmounting directories from file servers.</para>
<para>The environment variables that were passed to <filename>Xstartup</filename> are also passed to <filename>Xreset</filename>. </para>