(no commit message)
[ikiwiki.git] / docs / handbook / handbook-x-xdm.mdwn
1
2 ----
3
4
5
6 # 5.6 The X Display Manager 
7
8  ***Contributed by Seth Kingsley.***
9
10
11
12 ## 5.6.1 Overview 
13
14
15
16  The X Display Manager ( **XDM** ) is an optional part of the X Window System that is used for login session management. This is useful for several types of situations, including minimal "X Terminals", desktops, and large network display servers. Since the X Window System is network and protocol independent, there are a wide variety of possible configurations for running X clients and servers on different machines connected by a network.  **XDM**  provides a graphical interface for choosing which display server to connect to, and entering authorization information such as a login and password combination.
17
18
19
20  Think of  **XDM**  as providing the same functionality to the user as the [getty(8)](http://leaf.dragonflybsd.org/cgi/web-man?command=getty&section=8) utility (see [ Section 17.3.2](term.html#TERM-CONFIG) for details). That is, it performs system logins to the display being connected to and then runs a session manager on behalf of the user (usually an X window manager).  **XDM**  then waits for this program to exit, signaling that the user is done and should be logged out of the display. At this point,  **XDM**  can display the login and display chooser screens for the next user to login.
21
22
23
24 ## 5.6.2 Using XDM 
25
26
27
28  The  **XDM**  daemon program is located in `/usr/pkg/xorg/bin/xdm`. This program can be run at any time as `root` and it will start managing the X display on the local machine. If  **XDM**  is to be run every time the machine boots up, a convenient way to do this is by adding an entry to `/etc/ttys`. For more information about the format and usage of this file, see [ Section 17.3.2.1](term.html#TERM-ETCTTYS). There is a line in the default `/etc/ttys` file for running the  **XDM**  daemon on a virtual terminal:
29
30
31
32      
33
34     ttyv8   "/usr/pkg/xorg/bin/xdm -nodaemon"  xterm   off secure
35
36
37
38
39
40  By default this entry is disabled; in order to enable it change field 5 from `off` to `on` and restart [init(8)](http://leaf.dragonflybsd.org/cgi/web-man?command=init&section=8) using the directions in [ Section 17.3.2.2](term.html#TERM-HUP). The first field, the name of the terminal this program will manage, is `ttyv8`. This means that  **XDM**  will start running on the 9th virtual terminal.
41
42
43
44 ## 5.6.3 Configuring XDM 
45
46
47
48  The  **XDM**  configuration directory is located in `/var/lib/xdm`. The sample configuration files are in `/usr/pkg/share/examples/xorg/xdm/`, in this directory there are several files used to change the behavior and appearance of  **XDM** . Typically these files will be found:
49
50
51
52  ||<tablestyle="width:100%">  **File**  ||  **Description**  ||
53
54  ||<tablestyle="width:100%"> `Xaccess` || Client authorization ruleset. ||
55
56  || `Xresources` || Default X resource values. ||
57
58  || `Xservers` || List of remote and local displays to manage. ||
59
60  || `Xsession` || Default session script for logins. ||
61
62  || `Xsetup_`* || Script to launch applications before the login interface. ||
63
64  || `xdm-config` || Global configuration for all displays running on this machine. ||
65
66  || `xdm-errors` || Errors generated by the server program. ||
67
68  || `xdm-pid` || The process ID of the currently running XDM. ||
69
70
71
72  Also in this directory are a few scripts and programs used to set up the desktop when  **XDM**  is running. The purpose of each of these files will be briefly described. The exact syntax and usage of all of these files is described in [xdm(1)](http://leaf.dragonflybsd.org/cgi/web-man?command=xdm&section=1).
73
74
75
76  The default configuration is a simple rectangular login window with the hostname of the machine displayed at the top in a large font and "Login:" and "Password:" prompts below. This is a good starting point for changing the look and feel of  **XDM**  screens.
77
78
79
80 ### 5.6.3.1 Xaccess 
81
82
83
84  The protocol for connecting to  **XDM**  controlled displays is called the X Display Manager Connection Protocol (XDMCP). This file is a ruleset for controlling XDMCP connections from remote machines. It is ignored unless the `xdm-config` is changed to listen for remote connections. By default, it does not allow any clients to connect.
85
86
87
88 ### 5.6.3.2 Xresources 
89
90
91
92  This is an application-defaults file for the display chooser and the login screens. This is where the appearance of the login program can be modified. The format is identical to the app-defaults file described in the X11 documentation.
93
94
95
96 ### 5.6.3.3 Xservers 
97
98
99
100  This is a list of the remote displays the chooser should provide as choices.
101
102
103
104 ### 5.6.3.4 Xsession 
105
106
107
108  This is the default session script for  **XDM**  to run after a user has logged in. Normally each user will have a customized session script in `~/.xsession` that overrides this script.
109
110
111
112 ### 5.6.3.5 Xsetup_* 
113
114
115
116  These will be run automatically before displaying the chooser or login interfaces. There is a script for each display being used, named `Xsetup_` followed by the local display number (for instance `Xsetup_0`). Typically these scripts will run one or two programs in the background such as `xconsole`.
117
118
119
120 ### 5.6.3.6 xdm-config 
121
122
123
124  This contains settings in the form of app-defaults that are applicable to every display that this installation manages.
125
126
127
128 ### 5.6.3.7 xdm-errors 
129
130
131
132  This contains the output of the X servers that  **XDM**  is trying to run. If a display that  **XDM**  is trying to start hangs for some reason, this is a good place to look for error messages. These messages are also written to the user's `~/.xsession-errors` file on a per-session basis.
133
134
135
136 ## 5.6.4 Running a Network Display Server 
137
138
139
140  In order for other clients to connect to the display server, edit the access control rules, and enable the connection listener. By default these are set to conservative values. To make  **XDM**  listen for connections, first comment out a line in the `xdm-config` file:
141
142
143
144      
145
146     ! SECURITY: do not listen for XDMCP or Chooser requests
147
148     ! Comment out this line if you want to manage X terminals with xdm
149
150     DisplayManager.requestPort:     0
151
152
153
154
155
156  and then restart  **XDM** . Remember that comments in app-defaults files begin with a "!" character, not the usual "#". More strict access controls may be desired. Look at the example entries in `Xaccess`, and refer to the [xdm(1)](http://leaf.dragonflybsd.org/cgi/web-man?command=xdm&section=1) manual page for further information.
157
158
159
160 ## 5.6.5 Replacements for XDM 
161
162
163
164  Several replacements for the default  **XDM**  program exist. One of them,  **kdm**  (bundled with  **KDE** ) is described later in this chapter. The  **kdm**  display manager offers many visual improvements and cosmetic frills, as well as the functionality to allow users to choose their window manager of choice at login time.
165
166
167
168
169
170 ----
171
172
173