The X Window System:
A Brief Introduction

The X Window System, commonly referred to merely as X, is a highly configurable, cross-platform, complete and free client-server system for managing graphical user interfaces (GUIs) on single computers and on networks of computers.

X is a large and complex system, with a level of complexity comparable to that of an operating system itself. It is one of the most powerful and useful software packages for Linux and other Unix-like operating systems, and it is the de facto standard graphic engine for such systems. X is also one of the most successful free software technologies that has been developed to date.

A GUI is a human-computer interface (i.e., a way for humans to interact with computers) that uses windows, icons and menus and which can be manipulated by a mouse (and often to a limited extent by a keyboard as well). GUIs stand in sharp contrast to command line interfaces (CLIs), which use only text and are manipulated solely via a keyboard.

The client-server architecture (i.e., network design) is a modularized system that divides work between two separate, but linked, programs, referred to as clients and servers. The latter, which typically (but not necessarily) run on remote machines (i.e., computers located elsewhere on the network), handle requests from multiple clients (i.e., users), process the data as requested, and return the results to the clients' computer screens.

Cross-platform refers to the ability of software to operate on more than one platform with identical (or nearly identical) functionality. The term platform can refer to any of several things, or to a combination thereof, depending on the situation: (1) the type of operating system (e.g., FreeBSD, Linux, Mac OS X, Solaris or any of the various Microsoft Windows systems), (2) the type of processor (e.g., x86, PowerPC, SPARC or Alpha) and (3) the type of hardware system (e.g., mainframe, workstation, desktop, handheld or embedded). An important factor in X's hardware independence is the fact that it is compatible with most currently available video cards.

A window system, also called a windowing system, is a collection of software that makes it easy to take full advantage of the window creation and other graphics capabilities of a computer. It keeps track of all the application programs that are being used, the windows that are associated with them, and the status of input and output from those applications. A graphic engine is software that is used by application programs to draw images on computer display screens.

Free software is software that is free both in a monetary sense and with regard to use. That is, it can be obtained by anyone at no cost and can be used for any desired purposes, including studying, copying, installing on any number of computers, modifying, extending and redistributing. One of the most outstanding examples, in addition to X, is Linux, which is the most rapidly growing operating system in terms of the number of installations. Another is TCP/IP (transmission control protocol/Internet protocol), which forms the basis for the Internet (and most other modern computer networks as well).

"Mechanism, Not Policy"

A major feature of X is that it is separate from the operating system. This is in sharp contrast to the situation for many non-Unix-like operating systems (including the Microsoft Windows systems and the Macintosh systems prior to OS X), for which the graphic engine is an integral part of the operating system. This separation means that if a GUI is not needed, then it is not necessary to install or run X. Thus, on computers and other systems for which GUIs are not required, such as those that are used solely as servers, it is possible (and very easy) to not install X, thereby eliminating the overhead (i.e., memory space and processor activity) of a GUI and instead applying all the hardware resources to faster responses to service requests, etc.

Also, consistent with its philosophy of mechanism, not policy, X does not specify or provide the user interface itself or any specification with regard to the the appearance of the interface, nor does it specify the behavior of application programs (including communications between them) or the functions of a window manager. This likewise contrasts with many other operating systems. Rather, the interface is handled by separate programs, and thus the visual interface of X-based environments is extremely flexible and multiple interface styles can easily coexist on a single computer.

X is actually a standard (i.e., a set of rules) rather than a single program, and any particular program that implements this standard is referred to as an X Window System. X is a low-level method of creating windows, receiving user inputs (key-presses and mouse events) and drawing lines, curves and bitmaps (i.e., images represented by a pattern of bits). The behavior of the application programs and the design and style of the user interface are left entirely up to those programs. However, all graphical display functions must adhere to the X standard if they are to work smoothly with Unix-like operating systems.

The user does not interact directly with X. This is because X is merely an intermediate software layer that provides the basic graphic capabilities that make it possible for window managers and desktops to work. That is, the windows and attractive backgrounds seen on the display screens of computers running Unix-like operating systems are not X, but rather they are a window manager or an integrated desktop.

X's lack of specification's regarding both the appearance of application programs and communication between such programs initially resulted in several very different interfaces and in application programs that frequently did not operate well together. However, this issue has been addressed with increasingly good results by integrated desktops, or desktop environments, which provide effective interface guidelines for obtaining both a consistency of the look and feel among applications and communication between them without sacrificing any of the ability of X to be configured by both users and programmers.

Unusual Client Server Architecture

The great flexibility of X is in very large part a result of its independence from the operating system and its client-server structure. However, the client-server relationship in X is inverted from the way in which client-server relationships are usually visualized; that is, rather than multiple client machines accessing a single server, each local machine (i.e., a computer used directly by a human) contains X server software and can access remote machines that run X client programs.

An X server is a program in X that runs on local machines and handles all access to the graphics cards, display screens and input devices (typically a keyboard and mouse) on those computers. It does the actual work of performing the requested display operation.

An X client is any application program. It displays on the X server but is otherwise independent of that server. It gains access to windowing services via the Xlib library (i.e., a collection of standard X tasks), which are translated by the system into X protocol messages to an X server. The desktop environment or window manager also acts as a client, requesting particular operations from the server, which feeds back that data and allows the client to draw a particular graphic image on the display screen. The X protocol is a standard, packet-based protocol (i.e., a mutually agreed upon set of rules) used by X for exchanging information about GUI operations between an X server and one or more X clients; that is, it is the message format of X.

