SUMMARY - converting an 3/50 into an Xterminal (fairly long)

From: Bill Hart (
Date: Fri May 24 1991 - 02:32:04 CDT

Many thanks to all those who responded to my requests for assistance in
converting a Sun 3/50 into an Xterminal. The job is done and the thing
now works resonably well except for the normal X11R4/OW2.0 idiosyncracies,
certainly much faster than it did as a workstation, and no more
administration !!

The major problems I had were :
        1) getting the X server to accept clients from other machines.
        2) getting shelltool and cmdtool to run a shell after logging
in with xdm.

To summarize, the idea behind turning a 3/50 into an xterminal is that by
running a very minimaly configured kernel and no other processes besides the
X server, the machine is able to devote all it's energies to X, and hence
perform in an acceptable manner. I originally started out with Xkernel2.0
by Seth Robertson (, but finally wound up using
a configuration kindly supplied to me by I
expected it to take me 1/2-1 hour to get the thing set up and working
(which it did when I finally got Brents' configuration), but took me almost
a week in total.

I tried two approaches using the mit stuff with the Xsun server, and using
the OpenWindows server xnews. I got the xnews server to work ok, except
it would barf when trying to open up clients from remote machines (an
error message about too few entries on a stack), but xnews on a sun3 is
slooooowwww no matter what you do, so my advice is to forget about it and
stick to Xsun.

Most people suggested that as an answer to the first problem I had that I
should use xhost to add access control to the server. This sounds easy except
that using Xkernel Xsun or xnews is the last process started, the whole thing
falls in a heap when it dies. A shell script is used to replace init e.g.

(/Xsun :0)

# If we get here then we had a problem with Xsun.
# (Xsun should NEVER terminate)
echo "ERROR! Xsun terminated"

I worked out a work around for this which seemed to work quite well ;

DISPLAY=strait:0; export DISPLAY
# Fire up X
echo "Starting X" >/dev/console
/Xsun :0 >/dev/console 2>&1 &
# Go to sleep while we wait for the server to start up, and allow
# access for all hosts
/usr/bin/sleep 30 > /dev/console
/sbin/xhost + > /dev/console
wait > /dev/console
# Should never have to get to this state, only when server dies
echo "The sleeping dogs have awoken" > /dev/console

The final solution I used, has a real init and uses rc.boot to start stuff up
(I haven't tried doing the same thing in a shell init yet but it should work)
uses the -query option on Xsun, this works a treat, and makes authetication
work just like for a proper workstation ;

mount -ant nfs > /dev/console
echo -n " mount" > /dev/console

echo "." > /dev/console

echo "Starting X ..." > /dev/console
# Get rid of this shell with an exec (makes up for running init :-).
exec /Xsun.static.gcc :0 -query ocean > /dev/console

(ocean is the file server)

The second problem also has several solutions, (starting OW shelltool and
cmdtool from xdm), most people suggested starting an xterm with the -ls
option, and then starting the OW stuff from there. The problem is due
to the cmdtool's having no process group leader, a really easy solution
suggested by fwp1@Ra.MsState.Edu which was just placing a wrapper around
cmdtool and using setsid, e.g.

/usr/etc/setsid -b cmdtool {cmdtool arguements}

This works fine, (although you have to be careful, because if cmdtool isn't
called cmdtool it comes up as a shelltool).

So if you want to convert those old 3/50's 3/60's into xterminals then my
advice is use Seths' or Brents' (if he's willing to make it public) stuff
but watch out for the tricky bits such aany questions.

Many thanks to all those who responded:

(The home of Xkernel is [])

Sometimes computing is more like working in an abbatoir than science

Bill Hart Internet :
CSIRO Division of Oceanography Phone : +61 02 206 446
Hobart, Tas., 7000 Australia Fax : +61 02 240 530

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:14 CDT