Sunday 15 April 2007

How to use Knoppix as an X terminal service into a RedHat system

Quite regularly during our Linux courses and other work we have had the need to quickly demonstrate X-Windows' ability to provide full graphical logins into a "central" Linux (e.g. Red Hat Fedora or RHEL) system. Every time we try to do this it is a struggle to remember how to do so, as the security of the central host prohibit us or some misunderstood behaviour of the XDMCP protocol plays up while the whole class is watching this struggle.
So it's time to document how we managed to get this to work.

The last time we tried this was in April 2007 while teaching a Linux Introduction workshop in sunny Staines, England. We used the following configuration:
  • Client systems HP Compaq DC7100 running Knoppix 5.1.1 from CD
  • Central application server (serving login and xclients) HP Compaq DC7100 running Windows XP (host), VMWare Server version (1.0.1 29996) and Fedora Core 5 (guest)
  • 100Mbits local switched lan
This configuration was necessary, while working for this client we are not really supposed to change the configuration of the Windows XP system (the installation of VMWare server was permitted). Installing Linux was out of the question so the solution was: bootable CD with Knoppix for the XServer and VMWare running Red Hat Fedora for the "central" system running the XClients. Performance is not optimal of course, but for this project (an intermediate level Linux Introduction course) it worked very well with up to 6 workstations.

What is XDMCP ?

The X Display Manager Control Protocol (here is an HOW-TO). is a networked, application level, protocol that allows an XServer to remotely display a graphical login screen from a "central" Unix/Linux system. By logging into this screen the user gains access to the resources (XClient programs) on the "central" Unix/Linux system. In our setup we used the Knoppix CD to create a (rather sophisticated) XServer from a standard PC. From this Knoppix system we started another X server that listens to the XDMCP broadcasts or directly connects to the XDMCP enabled display manager.

What follows is a little tutorial on how to set this up quickly and reliably:

First of all the Fedora Core 5 system needs to make it's presence known using XDMCP broadcasts (or multicasts if you prefer). This can be done by (assuming access as root) changing settings in the
System --> Administration --> Login 
application:

This brings up the
Login Window Preferences
menu, choose the
Remote
tab:

This tab configures the "look and feel" of the login program (the X display manager) used by Red Hat to provide remote graphical logins into the host system. It also enables or disables the ability of the login program used by Fedora to make it's presence known over the network using XDMCP broadcasts and/or multicasts in the "Configure XDMCP" tab:

Make sure the settings are as above and click on "Close". Now the XServer needs restarting (logout and press simultaneously or if you don't mind reboot the system).

To be able to access the Red Hat login menu you must start a new X-server on your Knoppix system from the shell prompt using the following command:
sudo X :1 -query [hostname or ip-address]
or you can set the X-server to listen for broadcasts (it will then pick the first it receives) with the command:
sudo X :1 -broadcast
After a few seconds the default Fedora login menu will be displayed on your screen. Login to the system and you're done.

Powered by ScribeFire.

No comments: