106.2 Set Up a Display Manager
Candidates should be able set up and customize a display manager. This objective covers the display managers XDM (X Display Manger), GDM (Gnome Display Manager) and KDM (KDE Display Manager).
Key Knowledge Areas
- Turn the display manager on or off.
- Change the display manager greeting.
- Change default color depth for the display manager.
- Configure display managers for use by X-stations.
The Display Manager
There are three main display managers, xdm (generic), gdm (GNOME) and kdm (KDE). A display manager will automatically be started if the system is running in a given runlevel (e.g runlevel 5). We first describe the login process; the next section covers more advanced functionalities of a Display Manager. The login process follows the following steps:
xdm --> xlogin --> Xsession --> (optionally) Xclients or ~/.Xclients
Different versions of display managers as well as different Linux distributions may use slightly different steps. In general however, note that startx uses xinit whereas xdm uses Xsession.
Each user can further customise their environment by using a .xinitrc file. This file will be merged into the system xinitrc. The switdesk tool allows users to define a custom .Xclients file
This display manager is installed with the KDE desktop environment. It is based on the generic xdm display manager and shares many common configuration files. These configuration files for are in /usr/share/config/kdm. The file that controls most functionalities is kdmrc.
The path to the kdm binary is /usr/bin/kdm. And the KDM Configuration files:
kdmrc Xaccess (same as xdm) Xservers (same as xdm) Xsession (same as xdm) Xsetup Xstartup
This display manager is distributed with the GNOME desktop environment. The main configuration file is gdm.conf
The path to the gdm binary is /usr/bin/gdm. GDM Configuration Files ( /etc/X11/gdm):
The xdm display manager is part of the Xfree86 application. The main configuration file is xdm-config
The path to the xdm binary is /usr/bin/xdm. XDM Configuration Files:
Xaccess Xresources Xsession xdm-config Xservers
We will look at the xdm configuration files in more detail later in this section.
Display Managers are used mainly in run level 5:
|Set default runlevel in /etc/inittab|
Display managers allow local users to log onto the system using the graphical interface. They can also be used to provide a graphical login interface over the network. For this they use a protocol called XDMCP or X Display Manager Control Protocol. By default XDMCP is disabled (we will enable XDMCP as an exercise).
Since the Display Manager is also an x-application, the fonts, the background colors and xlogin can be configured with the Xresourses file in /etc/X11/xdm/. When using gdm, the /etc/X11/gdm/Init/Default script will source Xresources.
This file simply maps the name of a display with an X server. For example display: 0 is understood to be the local X server. Remember that X always runs on the first free /dev/tty.
This is the main configuration file for xdm. It is also used to enable XDMCP (see exercises)
This file is used to enable XDMCP, allowing remote hosts to directly connect to the local server (using -query) or query about other display
|The Xaccess file|
|# $XConsortium: Xaccess,v 1.5 91/08/26 11:52:51 rws Exp $|
|# Access control file for XDMCP connections|
|# To control Direct and Broadcast access:|
|# To control Indirect queries:|
|# patternlist of hostnames and/or macros ...|
|# To use the chooser:|
|#patternCHOOSER list of hostnames and/or macros ...|
|# To define macros:|
|# %namelist of hosts ...|
|# The first form tells xdm which displays to respond to itself.|
|# The second form tells xdm to forward indirect queries from hosts matching|
|# the specified pattern to the indicated list of hosts.|
|# The third form tells xdm to handle indirect queries using the chooser;|
|# the chooser is directed to send its own queries out via the broadcast|
|# address and display the results on the terminal.|
|# The fourth form is similar to the third, except instead of using the|
|# broadcast address, it sends DirectQuerys to each of the hosts in the list|
|# In all cases, xdm uses the first entry which matches the terminal;|
|# for IndirectQuery messages only entries with right hand sides can|
|# match, for Direct and Broadcast Query messages, only entries without|
|# right hand sides can match.|
|*#any host can get a login window|
|# To hardwire a specific terminal to a specific host, you can|
|# leave the terminal sending indirect queries to this host, and|
|# use an entry of the form:|
|# The nicest way to run the chooser is to just ask it to broadcast|
|# requests to the network - that way new hosts show up automatically.|
|# Sometimes, however, the chooser can't figure out how to broadcast,|
|# so this may not work in all environments.|
|*CHOOSER BROADCAST#any indirect host can get a chooser|
|# If you'd prefer to configure the set of hosts each terminal sees,|
|# then just uncomment these lines (and comment the CHOOSER line above)|
|# and edit the %hostlist line as appropriate|
|The Xservers file|
|# $XConsortium: Xserv.ws.cpp,v 1.3 93/09/28 14:30:30 gildea Exp $|
|# $XFree86: xc/programs/xdm/config/Xserv.ws.cpp,v 18.104.22.168.12.2 1998/10/04 15:23:14 hohndel Exp $|
|# Xservers file, workstation prototype|
|# This file should contain an entry to start the server on the|
|# local display; if you have more than one display (not screen),|
|# you can add entries to the list (one per line). If you also|
|# have some X terminals connected which do not support XDMCP,|
|# you can add them here as well. Each X terminal line should|
|# look like:|
|:0 local /usr/X11R6/bin/X|
Since the Display Manager is also an x-application the Xresources file is similar to the .Xresources file except that it controls how the login screen is displayed.
|Sample Xrescources file|
|! $XConsortium: Xresources /main/8 1996/11/11 09:24:46 swick $|
|xlogin*fail: Login incorrect|
|Sample xdm-config file|
|! $XFree86: xc/programs/xdm/config/xdm-conf.cpp,v 22.214.171.124.4.2 1999/10/12 18:33:29 hohndel Exp $|
|! All displays should use authorization, but we cannot be sure|
|! X terminals will be configured that way, so by default|
|! use authorization only for local displays :0, :1, etc.|
|! SECURITY: do not listen for XDMCP or Chooser requests|
|! Comment out this line if you want to manage X terminals with xdm|
The following is a partial list of the files, terms and utilities that were used.