X Window System

From Wikipedia, the free encyclopedia.

(Redirected from X11)
X Window System logo

In computing, the X Window System (commonly X11 or X) is a windowing system for bitmap displays. It is the standard graphical interface on Unix, Unix-like operating systems and OpenVMS, and is available for most other modern operating systems.

X provides the basic framework for a graphical user interface (GUI) environment: drawing and moving windows on the screen and interacting with a mouse keyboard and touchscreen. Unlike contemporaries such as Microsoft Windows, X is not integral to the operating system's API and does not mandate the user interface itself — this is handled by individual programs. The visual styling of X-based environments therefore varies greatly; different programs may present radically different interfaces.

X features network transparency: the machine where application programs (the client applications) run need not be the user's local machine (the display server). X's usage of the terms "client" and "server" is the reverse of what people often expect, in that the "server" is the user's local workstation which serves the applications' needs for input and display space.

X originated at MIT in 1984. The current version, X11, was released in September 1987. The ongoing development of X is significantly more intense in 2004 than at any point in its history and is now led by the X.Org Foundation. The current reference implementation is version 11 release 6.8.1.

KDE 3.1
Enlarge
KDE 3.1
GNOME 2
CDE on Solaris 8
Enlarge
CDE on Solaris 8
DECwindows CDE on OpenVMS 7.3-1
Enlarge
DECwindows CDE on OpenVMS 7.3-1
Contents

Architecture

X is based on a client-server model. A client application program runs on a computer 'host' and communicates with various X servers running on remote PCs or X terminals, accepting requests for graphical output (windows) and user input (keyboard, mouse, touchscreen).

This client-server terminology — your terminal is the "server", the remote applications are the "client applications" — often confuses new X users, because the terms appear reversed. But X takes the perspective of the program, rather than the end-user or the hardware: the remote programs connect to the X servers running on displays which are local to the users.

The communication protocol between server and client runs network-transparently: the client application and X server may run on the same CPU or on different ones, without regard to the different architectures and operating systems. A client application and its various X servers can even communicate securely over the Internet using the secure shell (SSH) which implements port forwarding so as to tunnel X securely over a TCP/IP connection.

Practical examples include: running a computationally intensive simulation on a remote Unix CPU or cluster and displaying the graphical output simultaneously on various remote Windows displays; administering a remote machine graphically.

Implementations