This client-server architecture lets X operate separately from both the clients (i.e., application programs) and the operating system itself, which is the most reliable and secure solution. It has the advantage of letting the server interact with the operating system and its devices, whereas the application programs do not need to have any knowledge of these details, thereby simplifying their development. An application program operating as an X client can display on any system that uses an X server.

This client-server arrangement is employed not only over networks but also on individual computers. Although this might initially appear to be excessive or even strange, it works well for several reasons. One is the consistency between local and network operation. A second is that it provides the system with a high degree of stability. That is, if the X server crashes (i.e., freezes or otherwise stops functioning properly), the computer as a whole probably will not crash (i.e., the CLI will still be operable). Thus X can often be repaired without having to reboot (i.e., restart the computer), which could waste time and possibly cause other problems as well.

The device independence and separation of the client and server requires considerable extra overhead, which initially resulted in a significant performance penalty as compared to more integrated systems such as Microsoft Windows and Macintosh prior to OS X. In fact, X was formerly regarded as bloated as compared with such systems. However, the subsequent dramatic drops in the costs of storage (i.e., disk space), memory and processing capacity have resulted in the increased flexibility and other advantages far more than compensating for the greater resource consumption.

Origins of X

Consistent with its large size and complexity, the history of X has likewise been rather complicated. X was initially conceived at the Massachusetts Institute of Technology (MIT) in 1984 as part of Project Athena, a joint effort between the MIT Laboratory for Computer Science and Digital Equipment Corporation (DEC) to provide easy access to computing resources for all students and make the existing assortment of incompatible workstations from different vendors work together. As funds were not available to purchase new, mutually-compatible workstations and no single vendor appeared willing to donate them, the Institute thus became interested in developing a platform-independent graphics system to link together its existing, heterogeneous systems.

Several bitmap display systems had been devised prior to X. The first was that used by the Alto, which was developed by Xerox PARC in 1973 and was the first computer to have a GUI. This was followed by the Macintosh in 1984, which was the first commercially successful computer to feature a GUI. Some GUIs were also developed for UNIX, notably the Andrew Project and Blit in the early 1980s.

X was born in May 1984, when Bob Scheifler substituted an asynchronous protocol for the synchronous protocol of the W Window System (W) and replaced the display lists with immediate mode graphics (i.e., graphics in which geometric shapes are drawn directly on the display screen). W was an earlier window system which had been developed for Stanford University's experimental V operating system, and it was the source of X's name. X was the first graphics system that was truly hardware and vendor independent. Scheifler is a computer scientist who is best known for his role in the development of X.

X progressed rapidly, with Version 6 being introduced in January of the following year. This version was then ported to (i.e., modified for use on) DEC's MicroVAX microcomputer and color support was added a few months later to support the DEC VAXstation-II/GPX, thereby becoming Version 7. Version 9 was released in September, followed soon thereafter by Version 10. Outside organizations were soon requesting X, and X10R3 (Version 10 Release 3), which was released in January 1986, became the first version to achieve widespread deployment. The final release of X10 was X10R4.

The protocol design for X11, the current major version of X, was proposed by Smokey Wallace of DEC and Jim Gettys of MIT. Work commenced in May 1986, and X11 was released in September 1987. It was offered as free software under the same terms as X9 and X10.

In 1988, with the success of X11 becoming increasingly obvious, the MIT X Consortium, a non-profit vendor group, was formed to direct its future development an atmosphere inclusive of both commercial and educational interests. This organization produced several significant revisions to X11, the first being X11R2 in 1988 and the last being the milestone X11R6 (Version 11 Release 6) in May 1994.

The X Consortium was established in 1993 as the successor to the MIT X Consortium. It was an independent, non-profit vendor group that was entrusted with supporting the maintenance and further development of X. This organization was, in turn, dissolved at the end of 1996, at which time it released a final small revision, X11R6.3. In mid-1997, stewardship of X was transferred to The Open Group, a vendor group formed in early 1996. Subsequently, in May 1999, the Open Group formed X.Org, which was responsible for X11R6.5.1 and several additional releases.

A radical transformation in the management of X occurred in early 2004 with the formation of the X.Org Foundation by The Open Group. Whereas the stewards of X since 1988 had been vendor organizations, the X.Org Foundation is led by software developers and utilizes a community development model. Moreover, membership is open to individuals, while corporate membership is in the form of sponsorship.

X11R6.7 was released in April 2004. This was followed in September of the same year by X11R6.8.0, and then nine days later by X11R6.8.1, which incorporated a security fix. The most recent revisions as of March 2006 were X11R6.9 and X11R7.0, which were released on December 21, 2005. The latter is first new major version of X in more than a decade and the first release of the complete modularized and autotooled source code base for X. Autotools are de facto standard programs for portably building (from source code) and installing applications across various Unix-like operating systems.

X11R6.9 contains features identical to those of X11R7.0 and uses the exact same source code, but it differs in that it retains the traditional imake build system. In addition, X11R7.1, which is scheduled for release in mid-2006, will feature a new modular format that is said to facilitate both its development and the distribution of updates to users.

Despite its great success, not everyone is completely satisfied with X11, or even with X in general. Major criticisms have been its large size and great complexity and the fact that it does not exploit the full graphics potential of modern computer hardware. Consequently, a number of attempts have been made to develop alternatives to and replacements for it, but none have been commercially successful. Moreover, nothing is likely to displace X for years to come for several reasons, including (1) its very widespread (and growing) use, (2) the need for full backward compatibility, (3) the diminishing importance of the X's so-called bloat as a result of the rapid drops in the cost of memory and storage space and (4) the fact that improvements are continuing to be made to X.

Created March 29, 2006.
Copyright © 2006 The Linux Information Project. All Rights Reserved.