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.
- init, via sh, starts xdm.
- xdm, with resources from .../xdm/Xresources, runs .../xdm/Xlogin.
- Xlogin sets the gamma value and exec's clogin to let a user login.
- xdm runs .../xdm/Xsession as the logged-in user.
- .../xdm/Xsession does the following things:
- transfer to .../xdm/Xsession.dt unless ~/.disableDestop exists.
- check for FAILSAFE login.
- transfer to ~/.xsession file if it exists.
- set the user's language.
- attempt to set the user's environment variables
(fails on csh-derivatives).
- use xhost to give every machine in the world access to this display.
- start 4Dwm
- start a console
- run (or interpret with sh) the ~/.sgisession file.
- start workspace if ~/.workspace/autostart contains the word "on".
- start a toolchest on every screen.
- tranfer to an X process reaper.
- .../xdm/Xsession.dt performs several functions.
- check for FAILSAFE login.
- set the user's language.
- run makeDotDesktop.
- attempt to set the user's environment variables
(fails on csh-derivatives).
- transfer to ~/.xsession file if it exists.
- load the user's ~/.Xresources file.
- set the XUSERFILESEARCHPATH environment variable.
- do any ~/.chestrc validation desired.
- use xhost to give every machine in the world access to this display.
- run miscellaneous SGI desktop startup programs.
- attempts to set the user's environment variables again.
- run the ~/.desktop-hostname/desktopenv script.
- start a window manager such as 4Dwm.
- start soundscheme.
- run the file manager, fm, and the iconbook.
- run the ~/.sgisession script.
- ~/.xsession (if used) should, at a minimum:
- load the ~/.Xresources file.
- set the XUSERFILESEARCHPATH, if desired
- load the user's environment variables correctly.
- do any wierd SGI-specific setup checks desired.
- run the ~/.xinitrc script.
- ~/.xinitrc, (if used) may:
- play silly logging-in noises.
- set the XINITPID environment variable for later use.
- set the LD_LIBRARY_PATH variable.
- grab symbolics from the xrdb program.
- load any weird color databases.
- make any desired alteration to the font path
- make any changes to the keymap.
- run a window manager.
- set a background.
- set the cursor.
- run sundry applications, in the background.
- do various other things.
- run a (console) terminal. When it exits, you're logged out
(there are other styles of arranging the fatal application).
- 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.
|