Running X from Red Hat

for Display on Debian Thin Client


When I started this weekend I had an old clunky '94 486. It's only redeeming features were its PCI slots and the high 133 MHz clock rating. I would have gladly handed it over to the first one to ask. My only spare drive was small, slow and loud. Incredibly this project has transformed it into a very enjoyable machine with reasonable speed, many times more useful than before.

This document will cover the steps required to use an old (slow) computer to display `X' (Graphical Interface) while utilizing an existing fast system for processing as well as to provide the file system (NFS mounted) for the slower computer. This is a great way to get some mileage from an old computer. This is not a new idea, in fact most of my work was derived from two main sources as well as the Linux Terminal Project ( The main flow comes from "Making an X Terminal from a PC" by Patrick Swieskowski ( and an extension paper by Dr. Alan W. Irwin ( You may also want to visit the Linux Terminal Server Project (

The machines in this example are behind a very restrictive firewall. Do not use X over any untrusted network , like the Internet, unless it is tunneled inside something like SSH. Every user and every machine on the network must be fully trusted as non-encrypted X transmissions are available to anyone.

This document will attempt to provide a complete process for using a Red Hat Linux system as the main server, Debian as the embedded system and an old 486 as the target display. The fast system is called Nova, and the old one is Bandit.

Nova: AMD 650 MHz, 448 MB ram, ATA100 drive, 100 Mb ethernet, running Red Hat 7.1 kernel 2.4.2-2 with KDE-2 as the desktop environment. IP

Bandit: 486 with an AMD 133 MHz overdrive chip, floppy drive, 10 Mb ethernet connection. The machine was unusable with any kind of GUI when running a locally installed OS. At the beginning of the project it had 72 MB ram and a 10 Mb ethernet connection, but it doesn't need that much ram and I found a half duplex 100 Mb card, so as we move along we will update the card. IP and the MAC (hardware address) 00:a0:cc:5c:3c:a0 which you will need later. There is no hard drive or CD-ROM required/desired.

Bandit was a functioning dumb terminal server I was fiddling with so I knew that the display, serial and ethernet worked. You should test the system prior to this project because you are sure to run into problems, knowing the hardware is functional is very important for your sanity.

I will refer to the systems by name throughout this paper so remember Nova is fast and Bandit is the X-Terminal display. You will need to use your own system names, IP's, MAC addresses and directory choices.

Fast Start

Here are the basic steps that we will need to do:

  1. Create a directory on nova called /usr/xterminal (to install / file system)
  2. Download and unpack Debian into /usr/xterminal
  3. Copy /etc/resolv.conf and /etc/hosts to /usr/xterminal/etc/
  4. Edit hosts and new fstab files in /usr/xterminal/etc/
  5. chroot into /usr/xterminal and d/l, install and configure Xfree86
  6. Download a kernel of your choice to use to boot Bandit
  7. Compile the kernel, copy the image to a boot disk
  8. Tell the boot disk to boot over NFS
  9. Set up DHCP, NFS, XDM on Nova. (several files to tweak, see below)
  10. Start XDM, DHCP and NFS on Nova
  11. Boot Bandit and test logon, then X after the console and network are all ok
  12. Put XDM into inittab in /etc on Nova

What could possibly go wrong :-O

Communication Sequence
  1. Bandit boots from floppy which broadcasts for an IP address (DHCP sequence...)
  2. Nova sends Bandit DHCP info including location of Bandits root file system.
  3. Bandit sends out a request to mount nova:/usr/xterminal, Nova acknowledges.
  4. Bandit now runs from Debian inside Red Hat on Nova via the NFS mounted root file system.
  5. Bandit starts an X display which is served from Nova, and has its client side server running from the NFS mount on Nova.

My terminology of X Servers and Clients is probably not technically correct, but the environment/apps/login etc are run under Red Hat and the part that deals with displaying and interacting runs from within the Debian root (on Nova).

Detailed Install

Installation Section 1

Debian Root FS Install:
  1. get hardware information on Bandit including NIC, MAC Address, video card specs, monitor specs, mouse and com port. This should be a basic machine, no sound or hard drives etc.
  2. log into Nova and become root "su \"
  3. create a directory to house the terminals root file system "cd /usr;mkdir xterminal"
  4. quit root (paranoia is good)
  5. download the Debian base install. (mine was base2_2.tgz). I used:
  6. become root "su -"
  7. edit hosts file to include bandit, if necessary.
  8. cd to /usr/xterminal
  9. move base2_2.tgz into /usr/xterminal and then unpack. "tar xzvf base2_2.tgz"
  10. copy resolv.conf and hosts files "cp /etc/resolv.conf /etc/hosts ./etc/"
  11. check if /etc/xterminal/etc/hosts lists a machine name for
    if " localhost.localdomain localhost" it's ok.
    but if " localhost.localdomain nova" then CHANGE IT !
    change to " localhost.localdomain bandit"
  12. create a fstab file "vi ./etc/fstab" and add two lines: /nfs defaults 0 0
    proc /proc proc defaults 0 0
  13. create a hostname file on Bandit by doing this:
    echo bandit >/usr/xterminal/etc/hostname
  14. you can add entries to /etc/hosts.allow & /etc/hosts.deny for added security:
    hosts.deny file:
    ALL: ALL

    hosts.allow file:
  15. make /usr/xterminal root file system "chroot /usr/xterminal bash \login"
  16. use Debian utilities to get and install:
    updates with: "apt-get update"
    then XFree86 with: "apt-get install xserver-svga xfonts-100dpi xfonts-base"
    *find your video driver name at (link may wrap the line in this doc)
  17. X will bring up a configuration script. Enter information matching Bandit. Do not probe the video and at the end, do NOT test the configuration (last option).
  18. check for and if present remove the file /sbin/
  19. exit from the chroot (root jail) "exit" (leaving you as root on Nova).
  20. quit root "exit", you are back to a regular user.

Installation Section 2

Create the Bootable Floppy Disk
  1. download a new kernel to compile for the diskless station (Bandit). I am using
    (first run failed on 2.2.19 but it turns out it was compiled wrong).
    go to
  2. become root "su -"
  3. go to /usr/xterminal/usr/src, move the new kernel there
  4. extract "tar xzvf linux-2.4.4.tar.gz" (it will create /usr/xterminal/usr/src/linux)
  5. I always link it to make experiments easier to work with. Two steps:
  6. enter the linux dir and compile a new kernel. This is the part that I had some problems with as far as what I needed and what I didn't. I may have ended up with a few extras so you may want to experiment a bit.
    The basic compiling consists of three steps, only the first requires user input. If you need more information on compiling, I have a page that's lacking in details but will help you walk thru the steps ( Also, Linux Documentation Project ( is a great start for any info on Linux.
  7. Here are a few of the options I included in the kernel:
  8. the basic sequence is "make config;make dep;make bzImage"
  9. copy the new image to a floppy disk "dd if=arch/i386/boot/bzImage of=/dev/fd0"
  10. you must still be in "/usr/xterminal/usr/src/linux" as root.
  11. the next steps tell the boot disk it will boot over NFS:
    1. create a temporary device "mknod /dev/boot255 c 0 255"
    2. apply it to the disk "rdev /dev/fd0 /dev/boot255"
    3. remove the temp device "rm /dev/boot255"
  12. you can take the new boot disk out. It is ready to boot Bandit.

Installation Section 3

Setting up the Server and X Services
  1. this is done as root "su -"

  2. DHCP server:
    1. check if it is installed "chkconfig --list|grep dhcp", install the dhcpd server via Red Hat RPM if needed.
    2. create the lease holding file "touch /var/lib/dhcp/dhcpd.leases"
      (see notes below under Section 6, Tips and Tricks)
    3. create or edit /etc/dhcpd.conf to read:
      • # dhcpd config file, created.....(whatever comments you want)
         # check the man page for all the options you can enter
        default-lease-time 21600;
        max-lease-time 21600;
        option subnet-mask;
        option broadcast-address;
        option routers;
        option domain-name "nesbitt.sooke";
        subnet netmask {
        host bandit {
        hardware ethernet 00:a0:cc:5c:3c:a0;
        option root-path "/usr/xterminal";
        host deep {
        hardware ethernet 00:04:ac:26:b0:97;
      • (NOTE, Deep is a laptop used to test the dhcp service)

    4. run dhcp startup script "/etc/init.d/dhcpd start"
      if it does not indicate "OK" then try "/usr/sbin/dhcpd" to see error messages.

  3. NFS server:
    1. check if it's installed "chkconfig --list|grep nfs", install the nfs server via Red Hat RPM if needed.
    2. create or edit /etc/exports to include the line:
      "/usr/xterminal,no_root_squash)" (no quotes)
    3. run nfs startup script "/etc/init.d/nfs start"
    4. if it does not indicate "OK"
      then try "/usr/sbin/exportfs" to see error messages (see the man exportfs for simple arguments).

  4. XDM service:

Installation Section 4

Finally Booting Bandit
  1. boot Bandit with the boot disk made earlier. Watch for errors.
  2. login to Bandit as root (no password, so run "passwd" to set one!)
  3. check network with ifconfig. Try pinging an outside URL.
  4. run "X -probeonly" checks video and posts any errors encountered.
  5. log into Nova's X server run "X -query"
  6. if you have display problems use "ctrl-alt-BACKSPACE" to exit.
  7. you will want to use a non-root acct existing on Nova
  8. that should put you at a KDE desktop and ready to work.
  9. after exiting KDE, use "ctrl-alt-BACKSPACE" to kill get a prompt back.

Installation Section 5

Final Touches

That should be it. Enjoy!

Other Considerations and Options

Tips and Tricks

Next Step

XDM communicates using UDP for it's transport layer, that is why it is a problem sending it over SSH, although separate applications and windows can be tunneled inside SSH for a secure connection. Anyway, UDP would lend itself to sending streaming audio to the X-terminal PC. That may make a good next step project, learn about redirecting audio I/O.

original document created by Pete Nesbitt, August 2001