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 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 486 PCs as graphical X terminals fairly straightforward, consisting of just a few steps:
I'll discuss each of these steps in turn.
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).
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 (
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:
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 weberwhich 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.
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).
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-bwhere hostname is the name of the host to provide the chooser to (it can be a wildcard such as "*" or "*.domain.name", 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
* CHOOSER BROADCAST
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 ...instead.
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:
console.me.umn.edu 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 weberand we should then see the chooser come up:
So now that we know it works, we change our /etc/init.d/xterm script, replacing the "-query rayleigh" with "-indirect weber".
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:
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 #endif
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.scriptwhere "chooser.script" is
#!/bin/sh xsetroot -solid skyblue4 /usr/lib/X11/xdm/chooser $*The final result looks like:
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...