kevin@northants.lug.org.uk
Revision History | ||
---|---|---|
Revision v1.00 | 2002-05-16 | Revised by: KT |
Minor updates to all sections. Added details of Windows/Linux interoperability. Added section on starting XDM. Added details of KDM and GDM. Added new software resources. | ||
Revision v0.05 | 14 November 2000 | Revised by: KT |
Added cross-references to other Howtos | ||
Revision v0.04 | 6 November 2000 | Revised by: KT |
Updates after first public draft. | ||
Revision v0.03 | 3 July 2000 | Revised by: KT |
Minor updates from first comments | ||
Revision v0.02 | 28 June 2000 | Revised by: KT |
First SGML source draft from HTML source | ||
Revision v0.01 | 27 June 2000 | Revised by: KT |
First HTML source draft |
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).
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.
Members of the Northants LUG, UK for proof reading the document.
The writers of the XDM, Xserver man pages and the default XDM scripts.
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).
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 would be a machine with no local disks, that would perform its boot up from an EPROM (or similar) and utilises a network connection to a server. It would obtain its network configuration, operating system, system configuration and all applications from the server. Once booted however, this would be the same as a 'dumb X terminal' (see below). Typically this configuration would use a combination of the following network protocols in order to boot: BOOTP, DHCP, TFTP, etc. Refer to Section 7 for some references that detail how to build diskless X terminals.
This would be a machine that boots from its local disk into an operating system, and starts the 'X server' program and nothing more. Somehow, a login prompt would be provided on the machine, to enable a user to login to an 'application server' somewhere on the network.
This would be similar to a dumb X terminal, but would provide the option of logging on to the local machine itself, hence would be quite capable of becoming a standalone workstation (i.e. no network connectivity) if required. Most distributions can be configured 'out of the box' as a stand-alone X Workstation, with a graphical login prompt.
In the context of this document, I use the term 'application server' to describe a machine that will provide the applications (X clients) that our X terminal will want to run. This can include everything from editors and browsers, through to the actual 'Window Manager' itself.
This is the program that manages the display of a machine with a physical console (display, keyboard, mouse, etc). It can be thought of as a combined graphics card, keyboard and mouse 'driver'. This will provide these facilities as a service to X clients (hence the term 'server'). Please refer to the X User Howto in Section 7 for more details.
This is an application that requires the use of an X server to access input (keyboard and mouse) and output (display). An X client cannot produce output without the services of the X server. The X server could be running locally (on the same machine, as is the case with an X workstation) or elsewhere on the network (as is the case with an X terminal connecting to an Application Server).
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.
There are 2 main ways that XDM can interact with an 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.
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 |
DisplayManager._0.resources /etc/X11/xdm/Xres_0 DisplayManager*resources /etc/X11/xdm/Xresources |
DisplayManager.host_0.resources /etc/X11/xdm/Xres_host_0 |
DisplayManager._0.resources: /etc/X11/xdm/Xresources_0 DisplayManager._0.setup: /etc/X11/xdm/Xsetup_0 DisplayManager._0.startup: /etc/X11/xdm/Xstartup_0 DisplayManager._0.reset: /etc/X11/xdm/Xreset_0 |
DisplayManager*resources: /etc/X11/xdm/Xresources DisplayManager*setup: /etc/X11/xdm/Xsetup DisplayManager*startup: /etc/X11/xdm/Xstartup DisplayManager*reset: /etc/X11/xdm/Xreset |
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:
/usr/X11R6/bin/X -query the.application.server |
You can run X on a Linux box, instructing it to query a Solaris machine as previously described:
/usr/X11R6/bin/X -query the.solaris.server |
FontPath "tcp/solaris.box:7200/all" |
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):
Windows Terminal Services (WTS). RDesktop is a Linux application that understands the 'RDP' protocol used by WTS. This enables Linux to act as a client to WTS (see Section 7).
Vitual Network Computing (VNC). This is an excellent platform independent remote desktop system that provides a bi-directional 'Windows or Linux' to 'Windows or Linux' networked desktop. It can be a bit slow, but works well (see Section 7).
You can actually do quite strange things with VNC, such has having multiple machines connect and 'control' the desktop (and consequently 'fight' over control of the mouse :). It also doesn't maintain any state in the client, so you can leave your client, shutdown, bootup again, reconnect and carry on from where you left off. There is even a version of the viewer implemented as a Java applet, usable from any Java-enabled web browser.
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):
@echo off if "%1"=="" goto noserver goto allok :noserver echo Usage: xdm servername goto end :allok set path=%PATH%;\cygwin\bin;\cygwin\usr\X11R6\bin c: chdir \cygwin\usr\X11R6\bin XWin -query %1 :end |
Many of the references listed below form part of the Linux Documentation Project (LDP): http://www.tldp.org/
X User Howto (from the LDP)
Running Remote X Applications Mini Howto (from the LDP)
Man pages: X (main concepts), Xserver (X server concepts)
X FAQ (on http://www.x.org/)
Thin-client Howto Document (from the LDP)
Linux Terminal Server Project: http://www.ltsp.org/
Setting up LTSP systems (using quiet hardware): http://development.gbdirect.co.uk/xterminal.html
Diskless Howto Document (from the LDP)
X terminal pages: http://dns.solucorp.qc.ca/xterminals
Richard Kaszeta: Converting old PCs into Standalone X Terminals: http://www.menet.umn.edu/~kaszeta/unix/xterminal/
Man pages: xdm
XDMCP Howto Document (from the LDP)
Cygwin/XFree86 (Win32): http://www.cygwin.com/
rdesktop: http://www.rdesktop.org/
X Servers for Windows (and other systems): http://www.rahul.net/kenton/xsites.html
GPL Java X Server: http://www.jcraft.com/weirdx/
X Terminal/Diskless specific distributions: http://lwn.net/Distributions/