Converting old PCs into standalone X11 Terminals


This page describes how to convert low-end 386/486 PC’s into standalone X Window Systems terminals which can serve as graphical terminals to your existing Linux/Unix workstations.


Here at the Mechanical Engineering Dept. at the University of Minnesota, we inherited a number of old IBM PS/Valuepoint 486 machines (16 Meg memory, 200 Meg HD) with keyboards and monitors, and were trying to find a way to get some good use out of them.

Originally, we discussed placing Linux on them (our department already has dozens of Pentium-class Linux machines which are quite popular), but decided that with their low disk space and memory they wouldn’t run fast enough to suit our current users’ needs, and that it wasn’t economical to upgrade them.

Our solution was to install a minimal Debian Linux system on them (base install plus basic networking, X, and a few utilities), and configure them to act as X terminals, allowing us to provide extremely cheap fully-graphical terminals, which are used in graduate student offices and as X interfaces to our headless Unix servers.

XDM: The basic concept:

xdm is a « display manager », providing X login windows to users. The traditional use of xdm is to provide a graphical login on the local display on an X11 workstation, so that the user does not need to start up X « by hand ».

However, xdm can also provide graphical X11 logins to remote machines, such as NCD Xterminals. The only requirement is that the remote machine speak X.

What we are describing here is configuring a cheap PC to act just like one of these Xterminals.

Setting up the X Terminals

Setting up the 486 PCs as graphical X terminals fairly straightforward, consisting of just a few steps:

  1. Installing a minimal Debian Linux system on each PC
  2. Configuring each PC to start up X and query an XDM server to get a list of hosts to connect to.
  3. Configuring one or more XDM servers to provide « chooser » services to the X terminals.
  4. Configuring XDM and the chooser to be more aesthetically pleasing and useful.

I’ll discuss each of these steps in turn.

Installing a minimal Linux system:

Since our existing Linux systems run Debian Linux we chose to use it for these PCs as well.

On each system, we installed just the basic Debian system from floppy, which provides a very bare-bones Linux system with networking support. No user accounts were created, since none are needed (since no users actually log into the machine itself).

READ  Linux Ext2fs Undeletion mini-HOWTO: Introduction

Next, Debian packages of XFree86 3.3 were loaded on each system. We loaded the base X11 libraries, the X extensions, the S3 X server (since the PS/Valuepoints have 2-meg S3-based video card), and all the X11R6 fonts.

Finally, we installed a few additional packages for convenience, including basic networking utilities (netbase), ssh (to allow use to remotely log in through a secure channel), and nvi since the systems staff here doesn’t like the default Debian text editor.

Configuring each PC to start up X:

The first step was configuring X to run locally on each PC. An XF86Config file was created for the machines using the standard ‘xf86config’ utility, with a couple of considerations:

  • The « Emulate3Buttons » option was enabled, since the mice that came with the machines are only 2-button mice.
  • While the 2-meg S3 card in the Valuepoints is capable of up to 1152x900x16bit resolution, we chose to run 1024x768x8bit, since it runs at a more comfortable refresh rate, better viewability on the 15-inch IBM monitors, and provides better compatibility with local applications than 16-bit color.
  • For added security, « DontZap » is specified so that users cannot inadvertently kill the X server.
  • We added additional SGI-defined colors to /usr/lib/X11/rgb.txt so that the X-stations could talk to our SGIs without errors.
  • You may wish to set up a font server somewhere.

Once we were satisfied with the configuration of the X server, we then tested if it could connect to a workstation running xdm (« rayleigh » in this example):

X -quiet -query weber

which gives us the standard xdm login window for « weber »:

So, we now know everything is basically working. If we just want the PC to talk to a single workstation, then we are basically done. The only remaining step is to make sure that X is started upon bootup. We can do this with a script in /etc/init.d/xterm.

On a Debian system, we install it with ‘update-rc.d xterm defaults 99’. (The procedure for Redhat, Slackware, etc., is similar). We then reboot the machine to make sure it starts X upon boot.

Configuring an XDM server to provide a « chooser »:

We’ve already set up a basic X Terminal. However, it can only talk to a single machine. If we would like it to be able to connect to a number of other machines, we’ll have to have at least one machine in our network configured to provide a host « chooser » to our X terminals. In this discussion, the machine providing « chooser » xdm services is called « weber » (note that in this example « weber » is a Linux box, but it could be any xdm-enabled workstation).

READ  Linux PCMCIA HOWTO: General information and hardware requirements

