Using X Window

Last revision August 6, 2004

Table of Contents:
  1. What is a windowing system?
  2. The X Window system: definitions and concepts
  3. Server startup on Unix workstations
  4. Using an X terminal, PC or Macintosh as an X server
  5. XDMCP protocol for remote X servers
  6. Starting clients
  7. Authentication
  8. Window operations

The X Window system: definitions and concepts

The X Window graphical interface system was invented at Massachusetts Institute of Technology in the 1980s. Its purpose was to provide complete device and network independence. That is, it was designed so that it would be easy to port (transfer) to a new type of hardware, and so that programs running on one computer could use the display on another. This second feature is particularly useful, because it means that a less expensive display station on the desktop can be used to interact with programs running on much more expensive mainframe or server computers.

X has become a de-facto windowing standard for Unix and other multi-tasking workstations. Since 1994, X has been supported by the X Consortium, a manufacturer's association. Their charter is to distribute and improve the X system. The X source code is completely in the public-domain and may be freely copied and modified. The X Consortium encourages manufacturers to develop the low-level interface routines needed for their hardware and to donate those back to the master distribution source. Programmers around the world have developed programs that use the X system and donated those to the X distribution or otherwise made them freely available.

Different computer vendors would often make their own enhancements and changes to the look and feel of the X Window system. This made it difficult to port programs from one system to another. During the past few years, the Unix vendors have standardized on the Common Desktop Environment, or CDE, which provides the same programming interfaces and same look on all systems. CDE resembles the look and feel of the Microsoft Windows GUI. Linux systems typically use the Gnome or KDE interfaces to X.

X uses a client-server model to achieve its device and network independence.

A single program, called the server, controls the services of the X system, both the actual graphics display hardware, keyboard, and mouse, and the software services such as fonts and colors. All input and output is actually routed through this program. This server program must run on the computer to which the display is directly attached.

The programs that want to access the display are called clients. These programs call the X library functions to do input and output and so are independent of the actual device hardware. They can run on any computer on the network, not just on the same computer as the display. One of the X library functions allows them to open a connection to a remote server. One of the options to the client program controls which server it will use.

A window manager function is needed. This function allows you to move or re-size windows on the screen, make one window overlap another, turn a window into an icon to temporarily hide it, etc. This function can be provided by the X server software that is controlling the hardware. But in most cases, it is simply another client program which can run either on the computer with the display or on any other machine on the network! Various window manager clients have been written, and you can choose the one that fits your style best.

In the X Window system, a display is a set of hardware consisting of one or more output screens, a keyboard, and a pointing device (mouse). The pointing device is assumed to have at least 3 buttons. Sometimes keyboard combinations are used to emulate mouse buttons, for example, when running X server software on a Macintosh computer with only a one-button mouse. The display is controlled by a single X server process.

A computer may have more than one display, each controlled by its own X server process, but this is rare in practice. Most workstations have a single display. Displays are numbered from 0 (zero).

In X Window, a screen is a graphics output screen. There can be more than one screen per display, numbered from 0 (zero).

The standard Unix workstation has a single attached display screen. X client programs running on that workstation reference this attached display server with the address:


meaning that it is locally attached (the name localhost), display 0 (number following the colon) and screen 0 (number following the dot). Other synonyms for the locally attached display are local, Unix, or no name at all (just specify the display as :0.0).

An X client program can reference a display server on a remote computer by using the remote computer's host name or IP address in place of the term Unix. The remote name should include the domain name if it is not in the same domain as the client computer. Examples:


Comments or Questions?