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. Resources for this
program can be put into the file named by Resources.
In addition to any specified by ExportList,
the following environment variables are passed:
- DISPLAY
the associated display name
- PATH
the value of
SystemPath- SHELL
the value of
SystemShell- XAUTHORITY
may be set to an authority file
- DM_CONTROL
the value of
FifoDir
Note
GrabInput can make kdm grab the
keyboard and mouse, making any other windows unable to receive input.
If GrabServer is set, Xsetup
will not be able to connect to the display at all.
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:
- DISPLAY
the associated display name
- HOME
the initial working directory of the user
- LOGNAME
the username
- USER
the username
- PATH
the value of
SystemPath- SHELL
the value of
SystemShell- XAUTHORITY
may be set to an authority file
- DM_CONTROL
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:
- DISPLAY
the associated display name
- HOME
the initial working directory of the user
- LOGNAME
the username
- USER
the username
- PATH
the value of
UserPath(orSystemPathforrootuser sessions)- SHELL
the user's default shell
- XAUTHORITY
may be set to a non-standard authority file
- KRBTKFILE
may be set to a Kerberos4 credentials cache name
- KRB5CCNAME
may be set to a Kerberos5 credentials cache name
- DM_CONTROL
the value of
FifoDir- XDM_MANAGED
will contain a comma-separated list of parameters the session might find interesting, like which conversation plugin was used for the login
- DESKTOP_SESSION
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.