HEPiX X11 Scripts - Anatomy

This page describes the anatomy of the HEPiX X11 scripts, 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 HEPiX scripts 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:

  1. it reads the X resources from the file defined by the entry named `resources' in xdm-config
  2. it runs as root the program defined by `setup' that contains what to do before displaying the login panel
  3. it displays the login panel and waits for a user to log in
  4. it runs as root the program defined by `startup' that usually performs sysadmin tasks before starting the user session
  5. it runs as the user the program defined by `session' that is in fact the real X session
  6. it runs as root the program defined by `reset' that usually performs sysadmin tasks after the user session is finished
  7. 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 HEPiX scripts (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:


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:

  1. parse the options given on the command line (like "failsafe")
  2. perform some preliminary tasks:
    1. check /etc/nologin
    2. start the failsafe session if selected
    3. display a welcome message with xmessage
    4. check the home directory: quotas, writable...
    5. setup $HOME/.hepix
    6. redirect the output to the log file $HOME/.hepix/xsession.log
    7. secure the X server with xsecure
  3. process the options like X forwarding (not yet implemented)
  4. get some information:
    1. get X server information with xinfo
    2. get host information by sourcing the HEPiX shells profile
    3. source the different xprofile files
    4. get keyboard information from xkeyboard
  5. check the information collected and apply the policies with apply_policy
  6. use the information:
    1. load the X resources using xresources and creating $HOME/.hepix/generated_xresources
    2. start mxconns and set $XDISPLAY if $HX_START_MXCONNS is set
    3. start the mandatory clients using xclients.m
    4. check $HX_DESKTOP and maybe exec another program (e.g. CDE desktop)
    5. source the user's shell profile with dump_shell_env if $HX_SOURCEPROFILE
    6. check $HX_STARTUP and maybe exec another program (e.g. $HOME/.xsession)
    7. set the font path with xsetfp according to $HX_FONT_PATH
    8. do some optional keyboard mappings according to $HX_KEYBOARD, maybe creating $HOME/.hepix/generated_xmodmaprc
    9. start the window manager according to $HX_WM, maybe creating $HOME/.hepix/wm/generated_wmrc
    10. set the root window according to $HX_ROOT_WINDOW
    11. start the X clients using xclients
    12. 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:

Here are the settings at hep level:


Lionel Cons, 8-Jan-1997