Introduction to the X Window System



next up previous contents
Next: The X Server Up: The X Window Previous: The X Window

Introduction to the X Window System

The X Window System is a network-transparent graphical user interface technology for bitmapped displays [Sch91]. It is a collection of protocol definitions, file formats, documentation and sample software source code in C for server, client, and utility programs. It was designed to be portable between different operating systems and display hardware. It was developed by the Athena Project at MIT, which was supported by IBM and Digital. Its continued development has been taken over by the X Consortium, which is made up of developers, vendors and users of X. The X Window System is copyrighted by MIT and the X Consortium, but the specifications and source code are freely available. As a result, it has been widely accepted by the computer industry.

This near-universal acceptance has advantages and disadvantages from a security perspective. On the one hand, X's wide usage helps make it more robust, and ensures that security concerns are also widely felt, leading to better security solutions. On the other hand, the freely available source and specifications, and the wide publication of X's strengths and weaknesses make ``Security through Obscurity'' impossible.

What distinguishes X from most other graphical user interfaces is the way its architecture splits the graphics functionality between the application itself, which is known as the X client, and another program, known as the X server (all subsequent references to a client or application should be read as ``X client application'').

In the database world, there are similar client/server architectures. A database server program, often running on a mainframe computer, listens for and responds to database requests from database client programs, which usually run on workstations of some type. The database server maintains exclusive control of the database, and multiplexes requests and synchronizes database activity.

In the graphics world, the X server program maintains exclusive control of the display and multiplexes requests from X clients. Just as multiple database clients can share the database via the database server, multiple graphical client applications can share a display via the X server. The graphical client/server protocol is the X protocol. The X protocol can be used over any inter-process communication mechanism that provides a reliable octet-stream.

  
Figure 7.1: Comparison of Architectures.

This is in contrast with the traditional graphics architecture, which consisted of an application which made calls to a graphics library which in turn made calls to a device-dependent graphics driver which controlled the display. If one wanted to port the application to a new machine, operating system or display, one might have to re-write the application and graphics library and graphics driver. If one used a standard graphics library like GKS, one might avoid rewriting the application and library, if there was a compatible library and graphics driver for the new machine. But the graphics output would still be confined to a single machine (see fig. 7.1).

X provides a common low-level programming interface (known as Xlib), a common protocol (X) and a common device-independent replacement for the graphics driver (the X server). So porting a client to a new machine is relatively easy, and the X server only needs to be ported once for each display architecture.

The X architecture allows a single display to show the output of programs running anywhere on the network. This permits the user to run a CPU-intensive problem on a Cray, run a mail program on a Sun, and run a wordprocessor on a Compaq, and display all the programs on a single screen [Hel90]. Figure 7.2 illustrates this concept. The X11 Server drives the display of the user's workstation. An X application (the X client) using the toolkit can run on a Cray connected to the network, display results in a window on the user's workstation, and accepts input from the user's keyboard and mouse. Likewise, another X client application can run on a Sun connected to the network and display results in another window on the user's screen.

  
Figure 7.2: X Window System Architecture.



next up previous contents
Next: The X Server Up: The X Window Previous: The X Window



John Barkley
Fri Oct 7 16:17:21 EDT 1994