summaryrefslogtreecommitdiff
path: root/docs/C/gdm.sgml
blob: acb41bb98913ffebf578c9c958192ee3b3c2e16e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
<!DOCTYPE book PUBLIC "-//Davenport//DTD DocBook V3.0//EN" []>

<book id="gdm">
  <bookinfo>
    <title>Gnome Display Manager Reference Manual</title>
    <authorgroup>
      <author>
        <firstname>Martin Kasper</firstname> <surname>Petersen</surname>
        <affiliation>
          <address>
            <email>mkp@mkp.net</email>
          </address>
        </affiliation>
      </author>
    </authorgroup>
    <copyright>
      <year>1998, 1999</year> <holder>Martin K. Petersen</holder>
    </copyright>

    <legalnotice>
      <para>
	This documentation is free software; you can redistribute it
	and/or modify it under the terms of the GNU General Public
	License as published by the Free Software Foundation; either
	version 2 of the License, or (at your option) any later
	version.
      </para>
      
      <para>
        This program is distributed in the hope that it will be
        useful, but WITHOUT ANY WARRANTY; without even the implied
        warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
        PURPOSE.  See the GNU General Public License for more details.
      </para>

      <para>
        You should have received a copy of the GNU General Public
        License along with this program; if not, write to the Free
        Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
        MA 02111-1307 USA
      </para>
      
      <para>
        For more details see the file COPYING in the source
        distribution of GDM.
      </para>
    </legalnotice>
  </bookinfo>

  <toc></toc>

  <chapter id="intro">
    <title>Introduction</title>

    <para> 
      GDM is a replacement for XDM, the X Display Manager. Unlike its
      competitors (X3DM, KDM, WDM) GDM was written from scratch and
      does not contain any original XDM / X Consortium code. 
    </para>

    <sect1 id="overview">
      <title>Theory of Operation</title>
      
      <para> 
	GDM was written with simplicity and security in mind. The
	overall design concept is this: 
      </para>
      
      <para> 
	Upon startup the <filename /gdm/ daemon parses its config file
	<filename /gdm.conf/.  For each of the local displays GDM
	forks an Xserver and a slave process. The main GDM process
	will then listen to XDMCP requests from remote displays and
	monitor the local display sessions.
      </para>
      
      <para> 
	The GDM slave process opens the display and starts <filename
	/gdmlogin/, the graphical login program. <filename /gdmlogin/
	runs as a dedicated user and communicates asynchronously with
	the slave process through a pipe.
      </para>
      
      <para> 
	GDM relies heavily on the presence of PAM, Pluggable
	Authentication Modules, but supports regular <code /crypt()/
	and shadow passwords.
      </para>

    </sect1>
  </chapter>

  <chapter id="Configuration">
    <title>The Configuration Directory</title>

    <para> 
      The configuration files for gdm are located in the /etc/gdm/
      directory.
    </para>

    <para>
      This is a listing of the config directory contents:
    </para>

    <literallayout>
	Init/
	PostSession/
	PreSession/
	Sessions/
	gdm.conf
    </literallayout>

    <para> 
      gdm.conf is the main gdm configuration file. The options will be
      described later in this chapter.
    </para>

    <para> 
      The remaining configuration is done by dropping scripts in the
      subdirectories of the /etc/gdm folder. This approach makes it
      easy for package management systems to install window managers
      and different session types without requiring the sysadmin/user
      to edit files.
    </para>

    <sect1>
      <title>The Script Directories</title>
      
      <para>
	In this section we will explain the Init, PreRoot and PostRoot
	directories as they are very similar.
      </para>

      <para>
	When the X server has been successfully started, gdm will try
	to run the script called Init/&lt;displayname&gt;. I.e. Init/:0 for
	the first local display.  If this file is not found, gdm will
	attempt to to run Init/Default. The script will be run as root
	and gdm blocks until it terminates. Use the Init/* script for
	programs that are supposed to run alongside with the gdm login
	window. xconsole for instance.  Commands to set the background
	etc. goes in this file too.
      </para>

      <para> 
	It is up to the sysadmin to decide whether clients started by
	the Init script should be killed before starting the user
	session. This is controlled with the KillInitClient option in
	gdm.conf.
      </para>

      <para>
	When the user has been successfully authenticated, gdm tries
	to run the PreSession script. Similar to the Init-scripts,
	PreSession/&lt;displayname&gt; will be executed first, if that is
	not found gdm will attempt to run PreSession/Default. The
	script will be run as root and gdm blocks until it
	terminates. Use this script for local session management or
	accounting stuff. The USER environment variable contains the
	login of the authenticated user. The script should return 0 on
	success. Any other value will cause gdm to terminate the
	current login process.
      </para>

      <para>
	Then the session script is run. Session scripts are located in
	the etc/gdm/Session directory. Which one gdm runs depends on
	the session the user chose in the Sessions-menu in the gdm
	greeter. If no session is selected and the user has no last
	session stored in his ~/.gnome/gdm file, the system will
	choose or first script found or -- if Sessions/Default exists
	-- this will be run. For instance you can create a symlink
	from Gnome to Default to make Gnome the default desktop
	environment.
      </para>

      <para> 
	When the user terminates his session the PostSession script
	will be run. Operation is similar to Init and PreSession. That
	is, gdm will attempt to execute the script
	PostSession/&lt;displayname&gt; and if that doesn't exist:
	PostSession/Default. Again the script will be run with root
	priviledges, gdm will block and the USER environment variable
	will contain the name of the user who just logged out.
      </para>

      <para> 
	Neither of the Init, PreSession or PostSession scripts are
	necessary and can be left out. At least one session script is
	required for proper operation.
      </para>

    </sect1>

    <sect1>
      <title>The Configuration File - <filename /gdm.conf/</title>

      <para>
	The daemon and the accompanying utilities share a common
	configuration file: <filename>/etc/gdm/gdm.conf</filename>.
      </para>

      <para>
	The configuration file is divided into sections each
	containing variables that define the behaviour for a specific
	part of the GDM suite.
      </para>

      <para>
	<filename /gdm.conf/ follows the standard GNOME configuration
	file syntax. Keywords in brackets define sections, strings
	before an equal sign (=) are variables and the data after
	equal sign represents their value.
      </para>

      <para>
	In general, 0 represents disable and 1 represents enable for
	boolean configuration options.
      </para>

      <sect2>
	<title>[daemon]</title>

	<para>
	  This section contains configuration options for the GDM
	  master daemon <filename /gdm/.
	</para>

	<sect3>
	  <title>Chooser</title>

	  <para>Default:</para>
	  <screen>Chooser=/usr/bin/gdmchooser --disable-sound</screen>

	  <para>
	    Full pathname to the <filename /gdmchooser/ executable.
	  </para>

	</sect3>

      </sect2>

    </sect1>

  </chapter>

</book>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:t
sgml-parent-document:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->