[Talisman]
search
TALISMAN general Information
Unix server
Hacking Your X11 Environment on an SGI

Not for the faint of heart...

Reality Check: Why would you want to do this?

If you dislike the default 4Dwm window manager (as in perhaps wanting to put your own favorite image on your background), or you want one shared set of environment settings across all machines, or you don't like the toolchest, then you have the need. If you can write in any scripting language (most commonly the Bourne shell), then you have the ability. If you have both (or are the intrepid explorer type), then read on...

The Grisly Details

To change your X session startup, the script /usr/lib/X11/xdm/Xsession.dt must be disabled in favor of the more generic /usr/lib/X11/xdm/Xsession. This is done by having an extant file named ~/.disableDesktop . In addition, most of the Xsession file may be overridden by a ~/.xsession script. The Xsession script will transfer control automatically to ~/.xsession if the latter exists. Any required behavior of the system script must be provided by the user's ~/.xsession script, or some script that it calls. Typically the .xsession file will execute the ~/.xinitrc script.

Here's the current program/script call order under IRIX 5.3. References to the directory "/usr/lib/X11/xdm" are represented as ".../xdm/". References to the user's home directory are represented as "~/".

Pay particular attention to the word "transfer" below --- this usually means one script is transferring all control to another one, never to return. The trigger files causing this allow the user to gain control.

  1. init, via sh, starts xdm.
  2. xdm, with resources from .../xdm/Xresources, runs .../xdm/Xlogin.
  3. Xlogin sets the gamma value and exec's clogin to let a user login.
  4. xdm runs .../xdm/Xsession as the logged-in user.
  5. .../xdm/Xsession does the following things:
    1. transfer to .../xdm/Xsession.dt unless ~/.disableDestop exists.
    2. check for FAILSAFE login.
    3. transfer to ~/.xsession file if it exists.
    4. set the user's language.
    5. attempt to set the user's environment variables (fails on csh-derivatives).
    6. use xhost to give every machine in the world access to this display.
    7. start 4Dwm
    8. start a console
    9. run (or interpret with sh) the ~/.sgisession file.
    10. start workspace if ~/.workspace/autostart contains the word "on".
    11. start a toolchest on every screen.
    12. tranfer to an X process reaper.
  6. .../xdm/Xsession.dt performs several functions.
    1. check for FAILSAFE login.
    2. set the user's language.
    3. run makeDotDesktop.
    4. attempt to set the user's environment variables (fails on csh-derivatives).
    5. transfer to ~/.xsession file if it exists.
    6. load the user's ~/.Xresources file.
    7. set the XUSERFILESEARCHPATH environment variable.
    8. do any ~/.chestrc validation desired.
    9. use xhost to give every machine in the world access to this display.
    10. run miscellaneous SGI desktop startup programs.
    11. attempts to set the user's environment variables again.
    12. run the ~/.desktop-hostname/desktopenv script.
    13. start a window manager such as 4Dwm.
    14. start soundscheme.
    15. run the file manager, fm, and the iconbook.
    16. run the ~/.sgisession script.
  7. ~/.xsession (if used) should, at a minimum:
    1. load the ~/.Xresources file.
    2. set the XUSERFILESEARCHPATH, if desired
    3. load the user's environment variables correctly.
    4. do any wierd SGI-specific setup checks desired.
    5. run the ~/.xinitrc script.
  8. ~/.xinitrc, (if used) may:
    1. play silly logging-in noises.
    2. set the XINITPID environment variable for later use.
    3. set the LD_LIBRARY_PATH variable.
    4. grab symbolics from the xrdb program.
    5. load any weird color databases.
    6. make any desired alteration to the font path
    7. make any changes to the keymap.
    8. run a window manager.
    9. set a background.
    10. set the cursor.
    11. run sundry applications, in the background.
    12. do various other things.
    13. run a (console) terminal. When it exits, you're logged out (there are other styles of arranging the fatal application).
  9. WARNING: The division between .xsession and .xinitrc is arbitrary in these notes, but probably can be precisely determined. This determination is probably obligatory for compatibility with other implementations of the X window system.
If this site was helpful, feel free to tip the webmaster