[Top] [Prev] [Next] [Contents] [Index]

Configuring XDM Hosts

This section summarizes the configuration requirements of X11R4, X11R5, and X11R6 XDM on manager hosts. For more detailed information, see the X Window System Administrator's Guide from O'Reilly and Associates. For information about X11R3 XDM, see "Using XDM-X11R3 Version".

All manager hosts require:

The following are optional on manager hosts:

Installing the XDM Binary File

The xdm(1) program binary is installed in the /usr/bin/X11 directory and must be installed on each XDM manager host.

Installing XDM Configuration Files

XDM binaries and configuration files must be installed on each XDM manager host. Configuration files are installed in the /usr/lib/X11/xdm directory.

Table 8-2 lists the files on the NCDware distribution, along with the function of each file and whether it is required.

Table 8-2 XDM Binary and Configuration Files
File Name
Optional or Required
xdm Host software Required
Xsession Startup script used by all terminals to manage the X session Required for all versions of XDM
.xsession Startup script for an individual user Optional
xdm-config Resources for XDM, some of which are pointers to the other configuration files in this table Required for all versions of XDM
Xaccess Controls how XDM responds to the different types of queries from the terminal and implements the Login Chooser Required for X11R5 and X11R6 xdm only
Xresources Resources that specify the characteristics of the login banner and Login Chooser Required for all versions of XDM
Xstartup A script that runs before starting user sessions Optional
Xreset A script that runs before ending user sessions Optional
Xservers A list of terminals to be managed by XDM X11R3 XDM only

Configuring the System-Wide XDM Session Management File

This section describes the system-wide Xsession file, which typically performs the following functions:

If you want to edit the default Xsession file:

  1. Make sure the file permissions are correct. The Xsession file must be world-executable.

  2. Edit the file, if necessary, following these general rules for Xsession files:

    In NCDware, users can log out by using the Logout utility in the Console menu. If you do not want to use the Logout utility, you can use the logout method described in
    "The Default Xsession File".

    If your Xsession file does not execute properly, you may not be able to log in through XDM. You must log in through the NCD Terminal Emulator. For more information about XDM troubleshooting, see the NCDware System Administrator's Guide for UNIX Systems.

The Default Xsession File

The default Xsession file included on the NCDware distribution follows. Note that:

Example Xsession File for the Local NCD Window Manager

The Xsession file shown in this section is designed for using the default local NCD Window Manager (ncdwm[1]). Note the following:

To start the local Motif Window Manager instead of the NCD Window Manager, use the -mwm option to ncdrunwm; for example:

# Start the mwm local window manager
ncdrunwm -d $NCDNAME -mwm &

Sample Xsession File for OpenWindows

For OpenWindows, you can change the default Xsession file so the environment is OpenWindows or you can install user-specific .xsession files to establish the OpenWindows environment.

If you set up an Xsession file tailored for OpenWindows, only users who are not using OpenWindows should have .xsession files in their home directories. As an alternative, you can leave the default Xsession file unchanged and set up .xsession files for users who run OpenWindows.

For information about .xsession files, see the NCDware System Administrator's Guide for UNIX Systems.

The following Xsession file is designed for use with the OpenWindows environment. The script starts a command tool and the olwm window manager.

NCDNAME = \Qecho $DISPLAY | awk ' {FS=":"; print $1} ' \Q
# Set up variables for running OpenWindows
export OW


if [ -f $HOME/.xsession ]; then
     if [ -x $HOME/.xsession ]; then
               exec $HOME/.xsession
               exec /bin/sh $HOME/.xsession
# Start a cmdtool session
$OW/bin/cmdtool &
# Start OpenLook Window Manager
exec olwm

Individual XDM Session Management Files

For information on creating .xsession files, see the NCDware System Administrator's Guide.

Configuring the XDM Xaccess File

The Xaccess file is used only by the X11R5 and X11R6 versions of XDM and is required on all hosts running X11R5 or X11R6 XDM. Its function is to control access to the host.

If you are using the Login Chooser, you do not need to configure this file unless the terminal is sending an indirect query and you want to configure the host's response.

The default file provided on the NCDware distribution is shown here. This file allows all terminals to connect to the host:

# XDMCP access file

*         # allow everybody

