In each case, the configuration described is the minimum necessary to accomplish each goal. In most cases this means that the configuration is also the least secure. Please refer to some of the additional documentation listed in Section 7 for information about securing XDM and X terminals (in particular the 'Running Remote X Applications Howto' from the LDP).
This describes the following scheme of XDM configuration files:
These must be setup for the machine actually running XDM itself. They will typically be found in (Debian 2.1. Mandrake 7.0.2, RedHat 6.2):
/etc/X11/xdm |
/usr/X11R6/lib/X11/xdm |
Defines the names and locations of the other configuration files and the basic access permissions. For all distributions considered for this document, the file names were as listed here (but sometimes the locations varied).
This also defines the scripts to be run for the various state transitions for an X session, i.e. on startup, etc. You should not need to change these, as most distributions would appear to come with this pre-configured for you.
Note that XDM managed X sessions have a different set of startup and configuration scripts to X sessions started via xinit or startx (i.e. non-XDM managed X sessions).
Some distributions (e.g. Redhat 7.1) include the following line in this configuration file, which will prevent XDM from listening for queries:
DisplayManager.requestPort: 0 |
!DisplayManager.requestPort: 0 |
Determines which machines can connect to XDM - i.e. from which other machines on the network we are accepting XDMCP queries. If a machine is not listed in this file, then it will not be able to request a login prompt from XDM.
Contains a list of machines that XDM will connect to, to provide a login prompt, automatically - i.e. those machines already running an X server, but would like this machine to provide the login prompt.
This is only required for 'XDM Managed X Servers'. You do not need any entries in this file if you will be relying on remote X servers to query XDM.
When running as a stand-alone 'X Workstation', there is usually a single entry in this file, listing just the localhost.
Details of the X properties used by the XDM widgets (e.g. size of the login 'box', colours, bitmap backgrounds, etc).
# First the local host :0 local /usr/bin/X11/X vt7 # # Then the remote hosts emma:0 foreign alex:0 foreign |
# First line for direct queries * # Following line for indirect queries * CHOOSER BROADCAST |
This means that any host may request a login prompt via XDM (the first '*') using a direct query.
It is possible to place specific host names or specifications of network IP addresses (e.g. a whole IP network or specific hosts) in these entries (and there are also other indirect queries possible, without using the chooser) but this is not described here (refer to Section 7 for some links to more information).
/usr/X11R6/bin/X -ac |
/usr/X11R6/bin/X -query the.remote.host /usr/X11R6/bin/X -indirect the.remote.host /usr/X11R6/bin/X -broadcast |
In each case, X will probably have to be started as root.
It is possible to have a machine automatically start X and perform a query for a running XDM on the network. One way is to 'hijack' the inittab setting for running as a graphical login (this is runlevel 5 on Debian and Redhat based systems, and 3 for SuSE - this example assumes runlevel 5 throughout). This is often the line beginning x:5 towards the end of /etc/inittab. Set this to (or add it if it doesn't exist):
x:5:respawn:/usr/X11R6/bin/X -broadcast |
id:5:initdefault: |
id:5:initdefault: |
#!/bin/sh # xdm start/stop script for RedHat based systems # # chkconfig: 234 60 60 # description: xdm permits remote users to logon to this X display # processname: /usr/X11R6/bin/xdm # config: /etc/X11/xdm/xdm-config # source function library . /etc/rc.d/init.d/functions [ -x /usr/X11R6/bin/xdm ] || exit 0 prog=/usr/X11R6/bin/xdm RETVAL=0 start () { echo -n $"Starting $prog: " # start daemon daemon $prog RETVAL=$? echo [ $RETVAL = 0 ] && touch /var/lock/subsys/xdm return $RETVAL } stop () { echo -n $"Stopping $prog: " killproc $prog RETVAL=$? echo [ $RETVAL = 0 ] && rm -f /var/lock/subsys/xdm return $RETVAL } restart () { stop start RETVAL=$? return $RETVAL } # See how we were called. case "$1" in start) start ;; stop) stop ;; status) status $prog RETVAL=$? ;; restart) restart ;; condrestart) # only restart if it is already running [ -f /var/lock/subsys/xdm ] && restart || : ;; reload) echo -n $"Reloading $prog: " killproc $prog -HUP RETVAL=$? echo ;; *) echo $"Usage: $0 (start|stop|restart|condrestart|reload|status)" RETVAL=1 esac exit $RETVAL |
Chooser*geometry: 700x500+300+200 |
The chooser will obtain its lists of hosts by one of two methods:
%hostlist emma alex liam abigail * CHOOSER %hostlist |
Not that it is possible to include the localhost in the list of machines known to the chooser as well. XDM should be configured not to startup on the local console display though. Login should always be performed via an indirect query to the local chooser application, then the localhost should appear alongside any other hosts on the network.
[Xdmcp] Enable=True |
The following must be set in the GDM configuration file (/etc/X11/gdm/gdm.conf):
[Xdmcp] Enable=True |
0=Standard |