[comp.unix.ultrix] DECwindows customizations

rr@csun10.cs.uh.edu (Ravindran Ramachandran) (11/11/89)

   A question about DecWindows starting up on a ULTRIX system;
is it possible to log into the terminal using the

console  "etc/getty std.9600" vt100 on secure

entry in /etc/ttys, and then startup dxsession? Basically, I want
to be able to startup DecWindows *after* logging in, just like I
can start up xinit. I want to be able to make the choice of having
either X windows, or Dec Windows, running after logging in.

   Basically, is dxsession similar to xinit? From the entry that
I see in /etc/ttys, dxsession does not call X (Xcfb, in my case)
but instead has /bin/login do it.

   Thanks for any pointers,
     --Ravi-

PS: About my previous request for information: there seem to be
more people interested in getting 3rd party disks, but very few
already using it; I have 10 requests for info but only one reply
with the information.

rhare@carina.unm.edu (robert...) (11/11/89)

In article <16729@uhnix1.uh.edu> rr@cs.uh.edu writes:
>
>   A question about DecWindows starting up on a ULTRIX system;
>is it possible to log into the terminal using the
>
>console  "etc/getty std.9600" vt100 on secure
>
>entry in /etc/ttys, and then startup dxsession? Basically, I want
>to be able to startup DecWindows *after* logging in, just like I
>can start up xinit. I want to be able to make the choice of having
>either X windows, or Dec Windows, running after logging in.
>
>   Basically, is dxsession similar to xinit? From the entry that
>I see in /etc/ttys, dxsession does not call X (Xcfb, in my case)
>but instead has /bin/login do it.
>     --Ravi-

Im not sure if this will help, but we use this entry in ttys to set up 
temporary guest accounts.  You might be able to do something like this 
to ask a question about the type of enviroment to set up.

:0 "/usr/bin/login -P /usr/bin/Xprompter -C /usr/local/bin/wsguest" none on secure window="/usr/bin/Xcfb"

-P is simply the passwd passing program. It seems to simple latch on to
stdin and stdout from /usr/bin/login.

-C will start up whatever environment you want.

The window setting specifies the server which should be the same under
DEC windows or X windows.

So you can probably put in a program under the -C option that will open
up a window and query the user for what all they want then start up dxsession.
Often I have found that its not dxsession people need to change but the 
window manager, if this is the case then simply modify the windowManagerName
resource in your .Xdefaults file to point to a different manager. Example:

! Session Manager Options
sm.windowManagerName: /usr/local/bin/twm

Here is the simple script we call to set the environments you might be able to
hack it up for your purpose.

#!/bin/csh
# PROGRAM    :  wsguest.setup
# AUTHOR     :  Robert Hare
# DATE       :	08/29/89
# DESCRIPTION:  Provide a guest account for workstation use.  This program
# 		will check if the current user is the GUEST account.  If they
#		are the GUEST accounts home directory will be cleared and 
# 		the tar image TARIMAGE	will be untared into the account.  This
#		allows for a clean start each time the guest account it used.
#
# Find out who is logging in.
set USER=`/usr/ucb/whoami`
#
# Check in the following switch for the user we are dealing with.  All guest
# accounts should be listed.  The default should be the normal setup for 
# normal accounts.
#
switch (${USER})
	case wsguest:
		/bin/chmod 700 /tmp/guests/${USER}
		/bin/rm -rf /tmp/guests/${USER}/{*,*.*,.*}
		cd /tmp/guests/${USER}
	 	/bin/tar xpf /usr/local/lib/guests/${USER}.tar
	        /usr/bin/dxsession -display :0
		breaksw
	case xvguest:
		chmod 700 /tmp/guests/${USER}
		/bin/rm -rf /tmp/guests/${USER}/{*,*.*,.*}
		cd /tmp/guests/${USER}
	 	/bin/tar xpf /usr/local/lib/guests/${USER}.tar
	        /usr/bin/dxsession -display :0
		breaksw
	default:
	        /usr/bin/dxsession -display :0
		breaksw
endsw


Robert Hare
rhare@ariel.unm.edu