[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Cross posting per request




On Sun, 1 Sep 1996, Glenn Bily wrote:

> 5) If a startup shell script for window managers should also be easy to
> add.
> 
> I think that the user should have the possibility of specifying the
> window manager at the startx prompt such as:
> 
>      startx fvwm
>      startx openwin
>      startx fvwm-95
> 
> And have resonable assurances that it will work.
> An additional bonus to this would be allowing root to setup a simple
> table to map the names to various shell scripts that would start the
> window managers. This would allow for practically all contingencies and
> complexities in getting that window manager started. This would also
> allow the package maintainer to move the main window manager binaries
> out of the path and out of harms way.

  This should apply to xdm startup as well.  The current (default) setup for
Debian is parse through /etc/X11/window-managers and execute the first
window manager that it finds (and is installed).  In a larger environment
where you have users that prefer one window manager over another, a
convenient method we use here is to check the user's home directory for
the existance of a special file and start its corresponding WM.
  We could merge both the startx and xdm WM startups by simply modifying
the xinitrc and Xsession scripts to do the following:

 ...
 ... [Initialization stuff]
 ...
if (-e $HOME/.mwm_gui ) then
        set WINMGR = "mwm"
else if (-e $HOME/.twm_gui ) then
        set WINMGR = "twm"
else if (-e $HOME/.olvwm_gui ) then
        set WINMGR = "olvwm"
else if (-e $HOME/.fvwm_gui ) then
        set WINMGR = "fvwm"
else if (-e $HOME/.fvwm2_gui ) then
        set WINMGR = "fvwm2"
endif

# Start up a window manager
switch ($WINMGR)
case mwm:
        /usr/bin/X11/mwm
        breaksw
case twm:
        /usr/bin/X11/twm
        breaksw
case olvwm:
        /usr/bin/X11/olvwm
        breaksw
case fvwm:
        /usr/bin/X11/fvwm
        breaksw
case fvwm2:
        /usr/bin/X11/fvwm2
        breaksw
default: 
        echo "Unsupported window manager: $WINMGR"
        echo "Starting up fvwm as a fall back..."
        /usr/bin/X11/fvwm
        breaksw
endsw

  Note that this is a portion of a csh script, but gives the basic idea.
Not only would this give the _user_ the option of which WM to use, but
this would also be _very_ compatible with other flavors of UNIX as well.
Once you have common X startup files, you can just push the same scripts
to every (Unix) machine on your network (which sys-admins like very much).


-Jason Keimig
-jkeimig@tisl.ukans.edu  http://www.tisl.ukans.edu/~jkeimig
-TiMCAN Project
-University of Kansas
=======================================================================
"I have two very rare photographs: one is a picture of Houdini locking
his keys in his car; the other is a rare photograph of Norman Rockwell
beating up a child."
                -- Steven Wright



Reply to: