From: sinkwitz@ifi.unizh.ch (Rainer Sinkwitz)
Subject: Re: Giving the choice between twm and 4Dwm
Organization: University of Zurich, Department of Computer Science
Date: Fri, 16 Oct 92 10:33:47 GMT


In article <9210081335.AA18880@nmrpcd.bioch.bioch.ox.ac.uk>, mikes@biochemistry.oxford.ac.uk writes:
> 
> Dear All,
> 
> I wonder if anybody has set up their SG to somehow ask the user when they
> log in what they wish their window manager to be.
> 
> If so, I would very much like to hear from you :-)
> 
> Cheers
> 
> Mike

I have done this for Open-Look (olwm). User may press Shift-Return
after the password and then get olwm.

Copy the following files to some place:
/usr/lib/X11/xdm/Xresources
/usr/lib/X11/Xsession

patch them with the appended path and look out for strings like
'ol' and 'open-look' to see how I did this.

Change this for your use for twm and put back the files to
/usr/lib/X11/xdm.

oooooo    oooo  Rainer Sinkwitz, Multimedia Lab         sinkwitz@ifi.unizh.ch
 $   $   $   "  University of Zurich, Switzerland        VOICE +41-1-257-4346
 $"$$    """"$  Inst.f.Informatik, Winterthurerstr. 190   FAX +41-1-363-00-35
o$o "$o  $ooo"  CH-8057-Z\"urich

*** ./Xresources.org	Thu Jul 30 12:17:16 1992
--- ./Xresources	Fri Aug  7 12:10:52 1992
***************
*** 16,22 ****
  
  xlogin*login.translations: #override\
          <Key>F1: set-session-argument(failsafe) finish-field()\n\
!         <Key>Return: set-session-argument() finish-field()
  
  xlogin*borderWidth:     1
  
--- 16,23 ----
  
  xlogin*login.translations: #override\
          <Key>F1: set-session-argument(failsafe) finish-field()\n\
!         ~Shift<Key>Return: set-session-argument() finish-field()\n\
!         Shift<Key>Return: set-session-argument(open-look) finish-field()
  
  xlogin*borderWidth:     1
  
*** ./Xsession.org	Thu Jul 30 12:17:16 1992
--- ./Xsession	Fri Aug  7 15:38:32 1992
***************
*** 9,14 ****
--- 9,15 ----
  	font="-sgi-terminal-*-*-*--17-*"
  fi
  
+ ol=false
  case $# in
  1)
  	case $1 in
***************
*** 15,20 ****
--- 16,24 ----
  	failsafe)
  	    exec xwsh -geom $geom -fn $font -xrm "XWsh*autoFork: off" -nomenu
  	    ;;
+ 	open-look)
+ 	    ol=true
+ 	    ;;
  	esac
  esac
  
***************
*** 26,34 ****
  
  if [ -r $xsession -a "$0" != $xsession ]; then
  	if [ -x $xsession ]; then
! 		exec $xsession
  	else
! 		exec /bin/sh $xsession
  	fi
  fi
  
--- 30,38 ----
  
  if [ -r $xsession -a "$0" != $xsession ]; then
  	if [ -x $xsession ]; then
! 		exec $xsession $1
  	else
! 		exec /bin/sh $xsession $1
  	fi
  fi
  
***************
*** 65,72 ****
  # /usr/adm/SYSLOG by default.
  #
  
! /usr/bin/X11/4Dwm >/dev/console 2>&1 &
! /usr/bin/X11/wait4wm
  
  /usr/sbin/startconsole -iconic
  
--- 69,84 ----
  # /usr/adm/SYSLOG by default.
  #
  
! OPENWINHOME=/f/x/openwin; export OPENWINHOME
! if [ $ol = true ]; then
!   PATH=$OPENWINHOME/bin:$PATH; export PATH
!   sleep 15 & pid=$!                     # OpenLook Window Manager
!   $OPENWINHOME/bin/olwm -syncpid $pid -depth 24 > /dev/console 2>&1 &
!   wait $pid                             # Pause until olwm inits
! else
!   /usr/bin/X11/4Dwm >/dev/console 2>&1 &
!   /usr/bin/X11/wait4wm
! fi
  
  /usr/sbin/startconsole -iconic
  


-- 
oooooo    oooo  Rainer Sinkwitz, Multimedia Lab         sinkwitz@ifi.unizh.ch
 $   $   $   "  University of Zurich, Switzerland        VOICE +41-1-257-4346
 $"$$    """"$  Inst.f.Informatik, Winterthurerstr. 190   FAX +41-1-363-00-35
o$o "$o  $ooo"  CH-8057-Z\"urich
Newsgroups: comp.sys.sgi