The first step is to configure weber to provide the chooser to hosts that connect through an « indirect » XDM connection. This is controlled by the Xaccess file (located in /etc/X11/xdm on Debian machines, it may be located under /usr/lib/X11 or another location on other machines). Typically, the default Xaccess file on most systems is fairly well commented and includes a number of simple examples, so it’s pretty easy to figure out.

Basically, you have to add a line to the file of the form

hostname CHOOSER host-a host-b

where hostname is the name of the host to provide the chooser to (it can be a wildcard such as « * » or « * », the CHOOSER tells xdm to provide a chooser to these hosts, and the remainder of the line is a list of machine names to list in the chooser. If you use the special hostname BROADCAST, it will list all xdm-enabled machines on the local network.

So, if we want all machines to be given a chooser that allows them to select any machine on the local network, we’d make sure Xaccess has the line


However, in our system we have a number of machines in different subnets, so we can’t rely on a broadcast to find them all. So we use

* CHOOSER machine list ...


Additionally, we can specify different lists for different machines. As mentioned previously we wanted to use one of the PCs as a graphical terminal for our headless SGI workstation (which runs xdm). So we have this machine, « console », be given a list of only the server machines: CHOOSER server1 server2 ...

The next step is to modify the X terminal to connect to the XDM server using an ‘indirect’ query. We first test it by logging into the X terminal PC, and starting X with

X -indirect weber

and we should then see the chooser come up: Functional, but a little ugly.

So now that we know it works, we change our /etc/init.d/xterm script, replacing the « -query rayleigh » with « -indirect weber ».

READ  Framebuffer HOWTO: Using framebuffer devices on ARM platforms

Configuring the chooser through X resources and scripts:

Well, now that we’ve got everything basically working, all that we have left is to clean up the configuration of the chooser so it is a little more useable and visually pleasing.

The chooser can be configured using X resources. By changing these resources we can do things such as change the chooser fonts, the layout of the list, and the colors. These resources are set in /etc/X11/xdm/Xresources (or a similar location on non-Debian machines).

On our systems, we wanted to do the following:

  • Change the header to say « Available MEnet Systems »
  • Change the fonts to be more legible
  • Make the list two column, with a gap between the columns, and sorted vertically.
  • Move the scrollbar to the right.
  • Enlarge the window slightly.

To accomplish this, we edited /etc/X11/xdm/Xresources to insert the following:

Chooser*geometry:               810x500+300+225
Chooser*allowShellResize:       false
Chooser*ShapeStyle:             Oval
Chooser*viewport.forceBars:     true
Chooser*label.font:             *-new century schoolbook-bold-i-normal-*-240-*
Chooser*label.label:            Available MEnet Hosts
!Chooser*list.font:             -*-*-medium-r-normal-*-*-230-*-*-c-*-iso8859-1
!Chooser*Command.font:          *-new century schoolbook-bold-r-normal-*-180-*
#ifdef COLOR
Chooser*label.foreground:               white
Chooser*label.background:               midnightblue
Chooser*Command.background:            gray80
Chooser*list.columnSpacing:         25
Chooser*list.defaultColumns:         2
Chooser*list.forceColumns:         true
Chooser*list.verticalList:              true
Chooser*internalBorderColor:            black
Chooser*Command.font:           -adobe-helvetica-bold-r-*-*-12-*
Chooser*viewport.useRight:      true

Finally, we wanted to get rid of the default X11 « thatch » pattern on the root window, since it gives a horrid moire effect on small monitors. To do this, we tell xdm to use a shell script, called « chooser.script » instead of the normal « chooser ». This script simply sets the background to « skyblue4 » and runs the normal chooser. We set this in /etc/X11/xdm/xdm-config, adding the line

DisplayManager*chooser:         /usr/lib/X11/xdm/chooser.script

where « chooser.script » is

xsetroot -solid skyblue4
/usr/lib/X11/xdm/chooser $*

The final result looks like: Much nicer, no?

A lot more customization is possible, through both X resources and the XDM configuration scripts. Consult the xdm man page for more details.


With relatively little work, and very little subsequent administration (the X terminals seldom crash, and don’t need software updates), we converted a bunch of « junker » PCs into rather useful X terminals (I’ve even done a 386 this way and it runs fine).

As a final note, it’s important to point out the while the particular systems I’ve described here are PCs running Debian Linux, the same technique applies equally well to resuscitation of any older X11-capable machines, such as older Suns (Sparc ELCs), HPs, and SGIs…

Rich Kaszeta

indexnew-4694166 homenew-9333426 back2-1175699 fwd-8584085