The X Window System
The public-domain X Window System (or just X) implements a hierarchy
of resizable windows and supports high-performance device-independent
graphics in a client-server paradigm. X is based on an asynchronous
network protocol and not on procedure or system calls. This allows
many advantages:
- Both local and network connection can be operated in the same way,
making the network transparent, both from the user's point of view, and
from the application's point of view
- X has been implemented over a wide range of operating systems and
computer hardware
- X has good performance over the network
This last advantage is because X is designed to be efficient on the
network; this was achieved via the client-server paradigm discussed
below. The information necessary to set up a new window is minimal;
the size of the window, background color, font style and size, ... If
an intelligent ``server'' -- the X server -- receives this minimal
information, it can act on it and ``serve'' a window with the
appropriate characteristics. The amount of information that needs to
be carried over the network is small compared to, say, a bitmap
description of the same window. This renders X an efficient system for
maintaining windows at a distance.
The Client-Server Paradigm
The client is the computer requiring a window to be opened.
It can be local, meaning being the same CPU as the X server, or on a
local network, or on a World Wide network, such as the Internet. The
server is implemented on the local, hopefully fast, CPU and
display. It carries out the operations that the client requires. This
division of labor greatly enhances the speed of graphics display. But
the most important important advantage is that the window required by
the client computer can be located anywhere on the network; X requests
are then sent asynchronously over the network and fulfilled by the
local server. This allows full interactive sessions, with all the
sophisticated graphics and image manipulations that may be required,
to be conducted from a distance.
This raises the question of security. X can open a window on any
server on the network; would you like a person in Japan, say, to be
able to open a window on your computer without your permission? To
guard against this, X supports a security complement. Before a client
can open a window on any display, the server must be authorized to
accept X requests from this particular client. To do this, you must
type on the server
xhost client_hostname
where ``client_hostname'' is the network name of the client you want
to authorize on the server. Then, the client must be told where to
send the X requests; type on it
setenv DISPLAY server_hostname:0
where ``server_hostname'' is the server hostname.
A server can serve more than one client at once. These various clients
need only be authorized to use the server. Consequently, it is common
practice to have numerous windows talking to different computers,
either locally or on the net. Also, a client can communicate with
many servers simultaneously; this is the feature used in ``shared
application'' environments, where applications simulaneously display
results on many servers, or in teleconferencing software, where
voice and video images are shared by different displays.
X Window Managers
Unlike many other window systems which implement a particular user
interface, X is a substrate on which many different user interfaces
can be built. The application which controls the user interface is the
window manager. This a client which has authority over the layout of
the windows on the screen, and to some extent over the properties of
the windows. It is this client which defines the ``look and feel'' of
the window on the screen. Among others, there are
- twm (Tab Window Manager) the window manager
provided with the X distribution from MIT
- olwm , the proprietary window manager from SunSoft,
the software branch of Sun Microsystems
- Motif , the look and feel used by Digital and many other
vendors
- HPview , the proprietory look and feel from HP
- MacX , the Macintosh implementation of X
These different window managers will present very different looks and
feels to the user; however, applications running under the X protocol
will work on all X servers, regardless of the window manager used.
X Tools
Many utilities (clients) have been written to run under X; these are
typically available as ``contributions'' in the X distribution
kits. They are often written in C and make use of the standard X
libraries, Xlib and Xt Intrinsics. Some have been written at MIT; many
others come from other sources.
Some of the most useful utilities are:
- xv
- An image-handling tool for Gif, Pict,... files
- display
- Another image-handling tool for Gif, Pict,... files
- ghostview
- A postscript previewer
- ximage
- A NCSA program to display data in image form
- xdvi
- A TeX (word processor) previewer
- xwd
- Dump an image of an X window
- xpr
- Print an X window dump
- xpaint
- A MacPaint-like program
- mpeg_play
- To ``play'' mpeg ``movies''
These utilities are often intuitive to use; a little trial & error
is all that is needed. You can get general descriptons of these
commands, and some help concerning their use, in the ``man'' pages.
References
The interested reader can find the best references to the X
window system in a series of authoritative monographs
published by O'Reilly & Associates, Inc. , with
titles such as
- The X window system in a Nutshell
- Volume 0: X Protocol reference Manual
- Volume 1 & 2: Xlib Programming Manual; Xlib Reference Manual
- Volume 3: X Window System User's Guide
- ...
Note that these monographs are very detailed and may contain far more
information than you ever really wanted to know.