This document describes the basic ideas for using XDM to manage X terminals. It is not meant to be a comprehensive discussion of all the features of XDM, but a gentle introduction to what XDM can do.
For a full discussion about the installation and configuration of X terminals, please refer to the 'Thin-client' HOWTO, from the Linux Documentation Project or the Linux Terminal Server Project (see Section 7).
This document is copyrighted (c) 2000-2002 Kevin Taylor and is distributed under the terms of the Linux Documentation Project (LDP) license, stated below.
Unless otherwise stated, Linux HOWTO documents are copyrighted by their respective authors. Linux HOWTO documents may be reproduced and distributed in whole or in part, in any medium physical or electronic, as long as this copyright notice is retained on all copies. Commercial redistribution is allowed and encouraged; however, the author would like to be notified of any such distributions.
All translations, derivative works, or aggregate works incorporating any Linux HOWTO documents must be covered under this copyright notice. That is, you may not produce a derivative work from a HOWTO and impose additional restrictions on its distribution. Exceptions to these rules may be granted under certain conditions; please contact the Linux HOWTO coordinator at the address given below.
In short, we wish to promote dissemination of this information through as many channels as possible. However, we do wish to retain copyright on the HOWTO documents, and would like to be notified of any plans to redistribute the HOWTOs.
If you have any questions, please contact <firstname.lastname@example.org>
No liability for the contents of this documents can be accepted. Use the concepts, examples and other content at your own risk. As this is a new edition of this document, there may be errors and inaccuracies, that may of course be damaging to your system. Proceed with caution, and although this is highly unlikely, the author(s) do not take any responsibility for that.
All copyrights are held by their by their respective owners, unless specifically noted otherwise. Use of a term in this document should not be regarded as affecting the validity of any trademark or service mark.
Naming of particular products or brands should not be seen as endorsements.
You are strongly recommended to take a backup of your system before major installation and backups at regular intervals.
The latest version number of this document may be obtained from The Northants LUG, UK Project Pages .
Thanks go to the following people for help with information and proof reading of the document.
Scot W Stevenson for the original X terminal mini-howto document, from 1995, on which some of the material for the section on advanced xdm-config configurations was obtained.
Members of the Northants LUG, UK for proof reading the document.
The writers of the XDM, Xserver man pages and the default XDM scripts.
Feedback is most certainly welcome for this document. Without your submissions and input, this document wouldn't exist. Please send your additions, comments and criticisms to the following email address: <email@example.com>.
I probably ought to mention some details about the following at some point ...
This document describes the basic concepts behind using XDM (the X Display Manager) to manage X terminals and X servers, in order to provide 'thin-client' computing, using Linux.
X (or the 'X Window System') is the windowing and graphics environment of choice for Unix systems. Its particular strength (and the key bit that we are interested in for this document) is that it separates the running applications (web browser, word processor, etc) from the actual graphics screen and input devices (mouse, keyboard, etc) via a network communications mechanism.
Essentially, this means that you can be running an application on one machine, but have its input and output redirected to another machine via a network. This is the key feature that makes an X terminal possible.
This document should be treated as a 'getting started with XDM' document, in that it describes the basic terms and concepts for using XDM and X terminals, with simple examples that provide the minimum amount of security.
The reader is advised to consult the list of resources provided at the end of the document in order to proceed beyond these basic facilities - in particular, the configuration of the 'authentication' and security settings should be examined, as the examples given in this document utilise the least secure modes of operation.
Please note - the majority of the information in this document was obtained from systems running Debian 2.1, SuSE 6.4, Mandrake 7.0 and RedHat 6.0.
This document does not discuss the installation or configuration of a network or X on Linux. Please refer to the appropriate HOWTO documents from the Linux Documentation Project for details (see Section 7).
This document also does not attempt to describe how to install and configure Linux for operation as an X terminal. For this information, please refer to the 'thin-client' HOWTO document, provided as part of the Linux Documentation Project, or the Linux Terminal Server Project (see Section 7).
This document came about because I wanted to experiment with Linux on a 486 PC as an X terminal to my main Linux box.
After reading the man pages, specifications and current howto documents relating to XDM and X terminals, I ended up getting really confused about where XDM was supposed to run and confusing XDM servers with X servers and the like, and so after an evening or two of experimentation, this document was born.
Once the basic terminology has been sorted out, the documentation for XDM and self-documenting sample files make very good reading - I just could not find a simple introduction to the basic concepts anywhere to get me started. Hopefully this document could prove to be a suitable introduction to someone in a similar position to me.
Oh, and in case you are wondering, a 486dx2/66 with 16 Mb RAM makes a fine X terminal!
Put simply, XDM (the X Display Manager) can be thought of as a graphical replacement for the command line 'login' prompt. In reality, it can actually do much more than that.
Typically, it would be started by the 'root' user (or the system startup scripts) on power up, and would present a user with a graphical login prompt. It will then manage the users X session once they login - i.e. it will initiate the running of their window manager and applications.
This could be considered a typical 'simple local machine login' configuration, as may be found installed by many Linux distributions by default. However, XDM can also manage remote X servers and provide login prompts to remote 'X terminals'. In short, it is not limited to the local machine - it can easily manage other machines connected via a network.
XDM is a very configurable utility and this document will only just 'scratch the surface' of what may be achieved. This document aims to provide enough information to configure your X terminals and application servers to connect to each other. The reader is referred to Section 7 for further information on the topics discussed here.
A note on security: X (in its default configuration) and XDMCP are not particularly secure. I am assuming that you are running X on a 'trusted' network and that security is not an issue. For details of how to tighten up your X connections (and more details about using the networking capabilities of X) please refer to the 'Running Remote X Applications' Howto document, which is also part of the LDP (see Section 7).
This term could be used to cover various configurations, but at its simplest, is a machine with a network connection, keyboard, mouse and monitor, configured to run the X Windows System to connect to an application server somewhere on the network.
There are several configurations of 'X terminal' with varying levels of functionality, ranging from completely diskless terminals to full X workstations.
Before I go any further, I ought to explain the terms I will be using in this document. When talking about X, there is quite a lot of confusion over what is serving facilities to what. This is especially true when you are considering distributed sessions over a network involving X terminals. I will be using the terms described below.
From the above descriptions, an X Workstation could be thought of as consisting of a dumb X terminal and application server running on the same machine.
This document will be looking at the architecture of the various options listed above and will describe the role that XDM can play in configuring them.
XDM is responsible for providing the user with a login prompt and initiating their X session. It can manage local sessions (i.e. people logging into an X workstation) or sessions on remote machines, via a connection to an application server, from a diskless or dumb X terminal.
XDM would typically run on an application server, to permit users to logon and run applications from that server.
There are 2 main ways that XDM can interact with an X Server:
The communications between XDM and the actual 'X server' (the machines with the physical screen/keyboard/mouse/etc) are handled via XDMCP the 'X Display Manager Control Protocol'.
This permits X servers to send out queries to servers running XDM. Effectively, the X server has to say 'I have someone wanting to login - please give me a login prompt'. In this mode of operation, XDM will not do anything unless it is asked to by your X server.
The query from the X server can take one of 3 forms:
There are several other options, but these will not be described here - refer to the XDM and XDMCP documentation in Section 7 for more details.
If you have a set of machines (e.g. diskless or dumb X terminals) that just end up running an X server, all designed to provide a login prompt to a single application server, then it is possible to configure XDM on the application server to connect back to each X server and present its login prompt on each display automatically.
In this mode of operation, XDM will actively 'push out' a login prompt to any listed X server that it knows about, without waiting for a query from the X servers themselves.
In this case, the configuration file 'Xservers' (see later) lists each machine (including the local display, if required) to which XDM should connect, to display its login prompt.
This configuration, when used with no remote X servers listed in the configuration, is the typical configuration used for a X workstation, in order to present a user with a graphical login to the local machine he is working on. As stated earlier, most distributions will support this configuration 'out of the box' in order to present the user with a local graphical login prompt.
Note: XDM must be permitted to connect to the X servers in question - so the access control on the X servers must be configured accordingly.
This section covers what needs to be configured for XDM to perform the functions described so far in this document.
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):
An entry must be placed in the Xservers file for each X server that XDM will be presenting a login prompt on. This could include the local machine and/or a list of remote machines.
This will start XDM on the local machine and also present a login screen on the X servers running on the hosts 'emma' and 'alex' (assuming that permissions have been setup on 'emma' and 'alex' such that this machine is permitted to connect to the running X servers).
Note that it is possible to specify the host and display (:0, :1, etc) if required. This is useful, for example, if you are running multiple X servers on a single machine, etc.
The file Xaccess determines which hosts may query XDM on this machine, in order to request a login prompt.
This means that any host may request a login prompt via XDM (the first '*') using a direct query.
The 'CHOOSER' line specifies which hosts can connect to XDM using indirect queries - in this case, any host may query this machine for a list of potential hosts to connect to (the second '*' line).
'BROADCAST' means that the 'chooser' application on this machine will obtain its list of available servers (that will also be running XDM) via network broadcast queries. I will talk about the 'chooser' later.
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).
The way you start the X server itself, will depend upon how you want it to interact with XDM locally and remotely.
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):
In a standard X workstation configuration, XDM would typically be started up by specifying the default initial run-level to be that corresponding to a full graphical login. On Redhat and Debian based systems this is usually runlevel 5. On SuSE it is run-level 3.
It is possible to run XDM automatically on startup by changing the default runlevel to that described above. This is configured in /etc/inittab as follows:
Alternatively it is possible to add a startup script for XDM itself to the rc scripts in the startup directories (/etc/rc.d/ for Redhat/Debian), to start and stop XDM in a similar manner to other services on a Linux machine.
The following script is suitable for a Redhat (and probably Mandrake) based system, and should be saved as /etc/rc.d/init.d/xdm. You will have to enable it using 'chkconfig --add xdm'.
When XDM receives an indirect query, and assuming that the appropriate options have been specified in Xaccess for the 'chooser' application, it can provide the user with a list of other XDM managed servers that it knows about.
In this mode of operation, instead of the normal XDM login prompt, the user will be presented with a 'chooser' application, which will provide a list of detected hosts on the network that are currently accepting XDM connections.
When I first tried the use the chooser, I found that the Xresources files that came with my SuSE and Debian systems, specified a size for the chooser widget that was too big for the screens ... The following line from the Xresources file fixed that:
The chooser will obtain its lists of hosts by one of two methods:
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.
Both KDE and Gnome have their own application to replace the standard XDM. They do similar things and are well documented. As far as providing remote X access, there is a single setting in the configuration file for the application to enable XDMCP support.
The xdm-config file provides a rich set of options, when it comes to defined scripts and other configuration files. In many cases, the defaults provided with your distribution should be fine, but for those of you who want more ...
The names of the startup scripts and configuration files used by XDM are determined by a series of statements in the top-level xdm-config file. This permits you to configure a different set of files for different X servers and X terminals, with different abilities.
For example, say you are using XDM to manage your local display, but also want it to accept queries from other X terminals on the network. It is possible to specify a different Xresources file for each of these cases, by using the following 2 lines in xdm-config:
Similarly, if you wanted a particular resource file for a specific host, you would use an entry like the following:
Note that XDM configuration files use the terminology host_0, where you would normally use host:0, to designate 'display 0 on host'.
If you look over your default xdm-config file, you will probably find that it has been setup so that your local X server has different files to the remote ones anyway, as different things must be performed on startup and reset of the server. My Debian file has the following for local servers:
This document has only briefly touched on the available X resources, but I should mention that it is possible to fully configure XDM via the Xresources file.
The following may all be changed if required:
There is a more detailed discussion of XDM resources, on Richard Kaszeta's web site (see Section 7)
This has already been mentioned several times in this document, but in summary, it is a PC running XDM, with a single entry in the Xservers file, relating to the localhost (i.e. the local machine).
This is usually the default configuration provided by most distributions 'out of the box'.
XDM runs on the application server:
X terminal runs X using a direct query to the application server:
XDM runs on an application server:
Each X terminal, just runs X, with suitable access control to permit XDM to connect to it.
It is possible to use a Linux X terminal to connect to another system running XDM. The same principles as above apply, but the specifics of configuring XDM (or its equivalent) will be specific to that system.
You can run X on a Linux box, instructing it to query a Solaris machine as previously described:
Note that you may have to configure X on the Linux machine to use the font server from the Solaris box. Although my Linux box connected and logged in fine without doing this, the fonts used by CDE were not displayed correctly.
I have not got this to work yet, as I don't have a Solaris box that I have any control over - but I am told that a font entry in /etc/XF86config similar to the following should work - you may have to change the port number from 7200 to something else (7100 has been quoted at me before). Can anyone confirm that this works?
It is not possible to use X to remotely display Windows applications on a Windows box. It is possible to use X to display Windows versions of X applications on a Linux box, using a Windows X Server and Windows X applications (for example the XFree86 Win32 port - see Section 7)
It is possible to view Windows applications remotely on a Linux box using one of the following applications (which don't rely on X or XDM):
If you have an X server for your system, it should be able to connect to a Linux XDM application server.
I assume that you would run XDM on the Linux box as usual, and instruct X on Solaris to query the Linux box - does anyone have any information on this?
If you have an X server for windows that supports XDMCP queries, then it should be possible to configure it to query the Linux box. You should just run XDM on the Linux box as usual.
There are many commercial X Server implementations for Windows, and I will not list them all here. There is also a port of XFree86 to Windows, that makes use of the cygwin libraries (used to port many GNU/Linux tools to Windows - see Section 7). This works well.
The following batch file would start the cygwin XFree86 X server on Windows and connect to a Linux box (or any OS/machine running XDM), assuming a default installation of cygwin and XFree86 in c:\cygwin (save it as xdm.bat):
This section lists some resources that have been consulted in order to construct this document and which provide further details to the concepts described.
Many of the references listed below form part of the Linux Documentation Project (LDP): http://www.tldp.org/