The Login Server Environment
The login server provides an environment that it exports to the Xsetup, Xstartup, Xsession, Xfailsafe and Xreset scripts. This environment is described in Table 1-1. Additional variables may also be exported by the login server.
Table 1-1 Login Server Environments
Environment Variable | Xsetup | Xstartup | Xsession | Xreset | Description |
---|---|---|---|---|---|
X | X | X | X | Default or selected language | |
X | X | X | X | Alternate X authority file (optional) | |
X | X | X | X | Value of the Dtlogin*userPath resource (Xsession, Xfailsafe) or Dtlogin*systemPath resource (Xsetup, Xstartup, Xreset) | |
X | X | X | X | X server connection number | |
X | X | X | X | Shell specified in /etc/passwd (Xsession, Xfailsafe) or Dtlogin*systemShell resource (Xsetup, Xstartup, Xreset) | |
X | X | X | X | Value of Dtlogin.timeZone resource or timezone determined from system | |
| X | X | X | User name | |
| X | X | X | Home directory specified in /etc/passwd | |
| X | X | X | User name |
Changing the User or System Path
The login server sets the PATH environment variable when it runs the Xsession and Xfailsafe scripts. You can provide an alternate path to these scripts
To Change the User Path
Dtlogin*userPath:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11 |
To Change the System Path
Dtlogin*systemPath: /usr/bin/X11:/etc:/bin:/usr/bin:/usr/ucb |
To Change the System Shell
The login server sets the SHELL environment variable when it runs the Xsetup, Xstartup and Xfailsafe scripts. The default is /bin/sh. If you wish to provide an alternate shell to these scripts, you can set the Dtlogin*systemShell resource in Xconfig. For example:
Dtlogin*systemShell: /bin/ksh |
To Change the Time Zone
The login server sets the TZ environment variable when it runs the Xsetup, Xstartup, Xsession, Xfailsafe, and Xreset scripts. The default value is derived from the system so usually you will not need to change this behavior. To provide an alternate time zone to these scripts, set the Dtlogin.timeZone resource in Xconfig. For example:
Dtlogin.timeZone: CST6CDT |
Administering Login Manager
When the login server starts, one dtlogin process is started. The dtlogin process reads the Xconfig file to determine the initial login server configuration and locate other login server configuration files. The login server then reads the Xservers file to see if it has any displays to explicitly manage, and also reads the Xaccess file to control access to the login server.
If the login server finds from the Xservers file that it needs to manage a local display, it will start an X server as instructed in the Xservers file and then display a login screen on that display.
If the login server finds from the Xservers file that it needs to manage a network display, it will assume an X server is already running with the specified display name and display a login screen on that display.
The login server will then wait for XDMCP requests from the network.
For each display managed, the login server first creates a new dtlogin process for that display. This means if the login server is managing n displays, there will be n+1 dtlogin processes. The login server will run the Xsetup script, load the Xresources file, then run dtgreet to display the login screen. Once the user has entered a username and password and has been authenticated, the login server will run the Xstartup script and then the Xsession or Xfailsafe script. When the user has exited the session, the login server will run the Xreset script.
If the login server gets an XDMCP-indirect request, it will run dtchooser to present a list of login server hosts on the display. When the user selects a host from the list, the login server on that host will manage the display.
For the Xaccess, Xconfig, Xfailsafe, Xreset, language/Xresources, Xservers, Xsetup, and Xstartup configuration files, the login server will by default look first in /etc/dt/config, then /usr/dt/config, and use the first file found.
Login Manager Files
The default locations of the Login Manager files are:
/usr/dt/bin/dtlogin--the login server and display manager
/usr/dt/bin/dtgreet--displays a login screen for a display
/usr/dt/bin/dtchooser--displays a chooser screen for a display
/usr/dt/bin/Xsession--starts a desktop session
/usr/dt/config/Xfailsafe--starts a failsafe session
/usr/dt/config/Xconfig--login server configuration file
/usr/dt/config/Xservers--login server display description file
/usr/dt/config/Xaccess--login server access description file
/usr/dt/config/language/Xresources--display layout resources
/usr/dt/config/Xsetup--display setup file
/usr/dt/config/Xstartup--pre-session startup file
/usr/dt/config/Xreset--post-session reset file
/var/dt/Xpid--process ID of the login server
/var/dt/Xerrors--error log file of the login server