The canonical implementation of X is the X.Org reference implementation. The X license is at [1] (http://www.x.org/Downloads_terms.html).

Due to the liberal licensing, a number of implementations both free and proprietary, have appeared, based on the code from X.Org. Commercial Unix vendors tend to take the X.Org reference implementation and adapt it for their hardware, usually customising it heavily and adding proprietary extensions. One commercial implementation not tied to a hardware vendor is Accelerated-X.

Up to 2004, the most common X variant on free Unix-like systems was XFree86. This originated from the X386 server included with the reference implementation, hence the name. The current most popular open source X server is the current X.Org reference implementation, the XOrg Foundation Open Source Public Implementation of X11, a fork of XFree86.

While X is most often associated with Unix, X servers also exist natively within other graphical environments such as DESQView/X, OS/2, and Mac OS.

Hewlett-Packard's OpenVMS operating system includes a version of X with the CDE desktop, known as DECwindows, as its standard desktop environment. Mac OS X 10.3 (Panther) includes Apple's version of X11, based on XFree86 4.3 and X11R6.6, with better Mac OS X integration.

Even the Microsoft Windows graphical environment can be altered to support X server by installing software packages such as Cygwin/X, Exceed, XVision, X-Win32 and a Java implementation of the X server that runs in browsers WeirdX.

X terminals

An X terminal is a piece of dedicated hardware running an X server. This architecture became popular for building inexpensive remote displays for many users to simultaneously use the same client application. This use very much aligns with the original intention of the MIT project.

X terminals explore the network using XDMCP to connect to a specific host running a client application which presents a list of available hosts. This server in turn may gather a list of available hosts using broadcast on the local network.

Dedicated (hardware) X terminals are no longer manufactured as such; the functionality of a modern day X terminal is typically provided at a lower cost by a diskless motherboard with a network boot that loads an X server from a DHCP host, a PC running an X server or a handheld device running an X server.

Common criticisms of X

The device independence and separation of client application and X server does incur an overhead. X's network transparency provides that the client applications and X servers to operate on separate separate CPUs over the network. On client applications written poorly this can result, naturally, in significantly poor performance. X client applications written with rendered GUIs rather than bitmapped GUIs typically show no such performance problems.

(In the present day, both Windows and Mac OS X Quartz have internal subsystem separation similar to the client/server divide in X — Moore's Law having increased memory and CPU power to the point where the increased flexibility and programmability of such a model compensates for its resource consumption.)

As per "mechanism, not policy," X deliberately contains no specification as to application appearance or most inter-application communication. The result was several vastly different interfaces, and applications that did not quite work together. The ICCCM, a specification for client interoperability, is notorious for having a difficult and confusing API. Further standards efforts such as Motif and CDE did not remedy matters. This has long been a source of great frustration to users and programmers who suffered from GUIs that were not properly designed and implemented [2] (http://lists.debian.org/debian-user/1996/11/msg00637.html). Consistency of application look and feel and communication is being addressed by vertical market application developers and by various desktop environments, which have strong interface guidelines, and interoperability between different desktop environments is being addressed by the freedesktop.org initiative. Programming to a given toolkit or desktop environment helps avoid having to deal directly with the ICCCM.

Hardware support remains a problem. The performance edge for graphical computing is now in the most advanced graphics functions, which are typically implemented in proprietary drivers written by the manufacturers, and generally for Windows (the largest consumer market) first.

X does not include good support for sound. As users increasingly expect sound, this has led to various incompatible sound subsystems. Most programmers in the past have chosen to ignore the issue of network sound and simply use local, OS-specific sound APIs. This is fine for workstation systems, but does not provide a mechanism for network-transparent audio. More recent efforts by the KDE and GNOME projects have resulted in two common network sound systems, ESD and ARts, although these are by no means standard. Freedesktop.org and the X.Org Foundation are working on a suitable system (MAS) that will be part of, or more closely linked to, X itself.

X does not include a good solution to printing what you see on the screen. X11R6.3 included a print extension, but it was not widely used. Most X clients print to PostScript entirely separately from what they send to the server.

An X client or session cannot be detached from one server and reattached to another, as with VNC. Work is under way to add this facility to X.

The UNIX-HATERS Handbook devoted an entire chapter, "The X Windows Disaster", to the problems of badly written X applications in the late 1980s and early 1990s.

Competitors to X

Some people have attempted writing alternatives to and replacements for X. Historical alternatives include Sun's NeWS, which failed in the market, and NeXT's Display PostScript, which eventually turned into Apple's Quartz for Mac OS X.

Modern attempts to address criticisms of X by replacing it completely include Berlin/Fresco and the Y Window System. None of these systems have had more than negligible uptake, however. At present, any alternative to X is considered unlikely to replace X without full backward compatibility.

Others attempt to avoid the overhead of X by working directly with the hardware. Such projects include DirectFB. The Direct Rendering Infrastructure module in X (introduced in XFree86 version 4 and present in X11R6.7 and later) performs a similar function.

Other attempts to achieve network transparency in the form of graphical terminal services include VNC (a very low-level system which blasts bitmaps across the network; the Unix implementation includes an X server), Citrix MetaFrame (an X-like product for Windows) and Tarantella (which provides a Java client for use in web browsers).

History

Predecessors

There were several bitmap display systems before X. From Xerox came the Alto (1973) and the Star (1981). From Apple came the Lisa (1983) and the Macintosh (1984). In the UNIX world there was the Andrew Project (1982) and Rob Pike's Blit (1984).

X derives its name as a successor to a pre-1983 window system called W (the letter X directly following W in the Latin alphabet). W ran under the V operating system.

Origin and early development

X was initially conceived at MIT in 1984 as a collaboration between Jim Gettys of Project Athena and Bob Scheifler of the MIT Laboratory for Computer Science. Project Athena was a joint project between Digital Equipment Corporation, MIT and IBM to provide easy access to computing resources for all students. Project Athena needed a platform-independent graphics system to link together its heterogeneous systems of multiple vendors and no alternatives were available as the window system being developed in the Andrew Project was not available for licensing.

The project solved this by creating a protocol that could run local applications and was able to call on remote resources. X was born in June 1984, when Bob Scheifler replaced the synchronous protocol of W with an asynchronous protocol and replaced the display lists with immediate mode graphics to make X version 1. X was the first window system environment that was truly hardware and vendor independent.

X progressed rapidly, version 6 being released January 1985. This version was ported to DEC's QVSS display on MicroVAX. Color support was added a few months later to support the DEC VAXstation-II/GPX, forming what became version 9.

Version 9 was released in September 1985. A group at Brown University ported version 9 to the IBM RT/PC, but problems with reading unaligned data on the RT forced an incompatible protocol change, leading to version 10. By 1986, outside organizations were asking for X. X10R3 was released in January 1986 and was the first version to achieve wide deployment. X10R4 was the last version of X10. Significant issues in the base protocol made it clear that a redesign of X, before it was too widely deployed, was desirable, but the scale of such a project was beyond the resources available at MIT alone.

Smokey Wallace of DEC's WSL and Jim Gettys proposed that X11 be built at DEC's WSL and made freely available under the same terms as previous versions of X. It was started in May 1986 and released in September 1987. The protocol design was lead by Bob Scheifler and extensively discussed on open mailing lists on the nascent Internet.

X therefore represents one of the first very large scale open source software projects.

The X Consortium

In 1988, with the success of X11 becoming apparent, the (MIT) X Consortium (a non-profit vendor group) was formed to direct the future development of X in an atmosphere inclusive of commercial and educational interests. The X Consortium produced several significant revisions to X11, the first being Release 2 (X11R2) in 1988 and the last being Release 6 in 1994 (X11R6). The Consortium dissolved at the end of 1996, producing a final small revision, X11R6.3.

The Open Group and X.Org

In mid-1997, the X Consortium passed stewardship of X to The Open Group, a vendor group formed in early 1996 by the merger of the Open Software Foundation (OSF) and X/Open.

The Open Group released X11R6.4 in early 1998. Controversially, X11R6.4 departed from the traditional liberal licensing terms, as the Open Group sought to assure funding for X's development. The new terms would have prevented its adoption by many projects (such as XFree86) and even some commercial vendors. After XFree86 threatened a fork, X11R6.4 was relicensed under the traditional license in September 1998. [3] (http://cbbrowne.com/info/x11r6.4.html)

In May 1999, the Open Group formed X.Org. X.Org supervised the release of versions X11R6.5.1 onward.

The X.Org Foundation

In early 2004, the X.Org Foundation was formed. This marked a radical change in the governance of X. Whereas the stewards of X since 1988 (including the previous X.Org) had been vendor organizations, the Foundation is led by software developers and using community development on the bazaar model, which relies on outside involvement. Membership is also open to individuals, with corporate membership being in the form of sponsorship.

X11R6.7 was released in April 2004, based on XFree86 4.4RC2 and X11R6.6. Present and future releases are intended as usable finished products, not merely a base for vendors to build a product upon. The reference implementation is now being developed with a view to significant extension and improvement of the implementation, whilst remaining almost entirely compatible with the original 1987 protocol.

X11R6.8 and X11R6.8.1 (a security fix) were released in September 2004. X11R6.8 adds significant new features to X, including preliminary support for translucent windows and other sophisticated visual effects, screen magnifiers and thumbnailers, and facilities to integrate with 3D immersive display systems such as Sun's Project Looking Glass and the Croquet Project. Policy for the visual appearance is not hardwired, but is provided by external applications called compositing managers.

Nomenclature

"The X Window System" is commonly shortened to "X11" or simply "X." The term "X Windows" (in the manner of "Microsoft Windows") is officially deprecated and generally considered incorrect, though it has been in common use since the inception of X and has been used deliberately for literary effect, e.g. in the UNIX-HATERS Handbook.

Technical details

X services and protocol interactions

The X server provides only the following. All else is provided by client programs.

  • Input handling: Keyboard, mouse and touchscreen input are passed to clients as events via the window manager—which, as far as X is concerned, is just another client.
  • Window services: Client applications direct the X server to create or destroy windows. Windows may be nested hierarchically. Client applications can request information about windows.
  • Text and fonts: Client applications direct drawing of text at a given location in a given font. The client can request information on available fonts.
  • Graphics: Clients direct the server to draw pixels, lines or shapes or perform bitmap operations.
  • Resource management: The X resource manager provides a content addressable database for clients. Clients can be implemented so they are customizable on a system and user basis.

There are four types of communication between X client applications and the X servers:

  1. Request: The client requests an action or information.
  2. Reply: The server responds. Note that not all requests generate replies.
  3. Event: The server sends an event to the client, e.g. keyboard, mouse or touchscreen input, or a window being moved, resized or exposed.
  4. Error: The server sends an error packet if a request is invalid. Note that requests are queued, so an error packet may not be sent immediately.

X Display Managers

The X Display Manager keeps the X server process alive on the X server machine, connecting it to a physical screen and serving a login prompt on this screen. XDM serves as the default display manager for X, but other projects have developed their own display managers:

Widget toolkits and desktop environments

X provides "mechanism, not policy." As such, it does not specify or provide the user interface features, such as buttons, menus, window title bars and so on. These are provided by user software, such as window managers, GUI widget toolkits and desktop environments.

Early GUI toolkits for X included:

OLIT and XView function as the base toolkits for AT&T and Sun's OPEN LOOK GUI.

Motif provides the base toolkit for the Common Desktop Environment (CDE), which is the standard desktop environment used on commercial Unix systems such as Solaris and HP-UX. (GNOME is offered in Solaris 9 and will be standard in future versions.)

Within the last few years, other toolkits have grabbed developer and user mind share. The modern toolkits include:

The KDE and GNOME desktop environments provide much better application functionality and services than is offered by plain window managers or older desktop environments.

Color modes of the X Window System

The colors used in X Window Systems sometimes confuse users, as old or special-purpose applications may require a certain color mode. Most modern applications use a color mode called "TrueColor", but historically X has supported several different modes:

  • DirectColor
  • GrayScale
  • PseudoColor (Chunky)
  • StaticColor
  • StaticGray
  • TrueColor

See also: X11 color names.

Release history


Version Release date Most important changes
X1 June 1984 First time the software called X; fundamental changes were made that distinguished it from W.
X6 January 1985
X9 September 1985
X10 1985
X10R3 First release outside MIT.
X10R4
X11 September 1987 First release of the current protocol.
X11R2 January 1988 First X Consortium release. [4] (http://www.linuxdocs.org/HOWTOs/XWindow-User-HOWTO-2.html)
X11R3 October 25, 1988
X11R4 December 22, 1989 Application improvements, new fonts.
X11R5 1991 X386
X11R6 1994
X11R6.3 (Broadway) December 23, 1996 Last X Consortium release.
X11R6.4 March 31, 1998
X11R6.5.1 August 20, 2000
X11R6.6 April 4, 2001 Bug fixes, XFree86 changes.
X11R6.7.0 April 6, 2004 First X.Org Foundation release, incorporating XFree86 4.4rc2.
X11R6.8.0 September 8, 2004 Window translucency, XDamage, Distributed Multihead X, XFixes, Composite, XEvIE


See also

External links

Notable implementations