If you edit the Xaccess file while XDM is running, XDM automatically re-reads the file and uses the new information the next time a terminal connects to the host.

Contents of an Xaccess File Entry

File entries consist of hostnames, patterns, and macros:

Types of Xaccess File Entries

Xaccess files have two types of entries:

In all cases, XDM uses the first entry that matches the terminal name. If the terminal sends an indirect query, only indirect entries in the file can match. If the terminal sends a direct or broadcast query, only direct and broadcast entries can match.

Direct and Broadcast Entries in the Xaccess File

In a direct query, the terminal sends a request directly to a host. In a broadcast query, the terminal sends a request to all hosts on the network.

Direct and broadcast entries consist of a terminal hostname or a pattern representing one or more terminals.

Example Entries

The following entry permits direct and broadcast connections to this host from all terminals on the network:


This entry allows direct or broadcast access to this host from the terminal ncdu10:


This entry allows access from any terminal in the oceans domain:


This entry prevents direct or broadcast access by the terminal ncdu11:


Indirect Entries in the Xaccess File

Indirect entries are forwarded to another host or list of hosts.

Indirect entries consist of terminal hostnames or patterns followed by a list of XDM manager hostnames, macros, or the keyword BROADCAST.

Example Entries

To force a terminal to a connect to a specific host, you can assign the terminal sending indirect queries to this host. For example:

ncdu12 atlantic.oceans.com

This entry disallows indirect access by ncdu13:

!ncdu13.oceans.com dummy

The following example forwards queries from all terminals with names beginning with ncdu to the hosts listed in the %HOSTS macro.

%HOSTS atlantic.oceans.com pacific.oceans.com \

ncdu*.oceans.com     %HOSTS

Configuring the xdm-config File

The xdm-config file is the master XDM configuration file. The functions of this file are to set some resources for the xdm client and specify the names and locations of all of the other configuration files XDM uses.

You can substitute your own files for the default configuration files. The following is an example.

DisplayManager.servers: /usr/lib/X11/xdm/Xservers
DisplayManager.errorLogFile:    /usr/lib/X11/xdm/xdm-errors
DisplayManager.forwardingMode:  false
DisplayManager*resources:       /usr/lib/X11/xdm/Xresources
DisplayManager*startup:         /usr/lib/X11/xdm/Xstartup
DisplayManager*reset:           /usr/lib/X11/xdm/Xreset
DisplayManager*session:         /usr/lib/X11/xdm/Xsession
DisplayManager*pingInterval:    60
DisplayManager*pingTimeout:     720
DisplayManager.keyFile:         /usr/lib/X11/xdm/xdm-keys

Each resource in the xdm-config file has one form for setting the resource for all terminals and another for setting the resource for an individual terminal. For example, the authorize resource enables or disables user-based access control.

Instead of the colon ( : ) normally used in specifying the terminal's display name, an underscore ( _ ) is used in the xdm- config file. This is because of the colon's special meaning in resource specifications.

The two lines below disable user-based access control for all terminals and enable access control for the terminal ncdu15:

DisplayManager*authorize: false
DisplayManager.ncdu15_0.authorize:      true

Configuring the Polling Interval

The pingInterval resource controls how often XDM polls terminals to see if they are still running. The units are minutes.

DisplayManager*pingInterval: 60
DisplayManager*pingTimeout:            720

Configuring the Version of xrdb to Use

For OpenWindows, add the following line to the xdm-config file so XDM can find the correct version of xrdb, the utility used to load client resources:

DisplayManager*xrdb: /usr/openwin/bin/xrdb

Configuring the XDM Xresources File

The Xresources file sets resources for clients that run before the user logs in (such as the login banner) and is read by each X server as it connects to XDM. The class name for the login prompter is xlogin.

You should edit the following entry in the file so the desired greeting is displayed in the login banner:

xlogin*greeting: your greeting

The XDM Error Logging File

The xdm-errors file logs errors reported by XDM. It must be world-writable.

[Top] [Prev] [Next] [Contents] [Index]

Send comments, suggestions, or questions about this document to the NCD Technical Publications Department by Internet e-mail. Write to us at techpubs@ncd.com.
Copyright © 1997, NCD Inc. All rights reserved.