330 lines
13 KiB
HTML
330 lines
13 KiB
HTML
<!--startcut ==========================================================-->
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<title>Converting old PCs into standalone X11 Terminals</title>
|
|
<META NAME="keywords" CONTENT="linux unix x11 terminal cheap xdm 486 xfree86 debian">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#A000A0"
|
|
ALINK="#FF0000">
|
|
<!--endcut ============================================================-->
|
|
|
|
<H4>
|
|
"Linux Gazette...<I>making Linux just a little more fun!</I>"
|
|
</H4>
|
|
|
|
<P> <HR> <P>
|
|
<!--===================================================================-->
|
|
<DIV align="center">
|
|
<H1>
|
|
X Window System Terminals
|
|
</H1>
|
|
<img width=320 height=240 border=1 alt="486 X Terminal" src="./gx/kaszeta/xterminal.gif">
|
|
<h2> A New Use for Old and Outdated PCs</h2>
|
|
<h3> by <a href="mailto:bofh@me.umn.edu">Rich Kaszeta</A> </H3>
|
|
</div>
|
|
<hr>
|
|
|
|
<h2>Summary:</h2>
|
|
|
|
<p>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.
|
|
|
|
<h2>Background:</h2>
|
|
|
|
<p>Here at the <a href="http://www.me.umn.edu/">Mechanical Engineering
|
|
Dept.</a> 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.
|
|
|
|
<p>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.
|
|
|
|
<p>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.
|
|
|
|
<h2>XDM: The basic concept:</h2>
|
|
|
|
<p><tt>xdm</tt> 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".
|
|
|
|
<p>However, <tt>xdm</tt> can also provide graphical X11 logins to
|
|
remote machines, such as NCD Xterminals. The only requirement is that
|
|
the remote machine speak X.
|
|
|
|
<p>What we are describing here is configuring a cheap PC to act just
|
|
like one of these Xterminals.
|
|
|
|
<h2>Setting up the X Terminals</h2>
|
|
|
|
<p>Setting up the 486 PCs as graphical X terminals fairly
|
|
straightforward, consisting of just a few steps:
|
|
<OL>
|
|
<LI>Installing a minimal Debian Linux system on each PC
|
|
<LI>Configuring each PC to start up X and query an XDM server to get a
|
|
list of hosts to connect to.
|
|
<LI>Configuring one or more XDM servers to provide "chooser" services
|
|
to the X terminals.
|
|
<LI>Configuring XDM and the chooser to be more aesthetically pleasing
|
|
and useful.
|
|
</OL>
|
|
|
|
<P>I'll discuss each of these steps in turn.
|
|
|
|
<h3>Installing a minimal Linux system:</h3>
|
|
|
|
<p>Since our existing Linux systems run <a
|
|
href="http://www.debian.org">Debian Linux</a> we chose to use it for
|
|
these PCs as well.
|
|
|
|
<p>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).
|
|
|
|
<p>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.
|
|
|
|
<p>Finally, we installed a few additional packages for convenience,
|
|
including basic networking utilities (<t>netbase</t>), <tt>ssh</tt>
|
|
(to allow use to remotely log in through a secure channel), and
|
|
<tt>nvi</tt> since the systems staff here doesn't like the default
|
|
Debian text editor.
|
|
|
|
<h3>Configuring each PC to start up X:</h3>
|
|
|
|
<p>The first step was configuring X to run locally on each PC. An
|
|
<a href="XF86Config"><tt>XF86Config</tt></a> file was created for the machines using the standard
|
|
'<tt>xf86config</tt>' utility, with a couple of considerations:
|
|
<UL>
|
|
<LI>The "Emulate3Buttons" option was enabled, since the mice that came
|
|
with the machines are only 2-button mice.
|
|
<LI>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.
|
|
<LI>For added security, "DontZap" is specified so that users cannot
|
|
inadvertently kill the X server.
|
|
<LI>We added additional SGI-defined colors to
|
|
<tt>/usr/lib/X11/rgb.txt</tt> so that the X-stations could talk to our
|
|
SGIs without errors.
|
|
<LI>You may wish to set up a font server somewhere.
|
|
</UL>
|
|
|
|
<P>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):
|
|
|
|
<pre>
|
|
X -quiet -query weber
|
|
</pre>
|
|
|
|
which gives us the standard xdm login window for "weber":<p>
|
|
<div align="center">
|
|
<img border=1 width=629 height=402 alt="standard xdm login window"
|
|
src="./gx/kaszeta/xdm1.gif">
|
|
</div>
|
|
|
|
<P>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 <a href="xterm1"><tt>/etc/init.d/xterm</tt></a>.
|
|
|
|
<P>On a Debian system, we install it with '<tt>update-rc.d xterm defaults
|
|
99</tt>'. (The procedure for Redhat, Slackware, etc., is similar).
|
|
We then reboot the machine to make sure it starts X upon boot.
|
|
|
|
<h3>Configuring an XDM server to provide a "chooser":</h3>
|
|
|
|
<P>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).
|
|
|
|
<P>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 <tt>Xaccess</tt> file (located in
|
|
<tt>/etc/X11/xdm</tt> on Debian machines, it may be located under
|
|
<tt>/usr/lib/X11</tt> or another location on other machines).
|
|
Typically, the default <tt>Xaccess</tt> file on most systems is fairly
|
|
well commented and includes a number of simple examples, so it's
|
|
pretty easy to figure out.
|
|
|
|
<P>Basically, you have to add a line to the file of the form
|
|
|
|
<pre>
|
|
hostname CHOOSER host-a host-b
|
|
</pre>
|
|
|
|
where <tt>hostname</tt> is the name of the host to provide the chooser
|
|
to (it can be a wildcard such as "<tt>*</tt>" or
|
|
"<tt>*.domain.name</tt>", the <tt>CHOOSER</tt> tells <tt>xdm</tt> 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 <tt>BROADCAST</tt>, it will list all xdm-enabled machines on
|
|
the local network.
|
|
|
|
<p>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
|
|
<tt>Xaccess</tt> has the line
|
|
<pre>
|
|
* CHOOSER BROADCAST
|
|
</pre>
|
|
|
|
<p>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
|
|
<pre>
|
|
* CHOOSER machine list ...
|
|
</pre>
|
|
instead.
|
|
|
|
<p>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:
|
|
<pre>
|
|
console.me.umn.edu CHOOSER server1 server2 ...
|
|
</pre>
|
|
|
|
<p>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
|
|
<pre>
|
|
X -indirect weber
|
|
</pre>
|
|
and we should then see the chooser come up:<p>
|
|
<div align="center">
|
|
<img border=1 width=799 height=589 alt="standard chooser"
|
|
src="./gx/kaszeta/chooser.gif">
|
|
</div>
|
|
Functional, but a little ugly.
|
|
|
|
<p>So now that we know it works, we change our
|
|
<a href="xterm"><tt>/etc/init.d/xterm</tt></a> script, replacing the
|
|
"-query rayleigh" with "-indirect weber".
|
|
|
|
<h3>Configuring the chooser through X resources and scripts:</h3>
|
|
|
|
<p>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.
|
|
|
|
<p>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
|
|
<tt>/etc/X11/xdm/Xresources</tt> (or a similar location on non-Debian
|
|
machines).
|
|
|
|
<p>On our systems, we wanted to do the following:
|
|
<ul>
|
|
<li> Change the header to say "Available MEnet Systems"
|
|
<li> Change the fonts to be more legible
|
|
<li> Make the list two column, with a gap between the columns, and
|
|
sorted vertically.
|
|
<li> Move the scrollbar to the right.
|
|
<li> Enlarge the window slightly.
|
|
</ul>
|
|
|
|
To accomplish this, we edited <tt>/etc/X11/xdm/Xresources</tt> to
|
|
insert the following:
|
|
<pre>
|
|
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
|
|
</pre>
|
|
|
|
<p>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 <tt>/etc/X11/xdm/xdm-config</tt>, adding the line
|
|
<pre>
|
|
DisplayManager*chooser: /usr/lib/X11/xdm/chooser.script
|
|
</pre>
|
|
where "chooser.script" is
|
|
<pre>
|
|
#!/bin/sh
|
|
xsetroot -solid skyblue4
|
|
/usr/lib/X11/xdm/chooser $*
|
|
</pre>
|
|
|
|
The final result looks like:<p>
|
|
<div align="center">
|
|
<img width=876 height=563 border=1 alt="customized chooser"
|
|
src="./gx/kaszeta/chooser2.gif">
|
|
</div>
|
|
Much nicer, no?
|
|
|
|
<p>A <strong>lot</strong> more customization is possible, through both
|
|
X resources and the XDM configuration scripts. Consult the
|
|
<tt>xdm</tt> man page for more details.
|
|
|
|
<h2>Conclusion:</h2>
|
|
|
|
<p>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).
|
|
|
|
<p>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...
|
|
<P>
|
|
<a href="http://www.menet.umn.edu/~kaszeta">Rich Kaszeta</a>
|
|
<!--===================================================================-->
|
|
<P> <hr> <P>
|
|
<center><H5>Copyright © 1998, Rich Kaszeta <BR>
|
|
Published in Issue 27 of <i>Linux Gazette</i>, April 1998</H5></center>
|
|
|
|
<!--===================================================================-->
|
|
<P> <hr> <P>
|
|
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
|
|
ALT="[ TABLE OF CONTENTS ]"></A>
|
|
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
|
|
ALT="[ FRONT PAGE ]"></A>
|
|
<A HREF="./wkndmech.html"><IMG SRC="../gx/back2.gif"
|
|
ALT=" Back "></A>
|
|
<A HREF="./lg_backpage27.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
|
|
<P> <hr> <P>
|
|
<!--startcut ==========================================================-->
|
|
</BODY>
|
|
</HTML>
|
|
<!--endcut ============================================================-->
|