Page: 1 2 3 4 5 6 7 8 9 10 11


xdm - X Display Manager with support for XDMCP, host chooser

xdm[- config configuration_file ][ - nodaemon] [- debug debug_level] [- error error_log_file] [- resources resource_file][- server server_entry ][- session session_program]

Xdm manages a collection of X displays, which may be on the local host or remote servers. The design of xdm was guided by the needs of X terminals as well as the X Consortium standard XDMCP, the X Display Manager Control Protocol. Xdm provides services similar to those provided by init, getty and login on character terminals: prompting for login name and 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. In the xdm context, it is an arbitrary session manager. This is because in a windowing environment, a user's login shell process does not necessarily have any terminal-like interface with which to connect. When a real session manager is not available, a window manager or terminal emulator is typically used as the "session manager," meaning that termination of this process terminates the user's session.

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

When xdm receives an Indirect query via XDMCP, it can run a chooser process to perform an XDMCP Broadcast Query (or an XDMCP Query to specified hosts) on behalf of the display and offer a menu of possible hosts that offer XDMCP display management. This feature is useful with X terminals that do not offer a host menu themselves.

Because xdm provides the first interface that users will see, it is designed to be simple to use and easy to customize to the needs of a particular site. Xdm has many options, most of which have reasonable defaults. Browse through the various sections of this manual, picking and choosing the things you want to change. Pay particular attention to the Session Program section, which will describe how to set up the style of session desired.








DisplayManager.DISPLAY. pinglnterval

DisplayManager.DISPLAY. pingTimeout




DisplayManager.DISPLAY. systemShell














    First, the xdm configuration file should be set up. Make a directory (usually < XRoot>/lib/X11/xdm, where < XRoot> refers to the root of the X11 install tree) to contain all of the relevant files. In the examples that follow, we use /usr/X11R6 as the value of < XRoot> .

    Here is a reasonable configuration file, which could be named xdm-config:

DisplayManager.servers: /usr/X11R6/iib/X11/xdm/Xservers
DisplayManager.errorLogFile: /usr/X11R6/lib/X11/xdm/xdm-errors
DisplayManager*resources: /usr/S11R6/iib/X11/xdm/Xresources
DisplayManager*startup: /usr/X11R6/lib/X11/xdm/Xstartup
DisplayManager*session: /usr/X11R6/lib/X11/xdm/Xsession
DisplayManager.pidFile: /usr/X11R6/lib/X11/xdm/xdm-pid
DisplayManager._0.authorize: true
DisplayManager*authorize: false

Note that this file mostly contains references to other files. Note also 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 Resources section for a complete discussion.



The database file specified by the DisplayManager.accessFile provides information which xdm uses to control access from displays requesting XDMCP service. This file contains three types of entries: entries which control the response to Direct and Broadcast queries, entries which control the response to Indirect queries, and macro definitions.

The format of the Direct entries is simple, either a host name or a pattern, which is distinguished from a host name by the inclusion of one or more meta characters ('*' matches any sequence of 0 or more characters, and '?' matches any single character) which are compared against the host name of the display device. 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. For patterns, only canonical host names are used in the comparison, so ensure that you do not attempt to match aliases. Preceding either a host name or a pattern with a '!' character causes hosts which match that entry to be excluded.

An Indirect entry also contains a host name or pattern, but follows it with a list of host names or macros to which indirect queries should be sent.

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 '%' character. Macros may be nested.

Indirect entries may also specify to have xdm run chooser to offer a menu of hosts to connect to. See the section Chooser.

When checking access for a particular display host, each entry is scanned in turn and the first matching entry determines the response. Direct and Broadcast entries are ignored when scanning for an Indirect entry and vice-versa.

Blank lines are ignored, '#' is treated as a comment delimiter causing the rest of that line to be ignored, and 'newline' causes the newline to be ignored, allowing indirect host lists to span multiple lines.

Here is an example Xaccess file:

# Xaccess - XDMCP access control file
# Direct/Broadcast query entries

! # disallow direct/broadcast service for xtra # allow access from this particular display
* # allow access from any display in LCS

# Indirect query entries

%HOSTS # force extract to contact xenon
! dummy #disallow indirect access
* %HOSTS # all others get to choose


For X terminals that do not offer a host menu for use with Broadcast or Indirect queries, the chooser program can do this for them. In the Xaccess file, specify "CHOOSER" as the first entry in the Indirect host list. Chooser will send a Query request to each of the remaining host names in the list and offer a menu of all the hosts that respond.

The list may consist of the word "BROADCAST," in which case chooser will send a Broadcast instead, again offering a menu of all hosts that respond. Note that on some operating systems, UDP packets cannot be broadcast, so this feature will not work.

Example Xaccess file using chooser: CHOOSER %HOSTS # offer a menu of these hosts CHOOSER BROADCAST # offer a menu of all hosts
The program to use for chooser is specified by the DisplayManager.DISPLAY.chooser resource. For more flexibility at this step, the chooser could be a shell script. Chooser is the session manager here; it is run instead of a child xdm to manage the display.

Resources for this program can be put into the file named by DlsplayManager.DISPLAY.resources.

When the user selects a host, chooser prints the host chosen, which is read by the parent xdm, and exits. xdm closes its connection to the X server, and the server resets and sends another Indirect XDMCP request. xdm remembers the user's choice (for DisplayManager.choiceTimeout seconds) and forwards the request to the chosen host, which starts a session on that display.
The resource DisplayManager.servers gives a server specification or, if the values starts with a slash (/), the name of a file containing server specifications, one per line.

