Just about every flavor of unix has a GUI based on the X window system, with
the exception of the two flavors Steve Jobs had his hands in, NeXT and MacOSX.
X - X server
The X Window System, or just X, is the Graphical User Interface (GUI) you'll
find on most unix workstations. Unlike the GUIs on MacOS or Windows systems,
X is merely a framework that a user environment sits on top of. X can have
any look and feel you want, because look and feel is not part of what X does.
X isn't built into the O/S either, it's just a set of userland applications.
mwm - de facto resource-minimalist window manager
xterm - X client which gives shell access
xinit - script which loads X and window manager
xeyes - great program for testing
The thing that makes X really cool is that X is not only a GUI, it's a
network protocol. X works on a client/server principle that makes it a
perfect compliment to the O/S designed for remote access from the beginning.
The way X implements it's client/server protocol might seem a little backward
if you're used to other client/server protocols. In X, the server is the
display, keyboard and mouse, the part the user sits in front of, while the
clients that connect to it are the graphical applications.
X clients can connect to an X server across any TCP/IP network (and some other
types of network too, but I won't cover that here).
The first client that usually connects to an X server is a special client
called a window manager. This program deals with making the borders around
windows and allowing you to size and move windows around. You can run X
without a window manager, but you'll notice all the window borders and
titlebars will be missing, without which a windowing system has much more
limited functionality. Just as there are many shells, there are many window
- twm (Tabbed or Tom's Window Manager). Simplistic to the point of being
mostly unusable. Resizing windows requires holding the mouse button down
on a titlebar icon and dragging to where you'd like the bottom right corner
to end up. There is no titlebar close icon (so hope your program has an exit
- mwm (Motif Window Manager). Quite simplistic but much more usable. Motif
is almost as old as twm, has a look and feel mush like MSwin31, and has a
user definable root menu (the menu which pops up if you click on the
root window, the background). I use this, I like it, it's usable while not
being too resource intensive.
- olwm (Open Look Window Manager). This was Sun's window manager when they
first started shipping an X server. It's older than mwm, but it still ships
with solaris today
- cde (Common Desktop Environment). This will look much more familiar to
MsWin users. It has an integrated file manager and a taskbar looking panel.
It was invented jointly by Sun, HP, and IBM, in an attempt to standardize the
look of the unix workstation desktop across different vendors.
- kde (K Desktop Environment). Ships with most linux distros. Pretty damn
bloated. Looks nice and easy to use though.
- Gnome (Gnu window manager). Bloated to the point of being mostly unusable. I'd
tell you how much memory it requires, but that would require me to actually install
the damn thing.
Once you've got your X server up and running, you can connect as many clients
to it as you like. Clients can run on your machine or on someone else's, so
long as you have an account on that system. Most X clients you run will
come from your local machine, but it's nice to have the option.
So let's say, for example, you're running MS Windows on your local machine and
you've downloaded and installed the free X server which you found on our
windows utilities page and then you logged into our
machine Monolith and wanted to run the X client named `xeyes' and have it
display on the X server on your machine. First you'd set the environment
variable DISPLAY, which tells x clients what X server to connect to, to your
IP address. For this example, I'll assume your IP address is what the web
server tells me it is, which is 22.214.171.124.
Monolith% setenv DISPLAY 126.96.36.199:0
Then you can just type the name of the program you want to run:
And after a while, the program will show up on your display. Cool huh? The
program is running on Monolith, but shows up on your machine!
The first program you'll probably want to run though, is the window manager.
Most MSWindows X servers come with a window manager, but if yours doesn't
try doing this first:
Monolith% mwm &
and then run the program you're interested in:
The ampersand after mwm causes mwm to run in the background (and thus returns
control of your terminal to your shell so you can type more commands). You'll
notice that typing xclock as shown above without an ampersand causes xclock
to retain control of your terminal. For more information on ampersands in
command lines and what they do, which is called "job control",
check out our
If you are logging in with a secure shell client, look through your
configuration settings for an option named `X11 forwarding' or `forward X
connections' or some such thing. Using that, you don't have to worry about
setting the DISPLAY variable, plus the X connection happens over the encrypted
tunnel of the ssh connection. More on secure shell when I write a page about
Normally you'll run X from the workstation you plan to run all of your programs
from. This is usually pretty easy to do, as most systems come with a program
called `xinit' or `startx' which can automatically run your X server and then
connect your favorite window manager to it. And usually the window manager
has a menu you can choose the x clients you wish to run from. Usually one
of these clients is some form of xterm, which is just an X client that gives
you access to the command line. If you run that, you'll notice your DISPLAY
variable is already set, so you can just run commands and they'll pop up.
Keep in mind though, that if you log into a remote machine and run `xinit' on
that, that the server will run on that remote machine, and thus will
not do you a lot of good. Unless you want to mess with the person sitting
in front of the machine...