The following programs are run by kdm at various stages of a session. They typically are shell scripts.
The Setup, Startup and Reset programs are run as
root
, so they should be careful
about security.
Their first argument is auto
if the session results
from an automatic login; otherwise, no arguments are passed to them.
The Xsetup
program is run after the X-Server is
started or reset, but before the greeter is offered.
This is the place to change the root background (if
UseBackground
is disabled) or bring up other windows that
should appear on the screen along with the greeter.
In addition to any specified by ExportList
,
the following environment variables are passed:
the associated display name
the value of SystemPath
the value of SystemShell
may be set to an authority file
the value of FifoDir
Note that since kdm grabs the keyboard, any other windows will not be
able to receive keyboard input. They will be able to interact with the mouse,
however; beware of potential security holes here. If GrabServer
is set, Xsetup
will not be able to connect to the display
at all. Resources for this program can be put into the file named by
Resources
.
The Xstartup
program is run as
root
when the user logs in.
This is the place to put commands which add entries to
utmp
(the sessreg program
may be useful here), mount users' home directories from file servers,
or abort the session if some requirements are not met (but note that on
modern systems, many of these tasks are already taken care of by
PAM modules).
In addition to any specified by ExportList
,
the following environment variables are passed:
the associated display name
the initial working directory of the user
the username
the username
the value of SystemPath
the value of SystemShell
may be set to an authority file
the value of FifoDir
kdm waits until this program exits before starting the user session. If the exit value of this program is non-zero, kdm discontinues the session and starts another authentication cycle.
The Xsession
program is the command which is run
as the user's session. It is run with the permissions of the authorized user.
One of the keywords failsafe
, default
or custom
, or a string to eval by a
Bourne-compatible shell is passed as the first argument.
In addition to any specified by ExportList
,
the following environment variables are passed:
the associated display name
the initial working directory of the user
the username
the username
the value of UserPath
(or SystemPath
for
root
user sessions)
the user's default shell
may be set to a non-standard authority file
may be set to a Kerberos4 credentials cache name
may be set to a Kerberos5 credentials cache name
the value of FifoDir
will contain a comma-separated list of parameters the session might find interesting, like the location of the command FiFo and its capabilities, and which conversation plugin was used for the login
the name of the session the user has chosen to run
Symmetrical with Xstartup
, the
Xreset
program is run after the user session has
terminated. Run as root
, it should
contain commands that undo the effects of commands in
Xstartup
, removing entries from utmp
or unmounting directories from file servers.
The environment variables that were passed to
Xstartup
are also passed to Xreset
.
Would you like to make a comment or contribute an update to this page?
Send feedback to the KDE Docs Team