[0m


XDM(1)		    UNIX Programmer's Manual		   XDM(1)



[1mNAME
     [0mxdm - X Display Manager

[1mSYNOPSIS
     xdm [0m[-config _c_o_n_f_i_g_u_r_a_t_i_o_n__f_i_l_e] [-daemon] [-debug
     _d_e_b_u_g__l_e_v_e_l] [-error _e_r_r_o_r__l_o_g__f_i_l_e] [-nodaemon] [-resources
     _r_e_s_o_u_r_c_e__f_i_l_e] [-server _s_e_r_v_e_r__e_n_t_r_y] [-session
     _s_e_s_s_i_o_n__p_r_o_g_r_a_m] [-xrm _r_e_s_o_u_r_c_e__s_p_e_c_i_f_i_c_a_t_i_o_n]

[1mDESCRIPTION
     [0m_X_d_m manages a collection of X displays, both local and pos-
     sibly remote - the emergence of X terminals guided the
     design of several parts of this system, along with the
     development of the X Consortium standard XDMCP, the _X
     _D_i_s_p_l_a_y _M_a_n_a_g_e_r _C_o_n_t_r_o_l _P_r_o_t_o_c_o_l).  It is designed to pro-
     vide services similar to that provided by init, getty and
     login on character terminals:  prompting for login/password,
     authenticating the user and running a ``session''.

     A ``session'' is defined by the lifetime of a particular
     process; in the traditional character-based terminal world,
     it is the user's login shell process.  In the _x_d_m context,
     it is an arbitrary session manager.  This is because in a
     windowing environment, a user's login shell process would
     not necessarily have any terminal-like interface with which
     to connect.

     Until real session managers become widely available, the
     typical _x_d_m substitute would be either a window manager with
     an exit option, or a terminal emulator running a shell -
     with the condition that the lifetime of the terminal emula-
     tor is the lifetime of the shell process that it is running
     - thus degenerating the X session to an emulation of the
     character-based terminal session.

     When the session is terminated, _x_d_m resets the X server and
     (optionally) restarts the whole process.

     Because _x_d_m provides the first interface that users will
     see, it is designed to be simple to use and easy to custom-
     ize to the needs of a particular site.  _X_d_m has many
     options, most of which have reasonable defaults.  Browse
     through the various sections, picking and choosing the
     things you want to change.  Pay particular attention to the
     [1mXsession [0msection, which will describe how to set up the
     style of session desired.

[1mOPTIONS
     [0mFirst, note that all of these options, except [1m-config[0m,
     specify values which can also be specified in the configura-
     tion file as resources.




Printed 11/2/92             Release 4				1






XDM(1)		    UNIX Programmer's Manual		   XDM(1)



     [1m-config [0m_c_o_n_f_i_g_u_r_a_t_i_o_n__f_i_l_e
	  Specifies a resource file which specifies the remaining
	  configuration parameters.  If no file is specified and
	  the file /_e_t_c/_x_d_m/_x_d_m-_c_o_n_f_i_g exists, _x_d_m will use it.

     [1m-daemon
	  [0mSpecifies ``true'' as the value for the
	  [1mDisplayManager.daemonMode [0mresource.  This makes _x_d_m
	  close all file descriptors, disassociate the control-
	  ling terminal and put itself in the background when it
	  first starts up (just like the host of other daemons).
	  It is the default behavior.

     [1m-debug [0m_d_e_b_u_g__l_e_v_e_l
	  Specifies the numeric value for the
	  [1mDisplayManager.debugLevel [0mresource.  A non-zero value
	  causes _x_d_m to print piles of debugging statements to
	  the terminal; it also disables the
	  [1mDisplayManager.daemonMode [0mresource, forcing _x_d_m to run
	  synchronously.  To interpret these debugging messages,
	  a copy of the source code for xdm is almost a neces-
	  sity.  No attempt has been made to rationalize or
	  standardize the output.

     [1m-error [0m_e_r_r_o_r__l_o_g__f_i_l_e
	  Specifies the value for the [1mDisplayManager.errorLogFile
	  [0mresource.  This file contains errors from _x_d_m as well
	  as anything written to stderr by the various scripts
	  and programs run during the progress of the session.

     [1m-nodaemon
	  [0mSpecifies ``false'' as the value for the
	  [1mDisplayManager.daemonMode [0mresource.

     [1m-resources [0m_r_e_s_o_u_r_c_e__f_i_l_e
	  Specifies the value for the [1mDisplayManager*resources
	  [0mresource.  This file is loaded using _x_r_d_b (_1) to
	  specify configuration parameters for the authentication
	  widget.

     [1m-server [0m_s_e_r_v_e_r__e_n_t_r_y
	  Specifies the value for the [1mDisplayManager.servers
	  [0mresource.  See the section below which describes this
	  resource in depth.

     [1m-udpPort [0m_p_o_r_t__n_u_m_b_e_r
	  Specifies the value for the [1mDisplayManager.requestPort
	  [0mresource.  This sets the port-number which XDM will
	  monitor for XDMCP requests.  As XDMCP uses the
	  registered well-known udp port 177, this resource
	  should probably not be changed except for debugging.




Printed 11/2/92             Release 4				2






XDM(1)		    UNIX Programmer's Manual		   XDM(1)



     [1m-session [0m_s_e_s_s_i_o_n__p_r_o_g_r_a_m
	  Specifies the value for the [1mDisplayManager*session
	  [0mresource.  This indicates the program to run when the
	  user has logged in as the session.

     [1m-xrm [0m_r_e_s_o_u_r_c_e__s_p_e_c_i_f_i_c_a_t_i_o_n
	  This allows an arbitrary resource to be specified, just
	  as most toolkit applications.

[1mRESOURCES
     [0mAt many stages the actions of _x_d_m can be controlled through
     the use of the configuration file, which is in the familiar
     X resource format.  See Jim Fulton's article on resource
     files (_d_o_c/_t_u_t_o_r_i_a_l_s/_r_e_s_o_u_r_c_e_s._t_x_t) for a description of the
     format.  Some resources modify the behavior of _x_d_m on all
     displays, while others modify its behavior on one single
     display.  Where actions relate to a specific display, the
     display name is inserted into the resource name between
     ``DisplayManager'' and the final resource name segment.  For
     example, [1mDisplayManager.expo_0.startup [0mis the name of the
     resource which defines the startup shell file on the
     ``expo:0'' display.  Because the resource manager uses
     colons to separate the name of the resource from its value
     and dots to separate resource name parts, _x_d_m substitutes
     underscores for the dots and colons when generating the
     resource name.

     [1mDisplayManager.servers
	  [0mThis resource either specifies a file name full of
	  server entries, one per line (if the value starts with
	  a slash), or a single server entry.  Each entry indi-
	  cates a display which should constantly be managed and
	  which is not using XDMCP.  Each entry consists of two,
	  three or four parts.	The first field is the display
	  name.  The next field is optional, and is the class
	  string of the display.  The next field is the display
	  type.  Finally for local servers, there may follow a
	  command line to start the server.  A typical entry for
	  local display number 0 would be:

	    :0 Acorn-RISC_iX local /usr/bin/X11/X :0

	  If no class string is required, this may be shortened
	  to:

	    :0 local /usr/bin/X11/X :0

	  The display types are:

	  local          a local display, i.e. one which has a server program to run
	  foreign	 a remote display, i.e. one which has no server program to run




Printed 11/2/92             Release 4				3






XDM(1)		    UNIX Programmer's Manual		   XDM(1)



	  The display name must be something that can be passed
	  in the [1m-display [0moption to any X program.  This string
	  is used in the display-specific resources to specify
	  the particular display, so be careful to match the
	  names (e.g. use ":0 local /usr/bin/X11/X :0" instead of
	  "localhost:0 local /usr/bin/X11/X :0" if your other
	  resources are specified as
	  "DisplayManager._0.session").  The display class por-
	  tion is also used in the display-specific resources, as
	  the class portion of the resource.  This is useful if
	  you have a large collection of similar displays (like a
	  corral of X terminals) and would like to set resources
	  for groups of them.  When using XDMCP, the display is
	  required to specify the display class, so perhaps your
	  X terminal documentation describes a reasonably stan-
	  dard display class string for your device.

     [1mDisplayManager.requestPort
	  [0mThis indicates the UDP port number which _x_d_m uses to
	  listen for incoming XDMCP requests.  Unless you need to
	  debug the system, leave this with it's default value of
	  177.

     [1mDisplayManager.errorLogFile
	  [0mError output is normally directed at the system con-
	  sole.  To redirect it simply set this resource to any
	  file name.  A method to send these messages to syslog
	  should be developed for systems which support it; how-
	  ever the wide variety of "standard" interfaces pre-
	  cludes any system-independent implementation.  This
	  file also contains any output directed to stderr by
	  _X_s_t_a_r_t_u_p, _X_s_e_s_s_i_o_n _a_n_d _X_r_e_s_e_t, so it will contain
	  descriptions of problems in those scripts as well.

     [1mDisplayManager.debugLevel
	  [0mA non-zero value specified for this integer resource
	  will enable reams of debugging information to be
	  printed.  It also disables daemon mode which would
	  redirect the information into the bit-bucket.  Specify-
	  ing a non-zero debug level also allows non-root users
	  to run _x_d_m which would normally not be useful.

     [1mDisplayManager.daemonMode
	  [0mNormally, _x_d_m attempts to make itself into an unassoci-
	  ated daemon process.	This is accomplished by forking
	  and leaving the parent process to exit, then closing
	  file descriptors and mangling the controlling terminal.
	  When attempting to debug _x_d_m , this is quite bother-
	  some.  Setting this resource to "false" will disable
	  this feature.

     [1mDisplayManager.pidFile



[0mPrinted 11/2/92             Release 4				4






XDM(1)		    UNIX Programmer's Manual		   XDM(1)



	  The filename specified will be created to contain an
	  ascii representation of the process-id of the main [1mxdm
	  [0mprocess.  This is quite useful when reinitializing the
	  system.  _X_d_m also uses file locking to attempt to elim-
	  inate multiple daemons running on the same machine,
	  which would cause quite a bit of havoc.

     [1mDisplayManager.lockPidFile
	  [0mThis is the resource which controls whether _x_d_m uses
	  file locking to keep multiple xdms from running amok.
	  On SYSV, this uses the lockf library call, while on BSD
	  it uses flock.  The default value is "true".

     [1mDisplayManager.remoteAuthDir
	  [0mThis is a directory name which _x_d_m uses to temporarily
	  store authorization files for displays using XDMCP.
	  The default value is /etc/xdm.

     [1mDisplayManager.autoRescan
	  [0mThis boolean controls whether _x_d_m rescans the confi-
	  guration file and servers file after a session ter-
	  minates and the files have changed.  By default it is
	  "true".  You can force _x_d_m to reread these files by
	  sending a SIGHUP to the main process.

     [1mDisplayManager.removeDomainname
	  [0mWhen computing the display name for XDMCP clients, the
	  resolver will typically create a fully qualified host
	  name for the terminal.  As this is sometimes confusing,
	  _x_d_m will remove the domain name portion of the host
	  name if it is the same as the domain name for the local
	  host when this variable is set.  By default the value
	  is "true".

     [1mDisplayManager.keyFile
	  [0mXDM-AUTHENTICATION-1 style XDMCP authentication
	  requires that a private key be shared between _x_d_m and
	  the terminal.  This resource specifies the file con-
	  taining those values.  Each entry in the file consists
	  of a manufacturer display id and the shared key.  The
	  manufacturer display id is a string which the server
	  transmits to xdm as part of the XDMCP protocol.  It has
	  a format which is defined by the server manufacturer
	  and which will normally match one of:-

	      ManufacturerID-ModelNumber-SerialNumber
	      -Ethernet-??:??:??:??:??:??

	  The _X_a_r_m server uses the second format by default and
	  uses the number from an ethernet card (if attached) or
	  0.  The number used is that returned by _g_e_t_h_o_s_t_i_d(2).
	  If an ethernet card is attached this will invariably be



Printed 11/2/92             Release 4				5






XDM(1)		    UNIX Programmer's Manual		   XDM(1)



	  a number of the form 00:00:a4:xx:xx:xx, where the xx
	  values depend on the particular ethernet card.  If the
	  _X_a_r_m server is given a [1m-serialNo [0margument on the com-
	  mand line the string used will be of the form Acorn-
	  RISC_iX-<serial number>.

	  The shared key is an 8 byte XDMCP authentication key
	  encoded as 16 hex digits - alternatively a simple
	  string may be given enclosed in either single or double
	  quote marks.	In all cases the key is truncated to 8
	  bytes or (if required) extended with characters of
	  value 0.  Each pair of hex digits is interpreted as a
	  single character value with the first digit being the
	  most significant.

     [1mDisplayManager.DISPLAY.resources
	  [0mThis resource specifies the name of the file to be
	  loaded by _x_r_d_b (_1) as the resource data-base onto the
	  root window of screen 0 of the display.  This resource
	  data base is loaded just before the authentication pro-
	  cedure is started, so it can control the appearance of
	  the "login" window.  See the section below on the
	  authentication widget which describes the various
	  resources which are appropriate to place in this file.
	  There is no default value for this resource, but the
	  conventional name is [1m/etc/xdm/Xresources[0m.

     [1mDisplayManager.DISPLAY.xrdb
	  [0mSpecifies the program used to load the resources.  By
	  default, _x_d_m uses /_u_s_r/_b_i_n/_X_1_1/_x_r_d_b.

     [1mDisplayManager.DISPLAY.cpp
	  [0mThis specifies the name of the C preprocessor which is
	  used by xrdb.

     [1mDisplayManager.DISPLAY.startup
	  [0mThis specifies a program which is run (as root) after
	  the authentication process succeeds.	By default, no
	  program is run.  The conventional name for a file used
	  here is _X_s_t_a_r_t_u_p.  See the [1mXstartup [0msection below.

     [1mDisplayManager.DISPLAY.session
	  [0mThis specifies the session to be executed (not running
	  as root).  By default, /_u_s_r/_b_i_n/_X_1_1/_x_t_e_r_m is run.  The
	  conventional name is _X_s_e_s_s_i_o_n.  See the [1mXsession [0mses-
	  sion below.

     [1mDisplayManager.DISPLAY.reset
	  [0mThis specifies a program which is run (as root) after
	  the session terminates.  Again, by default no program
	  is run.  The conventional name is _X_r_e_s_e_t.  See the
	  [1mXreset [0msection further on in this document.



Printed 11/2/92             Release 4				6






XDM(1)		    UNIX Programmer's Manual		   XDM(1)



     [1mDisplayManager.DISPLAY.openDelay

     DisplayManager.DISPLAY.openRepeat

     DisplayManager.DISPLAY.openTimeout

     DisplayManager.DISPLAY.startAttempts
	  [0mThese numeric resources control the behavior of _x_d_m
	  when attempting to open intransigent servers.  [1mopenDe-
	  lay [0mis the length of the pause (in seconds) between
	  successive attempts, [1mopenRepeat [0mis the number of
	  attempts to make, [1mopenTimeout [0mis the amount of time to
	  wait while actually attempting the open (i.e. the max-
	  imum time spent in the _c_o_n_n_e_c_t (_2) syscall) and [1mstar-
	  tAttempts [0mis the number of times this entire process is
	  done before giving up on the server.	After [1mopenRepeat
	  [0mattempts have been made, or if [1mopenTimeout [0mseconds
	  elapse in any particular attempt, _x_d_m terminates and
	  restarts the server, attempting to connect again, this
	  process is repeated [1mstartAttempts [0mtime, at which point
	  the display is declared dead and disabled.  Although
	  this behavior may seem arbitrary, it has been empiri-
	  cally developed and works quite well on most systems.
	  The default values are 5 for [1mopenDelay[0m, 5 for [1mopen-
	  Repeat[0m, 30 for [1mopenTimeout [0mand 4 for [1mstartAttempts[0m.

     [1mDisplayManager.DISPLAY.pingInterval

     DisplayManager.DISPLAY.pingTimeout
	  [0mTo discover when remote displays disappear, _x_d_m occa-
	  sionally "pings" them, using an X connection and send-
	  ing XSync requests.  [1mpingInterval [0mspecifies the time
	  (in minutes) between each ping attempt, [1mpingTimeout
	  [0mspecifies 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.	By default, both are set to 5
	  minutes.  _x_d_m will not ping local displays.  Although
	  it would seem harmless, it is unpleasant when the
	  workstation session is terminated as a result of the
	  server hanging for NFS service and not responding to
	  the ping.

     [1mDisplayManager.DISPLAY.terminateServer
	  [0mThis boolean resource specifies whether the X server
	  should be terminated when a session terminates (instead
	  of resetting it).  This option can be used when the
	  server tends to grow without bound over time in order
	  to limit the amount of time the server is run.  The
	  default value is "FALSE".

     [1mDisplayManager.DISPLAY.userPath



[0mPrinted 11/2/92             Release 4				7






XDM(1)		    UNIX Programmer's Manual		   XDM(1)



	  _X_d_m sets the PATH environment variable for the session
	  to this value.  It should be a colon separated list of
	  directories, see _s_h(_1) for a full description.  The
	  default value can be specified in the X system confi-
	  guration file with DefUserPath, frequently it is set to
	  ":/bin:/usr/bin:/usr/bin/X11:/usr/ucb".

     [1mDisplayManager.DISPLAY.systemPath
	  [0m_X_d_m sets the PATH environment variable for the startup
	  and reset scripts to the value of this resource.  The
	  default for this resource is specified with the
	  DefaultSystemPath entry in the system configuration
	  file, but it is frequently
	  "/etc:/bin:/usr/bin:/usr/bin/X11:/usr/ucb".  Note the
	  conspicuous absence of "." from this entry.  This is a
	  good practise to follow for root; it avoids many common
	  trojan horse system penetration schemes.

     [1mDisplayManager.DISPLAY.systemShell
	  [0m_X_d_m sets the SHELL environment variable for the startup
	  and reset scripts to the value of this resource.  By
	  default, it is "/bin/sh".

     [1mDisplayManager.DISPLAY.failsafeClient
	  [0mIf the default session fails to execute, _x_d_m 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 the sec-
	  tion "Xsession" below).  By default, /_u_s_r/_b_i_n/_X_1_1/_x_t_e_r_m
	  is used.

     [1mDisplayManager.DISPLAY.grabServer

     DisplayManager.DISPLAY.grabTimeout
	  [0mTo eliminate obvious security shortcomings in the X
	  protocol, _x_d_m grabs the server and keyboard while read-
	  ing the name/password.  The [1mgrabServer [0mresource speci-
	  fies if the server should be held for the duration of
	  the name/password reading, when FALSE, the server is
	  ungrabbed after the keyboard grab succeeds, otherwise
	  the server is grabbed until just before the session
	  begins.  The [1mgrabTimeout [0mresource specifies the maximum
	  time _x_d_m will wait for the grab to succeed.  The grab
	  may fail if some other client has the server grabbed,
	  or possibly if the network latencies are very high.
	  This resource has a default value of 3 seconds; you
	  should be cautious when raising it as a user can be
	  spoofed by a look-alike window on the display.  If the
	  grab fails, _x_d_m kills and restarts the server (if pos-
	  sible) and session.

     [1mDisplayManager.DISPLAY.authorize



[0mPrinted 11/2/92             Release 4				8






XDM(1)		    UNIX Programmer's Manual		   XDM(1)



     [1mDisplayManager.DISPLAY.authName
	  authorize [0mis a boolean resource which controls whether
	  _x_d_m generates and uses authorization for the server
	  connections.	If authorization is used, [1mauthName [0mspeci-
	  fies the type to use.  Currently, xdm supports MIT-
	  MAGIC-COOKIE-1 and XDM-AUTHORIZATION-1 - the latter
	  uses the DES encryption facilities of the [1mRISC iX
	  [0moperating system.  XDMCP connections specify which
	  authorization types are supported dynamically, so [1mauth-
	  Name [0mmay be ignored in this case, however, in the case
	  where the display advises _x_d_m that it supports the
	  requested authorization it will be used.  Notice that
	  when using XDMCP the display class is not known when
	  the authorization protocol is selected and so the class
	  of the resource looked for is
	  [1mDisplayManager.DISPLAY.Authorize [0m(etc).  When [1mauthorize
	  [0mis set for a display and authorization is not avail-
	  able, the user is informed by having a different mes-
	  sage displayed in the login widget.  By default,
	  [1mauthorize [0mis "true"; [1mauthName [0mis "XDM_AUTHORIZATION-1".

     [1mDisplayManager.DISPLAY.authFile
	  [0mThis file is used to communicate the authorization data
	  from [1mxdm [0mto local servers, using the -_a_u_t_h server com-
	  mand line option.  It should be kept in a directory
	  which is not world-writable as it could easily be
	  removed, disabling the authorization mechanism in the
	  server.

     [1mDisplayManager.DISPLAY.resetForAuth
	  [0mThe original implementation of authorization in the
	  sample server reread the authorization file at server
	  reset time, instead of when checking the initial con-
	  nection.  As _x_d_m generates the authorization informa-
	  tion just before connecting to the display, an old
	  server would not get up-to-date authorization informa-
	  tion.  This resource causes _x_d_m to send SIGHUP to the
	  server after setting up the file, causing an additional
	  server reset to occur, during which time the new
	  authorization information will be read

     [1mDisplayManager.DISPLAY.userAuthDir
	  [0mWhen _x_d_m is unable to write to the usual user authori-
	  zation file ($HOME/.Xauthority), it creates a unique
	  file name in this directory and points the environment
	  variable XAUTHORITY at the created file.  By default it
	  uses "/tmp".

[1mCONTROLLING THE SERVER
     [0m_X_d_m controls local servers using POSIX signals.  SIGHUP is
     expected to reset the server, closing all client connections
     and performing other clean up duties.  SIGTERM is expected



Printed 11/2/92             Release 4				9






XDM(1)		    UNIX Programmer's Manual		   XDM(1)



     to terminate the server.  If these signals do not perform
     the expected actions, _x_d_m will not perform properly.

     To control remote servers not using XDMCP, _x_d_m searches the
     window hierarchy on the display and uses the protocol
     request KillClient in an attempt to clean up the terminal
     for the next session.  This may not actually kill all of the
     clients, as only those which have created windows will be
     noticed.  XDMCP provides a more sure mechanism; when xdm
     closes it's initial connection, the session is over and the
     terminal is required to close all other connections.

[1mCONTROLLING XDM
     [0m_X_d_m responds to two signals: SIGHUP and SIGTERM.  When sent
     a SIGHUP, _x_d_m rereads the configuration file and the file
     specified by the [1mDisplayManager.servers [0mresource and notices
     if entries have been added or removed.  If a new entry has
     been added, _x_d_m starts a session on the associated display.
     Entries which have been removed are disabled immediately,
     meaning that any session in progress will be terminated
     without notice, and no new session will be started.

     When sent a SIGTERM, _x_d_m terminates all sessions in progress
     and exits.  This can be used when shutting down the system.

     _X_d_m attempts to mark the various sub-processes for ps(1) by
     editing the command line argument list in place.  Because
     xdm can't allocate additional space for this task, it is
     useful to start xdm with a reasonably long command line (15
     to 20 characters should be enough).  Each process which is
     servicing a display is marked "-<Display-Name>".

[1mAUTHENTICATION WIDGET
     [0mThe authentication widget is an application which reads a
     name/password pair from the keyboard.  As this is a toolkit
     client, nearly every imaginable parameter can be controlled
     with a resource.  Resources for this widget should be put
     into the file named by [1mDisplayManager.DISPLAY.resources[0m.
     All of these have reasonable default values, so it is not
     necessary to specify any of them.

[1mxlogin.Login.y
     xlogin.Login.width, xlogin.Login.height, xlogin.Login.x,
	  [0mThe geometry of the login widget is normally computed
	  automatically.  If you wish to position it elsewhere,
	  specify each of these resources.

     [1mxlogin.Login.foreground
	  [0mThe color used to display the typed-in user name.

     [1mxlogin.Login.font
	  [0mThe font used to display the typed-in user name.



Printed 11/2/92             Release 4			       10






XDM(1)		    UNIX Programmer's Manual		   XDM(1)



     [1mxlogin.Login.greeting
	  [0mA string which identifies this window.  The default is
	  "Welcome to the X Window System".

     [1mxlogin.Login.unsecureGreeting
	  [0mWhen X authorization is requested in the configuration
	  file for this display and none is in use, this greeting
	  replaces the standard greeting.  It's default value is
	  "This is a nonsecure session"

     [1mxlogin.Login.greetFont
	  [0mThe font used to display the greeting.

     [1mxlogin.Login.greetColor
	  [0mThe color used to display the greeting.

     [1mxlogin.Login.namePrompt
	  [0mThe string displayed to prompt for a user name.  _X_r_d_b
	  strips trailing white space from resource values, so to
	  add spaces at the end of the prompt (usually a nice
	  thing), add spaces escaped with backslashes.	The
	  default is "Login:  "

     [1mxlogin.Login.passwdPrompt
	  [0mThe string displayed to prompt for a password.  The
	  default is "Password:  ".

     [1mxlogin.Login.promptFont
	  [0mThe font used to display both prompts.

     [1mxlogin.Login.promptColor
	  [0mThe color used to display both prompts.

     [1mxlogin.Login.fail
	  [0mA message which is displayed when the authentication
	  fails.  The default is "Login Failed, please try
	  again".

     [1mxlogin.Login.failFont
	  [0mThe font used to display the failure message.

     [1mxlogin.Login.failColor
	  [0mThe color used to display the failure message.

     [1mxlogin.Login.failTimeout
	  [0mThe time (in seconds) that the fail message is
	  displayed.  The default is 30 seconds.

     [1mxlogin.Login.translations
	  [0mThis specifies the translations used for the login
	  widget.  Refer to the X Toolkit documentation for a
	  complete discussion on translations.	The default



Printed 11/2/92             Release 4			       11






XDM(1)		    UNIX Programmer's Manual		   XDM(1)



	  translation table is:

	       Ctrl<Key>H:    delete-previous-character() \n\
	       Ctrl<Key>D:    delete-character() \n\
	       Ctrl<Key>B:    move-backward-character() \n\
	       Ctrl<Key>F:    move-forward-character() \n\
	       Ctrl<Key>A:    move-to-begining() \n\
	       Ctrl<Key>E:    move-to-end() \n\
	       Ctrl<Key>K:    erase-to-end-of-line() \n\
	       Ctrl<Key>U:    erase-line() \n\
	       Ctrl<Key>X:    erase-line() \n\
	       Ctrl<Key>C:    restart-session() \n\
	       Ctrl<Key>\\:   abort-session() \n\
	       <Key>BackSpace:delete-previous-character() \n\
	       <Key>Delete:   delete-previous-character() \n\
	       <Key>Return:   finish-field() \n\
	       <Key>:	      insert-char() \


     The actions which are supported by the widget are:

     delete-previous-character
	  Erases the character before the cursor.

     delete-character
	  Erases the character after the cursor.

     move-backward-character
	  Moves the cursor backward.

     move-forward-character
	  Moves the cursor forward.

     move-to-begining
	  (Apologies about the spelling error.) Moves the cursor
	  to the beginning of the editable text.

     move-to-end
	  Moves the cursor to the end of the editable text.

     erase-to-end-of-line
	  Erases all text after the cursor.

     erase-line
	  Erases the entire text.

     finish-field
	  If the cursor is in the name field, proceeds to the
	  password field; if the cursor is in the password field,
	  check the current name/password pair.  If the
	  name/password pair are valid, _x_d_m starts the session.
	  Otherwise the failure message is displayed and the user



Printed 11/2/92             Release 4			       12






XDM(1)		    UNIX Programmer's Manual		   XDM(1)



	  is prompted to try again.

     abort-session
	  Terminates and restarts the server.

     abort-display
	  Terminates the server, disabling it.	This is a rash
	  action and is not accessible in the default configura-
	  tion.  It can be used to stop _x_d_m when shutting the
	  system down.

     restart-session
	  Resets the X server and starts a new session.  This can
	  be used when the resources have been changed and you
	  want to test them, or when the screen has been
	  overwritten with system messages.

     insert-char
	  Inserts the character typed.

     set-session-argument
	  Specifies a single word argument which is passed to the
	  session at startup.  See the sections on [1mXsession [0mand
	  [1mTypical usage[0m.

     allow-all-access
	  Disables access control in the server, this can be used
	  when the .Xauthority file cannot be created by xdm.  Be
	  very careful using this, it might be better to discon-
	  nect the machine from the network before doing this.

[1mThe Xstartup file
     [0mThis file is typically a shell script.  It is run as "root"
     and should be very careful about security.  This is the
     place to put commands which make fake entries in /etc/utmp,
     mount users' home directories from file servers, display the
     message of the day, or abort the session if logins are not
     allowed.  Various environment variables are set for the use
     of this script:

	  DISPLAY	 is set to the associated display name
	  HOME		 is set to the home directory of the user
	  USER		 is set to the user name
	  PATH		 is set to the value of [1mDisplayManager.DISPLAY.systemPath
	  [0mSHELL          is set to the value of [1mDisplayManager.DISPLAY.systemShell
	  [0mXAUTHORITY	 may be set to an authority file


     No arguments of any kind are passed to the script.  _X_d_m
     waits until this script exits before starting the user ses-
     sion.  If the exit value of this script is non-zero, _x_d_m
     discontinues the session immediately and starts another



Printed 11/2/92             Release 4			       13






XDM(1)		    UNIX Programmer's Manual		   XDM(1)



     authentication cycle.

[1mThe Xsession program
     [0mThis is the command which is run as the user's session.  It
     is run with the permissions of the authorized user, and has
     several environment variables specified:

	  DISPLAY	 is set to the associated display name
	  HOME		 is set to the home directory of the user
	  USER		 is set to the user name
	  PATH		 is set to the value of [1mDisplayManager.DISPLAY.userPath
	  [0mSHELL          is set to the user's default shell (from /etc/passwd)
	  XAUTHORITY	 may be set to a non-standard authority file


     At most installations, _X_s_e_s_s_i_o_n should look in $HOME for a
     file ._x_s_e_s_s_i_o_n which would contain commands that each user
     would like to use as a session.  This would replace the sys-
     tem default session.  _X_s_e_s_s_i_o_n should also implement the
     system default session if no user-specified session exists.
     See the section [1mTypical Usage [0mbelow.

     An argument may be passed to this program from the authenti-
     cation widget using the `set-session-argument' action.  This
     can be used to select different styles of session.  One very
     good use of this feature is to allow the user to escape from
     the ordinary session when it fails.  This would allow users
     to repair their own ._x_s_e_s_s_i_o_n if it fails, without requiring
     administrative intervention.  The section on typical usage
     demonstrates this feature.

[1mThe Xreset file
     [0mSymmetrical with _X_s_t_a_r_t_u_p, this script is run after the user
     session has terminated.  Run as root, it should probably
     contain commands that undo the effects of commands in
     _X_s_t_a_r_t_u_p, removing fake entries from /_e_t_c/_u_t_m_p or unmounting
     directories from file servers.  The collection of environ-
     ment variables that were passed to _X_s_t_a_r_t_u_p are also given
     to _X_r_e_s_e_t.

[1mTypical Usage
     [0mActually, _x_d_m is designed to operate in such a wide variety
     of environments that "typical" is probably a misnomer.  How-
     ever, this section will focus on making _x_d_m a superior solu-
     tion to traditional means of starting X from /etc/ttys or
     manually.

     First off, the _x_d_m configuration file should be set up.  A
     good thing to do is to make a directory (/_e_t_c/_x_d_m comes
     immediately to mind) which will contain all of the relevant
     files.  Here is a reasonable configuration file, which could
     be named _x_d_m-_c_o_n_f_i_g :



Printed 11/2/92             Release 4			       14






XDM(1)		    UNIX Programmer's Manual		   XDM(1)



	  DisplayManager.servers:	     /etc/xdm/Xservers
	  DisplayManager.errorLogFile:	     /etc/xdm/xdm-errors
	  DisplayManager.pidFile:	     /etc/xdm/xdm-pid
	  DisplayManager*resources:	     /etc/xdm/Xresources
	  DisplayManager*session:	     /etc/xdm/Xsession
	  DisplayManager._0.authorize:	     true
	  DisplayManager*authorize:	     false


     As you can see, this file simply contains references to
     other files.  Note that some of the resources are specified
     with ``*'' separating the components.  These resources can
     be made unique for each different display, by replacing the
     ``*'' with the display-name, but normally this is not very
     useful.  See the [1mResources [0msection for a complete discus-
     sion.

     The first file /_e_t_c/_x_d_m/_X_s_e_r_v_e_r_s contains the list of
     displays to manage.  Most workstations have only one
     display, numbered 0, so the file will look like this:

	  :0 Local local /usr/bin/X11/X :0


     This will keep /_u_s_r/_b_i_n/_X_1_1/_X running on this display and
     manage a continuous cycle of sessions.

     The file /_e_t_c/_x_d_m/_x_d_m-_e_r_r_o_r_s will contain error messages
     from _x_d_m and anything output to stderr by _X_s_t_a_r_t_u_p, _X_s_e_s_s_i_o_n
     _o_r _X_r_e_s_e_t.  When you have trouble getting _x_d_m working, check
     this file to see if _x_d_m has any clues to the trouble.

     The next configuration entry, /_e_t_c/_x_d_m/_X_r_e_s_o_u_r_c_e_s, is loaded
     onto the display as a resource database using _x_r_d_b (_1).  As
     the authentication widget reads this database before start-
     ing up, it usually contains parameters for that widget:

	  xlogin*login.translations: #override\
	       <Key>F1: set-session-argument(failsafe) finish-field()\n\
	       <Key>Return: set-session-argument() finish-field()
	  xlogin*borderWidth: 3
	  #ifdef COLOR
	  xlogin*greetColor: #f63
	  xlogin*failColor: red
	  xlogin*Foreground: black
	  xlogin*Background: #fdc
	  #else
	  xlogin*Foreground: black
	  xlogin*Background: white
	  #endif





Printed 11/2/92             Release 4			       15






XDM(1)		    UNIX Programmer's Manual		   XDM(1)



     The various colors specified here look reasonable on several
     of the displays we have, but may look awful on other moni-
     tors.  As X does not currently have any standard color nam-
     ing scheme, you might need to tune these entries to avoid
     disgusting results.  Please note the translations entry; it
     specifies a few new translations for the widget which allow
     users to escape from the default session (and avoid troubles
     that may occur in it).  Note that if #override is not speci-
     fied, the default translations are removed and replaced by
     the new value, not a very useful result as some of the
     default translations are quite useful (like "<Key>: insert-
     char ()" which responds to normal typing).

     The _X_s_t_a_r_t_u_p file used here simply prevents login while the
     file /_e_t_c/_n_o_l_o_g_i_n exists.	As there is no provision for
     displaying any messages here (there isn't any core X client
     which displays files), the user will probably be baffled by
     this behavior.  I don't offer this as a complete example,
     but simply a demonstration of the available functionality.

     Here is a sample _X_s_t_a_r_t_u_p script:

	  #!/bin/sh
	  #
	  # Xstartup
	  #
	  # This program is run as root after the user is verified
	  #
	  if [ -f /etc/nologin ]; then
	       exit 1
	  fi
	  exit 0

     The most interesting script is _X_s_e_s_s_i_o_n.  This version
     recognizes the special "failsafe" mode, specified in the
     translations in the _X_r_e_s_o_u_r_c_e_s file above, to provide an
     escape from the ordinary session:

	  #!/bin/sh
	  #
	  # Xsession
	  #
	  # This is the program that is run as the client
	  # for the display manager.  This example is
	  # quite friendly as it attempts to run a per-user
	  # .xsession file instead of forcing a particular
	  # session layout
	  #

	  case $# in
	  1)
	       case $1 in



Printed 11/2/92             Release 4			       16






XDM(1)		    UNIX Programmer's Manual		   XDM(1)



	       failsafe)
		    exec xterm -geometry 80x24-0-0 -ls
		    ;;
	       esac
	  esac

	  startup=$HOME/.xsession
	  resources=$HOME/.Xresources

	  if [ -f $startup ]; then
	       exec /bin/sh $startup
	  else
	       if [ -f $resources ]; then
		    xrdb -load $resources
	       fi
	       twm &
	       exec xterm -geometry 80x24+10+10 -ls
	  fi


     No _X_r_e_s_e_t script is necessary, so none is provided.


[1mSOME OTHER POSSIBILITIES
     [0mYou can also use _x_d_m to run a single session at a time,
     using the 4.3 _i_n_i_t options or other suitable daemon by
     specifying the server on the command line:

	  xdm -server ":0 SUN-3/60CG4 local /usr/bin/X :0"


     Or, you might have a file server and a collection of X ter-
     minals.  The configuration for this could look identical to
     the sample above, except the _X_s_e_r_v_e_r_s file might look like:

	  extol:0 VISUAL-19 foreign
	  exalt:0 NCD-19 foreign
	  explode:0 NCR-TOWERVIEW3000 foreign


     This would direct _x_d_m to manage sessions on all three of
     these terminals.  See the section "Controlling Xdm" above
     for a description of using signals to enable and disable
     these terminals in a manner reminiscent of init(8).

     One thing that _x_d_m isn't very good at doing is coexisting
     with other window systems.  To use multiple window systems
     on the same hardware, you'll probably be more interested in
     _x_i_n_i_t .

[1mSEE ALSO
     [0mX(1), xinit(1) and XDMCP



Printed 11/2/92             Release 4			       17






XDM(1)		    UNIX Programmer's Manual		   XDM(1)



[1mBUGS
     [0mCurrently _x_d_m does not implement the [1mIndirectQuery [0mfunc-
     tionality documented in the XDMCP manual.

[1mCOPYRIGHT
     [0mCopyright 1988, Massachusetts Institute of Technology.
     See _X(_1) for a full statement of rights and permissions.

[1mAUTHOR
     [0mKeith Packard, MIT X Consortium













































Printed 11/2/92             Release 4			       18



[0m