The X window system (commonly X Window System or X11, based on its current major version being 11) is a computer software system and network protocol that provides a basis for graphical user interfaces (GUIs) and rich input device capability for networked computers. It creates a hardware abstraction layer where software is written to use a generalized set of commands, allowing for device independence and reuse of programs on any computer that implements X.
Purpose and abilities
X is an architecture-independent system for remote graphical user interfaces and rich input device capabilities which allows many people to share the processing power of a time-sharing computer and to collaborate with each other through client applications running on remote computers. Each person using a networked terminal has the ability to interact with the display with any type of user input device. Due to the ubiquity of support for
X software on Unix, Linux and Mac OS X, X is commonly used to run client applications on personal computers even when there is no need for time-sharing.
X provides windowing on computer displays and manages keyboard, pointing device control functions and touchscreens. In its standard distribution it is a complete, albeit simple, display and interface solution which delivers a standard toolkit and protocol stack for building graphical user interfaces on most Unix-like operating systems and OpenVMS, and has been ported to many other contemporary general purpose operating systems.
X provides the basic framework, or primitives, for building such GUI environments: drawing and moving windows on the display and interacting with a mouse, keyboard or touchscreen. X does not mandate that the user interface be present — individual client programs known as window managers handle this. The window manager is not necessary and programs may use X's graphical abilities with no user interface. As such, the visual styling of X-based environments varies greatly; different programs may present radically different interfaces. X is built as an additional (application) abstraction layer on top of the operating system kernel.
Unlike most earlier display protocols, X was specifically designed to be used over network connections rather than on an integral or attached display device. X features network transparency: the machine where an application program (the client application) runs can differ from the user's local machine (the display server).
X's network protocol is based on X command primitives and, with GLX, OpenGL 3D primitives rather than on a more basic framebuffer copying paradigm. This approach allows both 2D and 3D operations to be fully accelerated on the remote X server.
When used across the network, bandwidth and latency can both be significant issues in the usability of certain software models. Bandwidth is a key factor both in watching video in 2D and in transferring textures for 3D. Latency can be a concern in interactive applications - most obviously games - but for high levels of latency even basic menu manipulation can become difficult.
X provides no support for audio, although several projects exist in this niche, some also providing transparent network support. Some are PulseAudio, Advanced Linux Sound Architecture (ALSA), Open Sound System (OSS), and JACK Audio Connection Kit (JACK).
X also lacks support for user-defined stored procedures on the X server, which might have allowed for the dynamic construction of higher order primitives as seen in NeWS, which could reduce bandwidth demands from requiring fewer primitives to be sent, and improve certain types of interaction by removing round trips to the remote X client program in some varieties of menu interactions, picking, window management, and so on.
X is often used in conjunction with an X session manager to implement sessions. Usually, a session is started by the X display manager. However, the user can also start a session by manually running the xinit or startx programs.
Design
X uses a client–server model: an X server communicates with various client programs. The server accepts requests for graphical output (windows) and sends back user input (from keyboard, mouse, or touchscreen).
The server may function as:
This client server terminology the user's terminal being the server and the applications being the clients—often confuses new X users, because the terms appear reversed. But X takes the perspective of the application, rather than that of the end-user: X provides display and I/O services to applications, so it is a server; applications use these services, thus they are clients.
The communication protocol between server and client operates network-transparently: the client and server may run on the same machine or on different ones, possibly with different architectures and operating systems. A client and server can even communicate securely over the Internet by tunneling the connection over an encrypted network session.
An X client itself may emulate an X server by providing display services to other clients. This is known as "X nesting". Open-source clients such as Xnest and Xephyr support such X nesting.
To use an X client application on a remote machine, the user does the following:
On the local machine, open a terminal window
use ssh with the X forwarding argument to connect to the remote machine. Telnet can be used but is not secure, does not allow graphical forwarding and is largely deprecated.
request local display/input service (e.g., export DISPLAY=[user's machine]:0 if not using SSH with X forwarding or 'tunneling' enabled).
The remote X client application will then make a connection to the user's local X server, providing display and input to the user.
Alternatively, the local machine may run a small program that connects to the remote machine and starts the client application.
Practical examples of remote clients include:
Purpose and abilities
X is an architecture-independent system for remote graphical user interfaces and rich input device capabilities which allows many people to share the processing power of a time-sharing computer and to collaborate with each other through client applications running on remote computers. Each person using a networked terminal has the ability to interact with the display with any type of user input device. Due to the ubiquity of support for
X software on Unix, Linux and Mac OS X, X is commonly used to run client applications on personal computers even when there is no need for time-sharing.
X provides windowing on computer displays and manages keyboard, pointing device control functions and touchscreens. In its standard distribution it is a complete, albeit simple, display and interface solution which delivers a standard toolkit and protocol stack for building graphical user interfaces on most Unix-like operating systems and OpenVMS, and has been ported to many other contemporary general purpose operating systems.
X provides the basic framework, or primitives, for building such GUI environments: drawing and moving windows on the display and interacting with a mouse, keyboard or touchscreen. X does not mandate that the user interface be present — individual client programs known as window managers handle this. The window manager is not necessary and programs may use X's graphical abilities with no user interface. As such, the visual styling of X-based environments varies greatly; different programs may present radically different interfaces. X is built as an additional (application) abstraction layer on top of the operating system kernel.
Unlike most earlier display protocols, X was specifically designed to be used over network connections rather than on an integral or attached display device. X features network transparency: the machine where an application program (the client application) runs can differ from the user's local machine (the display server).
X's network protocol is based on X command primitives and, with GLX, OpenGL 3D primitives rather than on a more basic framebuffer copying paradigm. This approach allows both 2D and 3D operations to be fully accelerated on the remote X server.
When used across the network, bandwidth and latency can both be significant issues in the usability of certain software models. Bandwidth is a key factor both in watching video in 2D and in transferring textures for 3D. Latency can be a concern in interactive applications - most obviously games - but for high levels of latency even basic menu manipulation can become difficult.
X provides no support for audio, although several projects exist in this niche, some also providing transparent network support. Some are PulseAudio, Advanced Linux Sound Architecture (ALSA), Open Sound System (OSS), and JACK Audio Connection Kit (JACK).
X also lacks support for user-defined stored procedures on the X server, which might have allowed for the dynamic construction of higher order primitives as seen in NeWS, which could reduce bandwidth demands from requiring fewer primitives to be sent, and improve certain types of interaction by removing round trips to the remote X client program in some varieties of menu interactions, picking, window management, and so on.
X is often used in conjunction with an X session manager to implement sessions. Usually, a session is started by the X display manager. However, the user can also start a session by manually running the xinit or startx programs.
Design
X uses a client–server model: an X server communicates with various client programs. The server accepts requests for graphical output (windows) and sends back user input (from keyboard, mouse, or touchscreen).
The server may function as:
- an application displaying to a window of another display system
- a system program controlling the video output of a PC
- a dedicated piece of hardware.
This client server terminology the user's terminal being the server and the applications being the clients—often confuses new X users, because the terms appear reversed. But X takes the perspective of the application, rather than that of the end-user: X provides display and I/O services to applications, so it is a server; applications use these services, thus they are clients.
The communication protocol between server and client operates network-transparently: the client and server may run on the same machine or on different ones, possibly with different architectures and operating systems. A client and server can even communicate securely over the Internet by tunneling the connection over an encrypted network session.
An X client itself may emulate an X server by providing display services to other clients. This is known as "X nesting". Open-source clients such as Xnest and Xephyr support such X nesting.
To use an X client application on a remote machine, the user does the following:
On the local machine, open a terminal window
use ssh with the X forwarding argument to connect to the remote machine. Telnet can be used but is not secure, does not allow graphical forwarding and is largely deprecated.
request local display/input service (e.g., export DISPLAY=[user's machine]:0 if not using SSH with X forwarding or 'tunneling' enabled).
The remote X client application will then make a connection to the user's local X server, providing display and input to the user.
Alternatively, the local machine may run a small program that connects to the remote machine and starts the client application.
Practical examples of remote clients include:
- administering a remote machine graphically
- using a client application to join with large numbers of other terminal users in collaborative workgroups.
- running a computationally intensive simulation on a remote machine and displaying the results on a local desktop machine
- running graphical software on several machines at once, controlled by a single display, keyboard and mouse.