Each specification indicates a display which should constantly be managed and which is not using XDMCP. This method is used typically for local servers only. If the resource or the file named by the resource is empty, xdm will offer XDMCP service only.

Each specification consists of at least three parts: a display name, a display class, a display type, and (for local servers) a command line to start the server. A typical entry for local display number 0 would be:

:0 Digital-QV local /usr/X11R6/bin/X :0

The display types are:
local local display: xdm must run the server
foreign emote display: xdm opens an X connection to a running server
The display name must be something that can be passed in the - display option to an X program. This string is used to generate the display-specific resource names, so be careful to match the names (e.g., use ":0 Sun-CG3 local /usr/X11R6/bin/X :0" instead of "localhost:0 Sun-CG3 local /usr/X11R6/bin/X :0" if your other resources are specified as "DisplayManager._0.session"). The display class portion is also used in the display-specific resources, as the class of the resource. This is useful if you have a large collection of similar displays (such as 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 the manual for your particular X terminal should document the display class string for your device. If it doesn't, you can run xdm in debug mode and look at the resource strings which it generates for that device, which will include the class string.

When xdm starts a session, it sets up authorization data for the server. For local servers, xdm passes "- auth filename" on the server's command line to point it at its authorization data. For XDMCP servers, xdm passes the authorization data to the server via the Accept XDMCP request.



    The Xresources file is loaded onto the display as a resource database using xrdb. As the authentication widget reads this database before starting up, it usually contains parameters for that widget:

    xlogin*login.translations: # override

    Ctrl< Key> R: abort-display( )n

    < Key> F1: set-session-argument(failsafe) finish-field( )n

    < Key> Return: set-session-argument( ) finish-field( )

    xlogin*borderWidth: 3

    xlogin*greeting: CLIENTHOST

    # ifdef COLOR

    xlogin*greetColor: CadetBlue

    xlogin*failColor: red

    # endif

    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 specified, 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 (such as "< Key>: insert-char ( )" which responds to normal typing).

    This file may also contain resources for the setup program and chooser.


    The Xsetup file is run after the server is reset, but before the Login window is offered. The file is typically a shell script. It is run as root, so should be careful about security. This is the place to change the root background or bring up other windows that should appear on the screen along with the Login widget.

    In addition to any specified by DisplayManager.exportList, the following environment variables are passed:

    DISPLAY the associated display name
    PATH the value of DisplayManager.DlSPLAY.systemPath
    SHELL the value of DisplayManager.DlSPLAY.systemShell
    XAUTHORITY may be set to an authority file

    Note that since xdm 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 DisplayManager.DlSPLAY.grabServer is set, Xsetup will not be able to connect to the display at all. Resources for this program can be put into the file named by DisplayManager.DlSPLAY.resources.

    Here is a sample Xsetup script:

    # !/bin/sh
    # Xsetup_0 - setup script for one workstation
    xcmsdb < /usr/X11R6/lib/monitors/alex.0
    xconsole - geometry 480l30- 0- 0 - notify - verbose - exitOnFail &



    The authentication widget reads a name/password pair from the keyboard. Nearly every imaginable parameter can be controlled with a resource. Resources for this widget should be put into the file named by DisplayManager.DlSPLAY.resources. All of these have reasonable default values, so it is not necessary to specify any of them.

    xlogin.Login.width, xlogin.Login.height, xlogin.Login.x, xlogin.Login.y

    The geometry of the Login widget is normally computed automatically. If you wish to position it elsewhere, specify each of these resources.


    The color used to display the typed-in user name.


    The font used to display the typed-in user name.


    A string which this window. The default is "X Window System."


    When X authorization is requested in the configuration file for this display and none is in use, this greeting replaces the standard greeting. The default is "This is an unsecure session"

    xlogin.Login. greetFont

    The font used to display the greeting.


    The color used to display the greeting


    The string displayed to prompt for a user name. Xrdb 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: "


    The string displayed to prompt for a password. The default is "Password: "


    The font used to display both prompts.


    The color used to display both prompts.


    A message which is displayed when the authentication fails. The default is "Login incorrect"


    The font used to display the failure message.


    The color used to display the failure message.


    The number of seconds that the failure message is displayed. The default is 30.


    This specifies the translations used for the login widget. Refer to the X Toolkit documentation for a complete discussion on translations. The default translation table is:

    Ctrl<Key>H: delete-previous-character( ) n
    Ctrl<Kcy>D: delele-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: estart-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:

    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.

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

Moves the cursor to the end of the editable text.

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

Erases the entire text.

If the cursor is in the name field, proceeds to the password field; if the cursor is in the password field, checks the current name/password pair. If the name/password pair is valid, xdm starts the session. Otherwise the failure message is displayed and the user is prompted again.

Terminates and restarts the server.

Terminates the server, disabling it. This action is not accessible in the default configuration. here are various reasons to stop xdm on a system console, such as when shutting the system down, when using xdmshell, to start another type of server, or to generally access the console.
Sending xdm a SIGHUP will restart the display. See the section Controlling XDM.

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.

Inserts the character typed.

Specifies a single word argument which is passed to the session at startup. See the section Session Program.

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 disconnect the machine from the network before doing this.


Contents Previous Chapter Chapter 1 Cont. Next Chapter