HEPiX X11 Scripts - Anatomy
This page describes the anatomy of the %hx, i.e. what runs behind
the scene from the login panel to the end of the X session.
The %xdm wrappers check if the user should run
the %h and if yes start the HEPiX X session.
%xdm Wrappers
The behaviour of %xdm is defined its configuration
file named xdm-config
. With the default configuration
here is what happens when %xdm starts its job:
- it reads the X resources from the file defined
by the entry named `resources' in
xdm-config
- it runs as root the program defined by `setup' that contains
what to do before displaying the login panel
- it displays the login panel and waits for a user to log in
- it runs as root the program defined by `startup' that
usually performs sysadmin tasks before starting the user session
- it runs as the user the program defined by `session' that
is in fact the real X session
- it runs as root the program defined by `reset' that
usually performs sysadmin tasks after the user session is finished
- it usually reset the X server and go back to step 1
The HEPiX X11 scripts use wrappers that replace the normal %xdm
files and scripts while keeping a copy of the old ones of course. The
old files are used if the user should not run the %h (root for
instance, see %is_hepix). The wrappers can be customised at site,
cluster or system level (see %xdm Files)
and here is what the hep level files do:
- %Xresources: define several X resources for %xdm, including
xlogin
"bindings"
like F1
starts a failsafe session, F2
a debug session;
see the file itself for more information
- %Xstartup: add the user in
/etc/utmp
with %utmp_update
and handle the console tasks (e.g. ownership of /dev/console
) when appropriate
- %Xsession: execute the "real" HEPiX X session described below
- %Xreset: remove the user from
/etc/utmp
and handle the console tasks
HEPiX X Session
You should have in mind the picture
of the HEPiX X session when reading the following...
Here is what the HEPiX X session does in (gory) details:
- parse the options given on the command line (like "failsafe")
- perform some preliminary tasks:
- check
/etc/nologin
- start the failsafe session if selected
- display a welcome message with %xmessage
- check the home directory: quotas, writable...
- setup
$HOME/.hepix
- redirect the output to the log file %$HOME/.hepix/xsession.log
- secure the X server with %xsecure
- process the options like X forwarding (not yet implemented)
- get some information:
- get X server information with %xinfo
- get host information by sourcing the HEPiX shells profile
- source the different %xprofile files
- get keyboard information from %xkeyboard
- check the information collected and apply the policies with %apply_policy
- use the information:
- load the X resources using %xresources
and creating %$HOME/.hepix/generated_xresources
- start
mxconns
and set %XDISPLAY if %HX_START_MXCONNS is set
- start the mandatory clients using %xclients.m
- check %HX_DESKTOP and maybe
exec
another program
(e.g. CDE desktop)
- source the user's shell profile with %dump_shell_env if %HX_SOURCEPROFILE
- check %HX_STARTUP and maybe
exec
another program
(e.g. %$HOME/.xsession)
- set the font path with %xsetfp according to %HX_FONT_PATH
- do some optional keyboard mappings according to %HX_KEYBOARD,
maybe creating %$HOME/.hepix/generated_xmodmaprc
- start the window manager according to %HX_WM,
maybe creating %$HOME/.hepix/wm/generated_wmrc
- set the root window according to %HX_ROOT_WINDOW
- start the X clients using %xclients
- exec the last client according to %HX_LAST_CLIENT
Here are the major "branches" that can prevent you from executing
all the tasks described above:
- if you start a failsafe session, you escape in step 2.2
- if you have a "forwarding" session, you escape in step 3
- if you change %HX_DESKTOP, you escape in step 6.4
- if you change %HX_STARTUP (or have a valid %$HOME/.xsession),
you escape in step 6.6
Here are the settings at hep level:
Lionel Cons, 8-Jan-1997