X display manager (program type)
From Wikipedia, the free encyclopedia
For the program called "X Display Manager", see XDM (display manager).
In the X Window System, an X display manager runs as a program that allows the starting of a session on an X server from the same or another computer.
A login screen shown by the KDM display manager.
A display manager presents the user with a login screen which prompts for a username and password. A session starts when the user successfully enters a valid combination of username and password.
When the display manager runs on the user's computer, it starts the X server before presenting the user the login screen, optionally repeating when the user logs out. In this condition, the display manager realizes in the X Window System the functionality of getty and login on character-mode terminals. When the display manager runs on a remote computer, it acts like a telnet server, requesting username and password and starting a remote session.
X11 Release 3 introduced display managers in October 1988 with the aim of supporting the standalone X terminals then just coming onto the market. Various display managers continue in routine use to provide a graphical login prompt on standalone computer workstations running X. X11R4 introduced the X Display Manager Control Protocol (XDMCP) in December 1989 to fix problems in the X11R3 implementation.
<col>
[hide]
1 Local and remote display management
2 X Display Manager Control Protocol
3 History
4 Some implementations
5 See also
6 References
7 External links
8 Footnotes
A display manager can run on the same computer where the user sits or on a remote one. In the first case, the display manager starts one or more X servers, displaying the login screen at the beginning and (optionally) every time the user logs out. In the second case, the display manager works according to the XDMCP protocol.
In the X Window System, the X server runs on the computer in front of the user. The X server may connect to a display manager running on another computer, starting a session which may comprise a variety of programs running on that other computer.
The XDMCP protocol mandates that the X server starts autonomously and connects to the display manager. In the X Window System paradigm, the server runs on the computer providing the display and input devices. A server can connect, using the XDMCP protocol, to a display manager running on another computer, requesting it to start the session. In this case, the X server acts as a graphical telnet client while the display manager acts like a telnet server: users start programs from the computer running the display manager, while their input and output take place on the computer where the server (and the user) sits.
An administrator can typically configure an XDMCP Chooser program running on the local computer or X terminal to connect to a specific host's X display manager or display a list of suitable hosts that the user can choose from. Most implementations enabled such a list to contain:
a predefined set of hosts and their respective network addresses, and/or
a set of hosts (on the local TCP/IP subnet) that the XDMCP Chooser determines by a network broadcast to the available display managers.
When the user selects a host from the list, the XDMCP Chooser running on the local machine will send a message to the selected remote computer's display manager and instruct it to connect the X server on the local computer or terminal.
The X Display Manager Control Protocol uses UDP port 177. An X server requests that a display manager start a session by sending a <code>Query</code> packet. If the display manager allows access for that X server, it responds by sending a <code>Willing</code> packet back to the X server. (The X server can also send<code>BroadcastQuery</code> or <code>IndirectQuery</code> packets to start a session - this mechanism for requesting a session resembles using DHCP to request an IP address.)
The display manager must authenticate itself to the server. To do this the X server sends a <code>Request</code>packet to the display manager, which returns an <code>Accept</code> packet. If the <code>Accept</code> packet contains the response the X server expects, the display manager is authenticated. Producing the correct response might require the display manager to have access to a secret key, for example. If authentication succeeds, the X server sends a <code>Manage</code> packet to inform the display manager. Then the display manager displays its login screen by connecting to the X server as a regular X client.
During the session, the server can send <code>KeepAlive</code> packets to the display manager at intervals. If the display manager fails to respond with an <code>Alive</code> packet within a certain time, the X server presumes that the display manager has ceased running, and can terminate the connection.
One problem with XDMCP is that, similarly to telnet, the authentication takes place unencrypted. If snooping is possible, this leaves the system vulnerable to attack. It is more secure to use an ssh tunnel for X traffic.[1]