#!/bin/sh
#
#	NAME
#		Xsession
#
#	DESCRIPTION
#		This Xsession script is the system session script executed
#		when no script is found in the site directory or user's
#		home directory.
#
#               SITE X SESSION:
#		The system administrater can customize a "site" session script
#		that overrides this system X session script.  This is done by
#		simply creating the X session file that the xdm Xsession script
#		is looking for as the site X session file, typically:
#			/usr/lib/X11/XP/config/zzsite/Xsession
#		Make sure the file is EXECUTABLE!
#		(See $TEKXP_ROOT/xdm/sample.xsession for an example).
#
#               USER'S X SESSION:
#		Users can customize their own X session script that overrides
#		both the system and site X session scripts.  This is done by
#		simply creating an EXECUTABLE .xsession file in their $HOME
#		directory ($HOME/.xsession).
#		(See $TEKXP_ROOT/xdm/sample.xsession for an example).
#
#		WARNING:  When creating your own X session file make sure that
#		    all commands immediately return, backgrounding the
#		    processes if necessary.  When running under XDM (the
#		    $XDM_INITIATED environment variable is set by Xdm's
#		    master Xsession file), one final client should be exec'ed,
#		    acting as a "Session Control Process". When this
#		    script terminates, control passes back to the xdm
#		    X session script, which terminates and causes xdm to
#		    end the session and ask for a new login.
#
#	ENVIRONMENT VARIABLES
#	    DISPLAY
#	        points to the TekXpress display.  Usually set by xdm or
#		user's .profile or .login file.
#	    TEKXP_ROOT
#	        contains the path to the XP directory tree that
#	        contains the system support files.  Default is
#	        "/usr/lib/X11/XP", set in XPstartup, user may override in
#		their .profile or .login file.
#
#	RCS VERSION
#		$Header: /disks/vp1/nwd/tools/media/X11/XP/config/zzTek/RCS/Xsession,v 1.6 1991/05/29 16:06:55 glennw Exp $
#
# Example:
# setup user interaction preferences:
#xset b 100 400 c 50 s 1800

# Default window manager, if local mwm option is not enabled, you will
# need to setup your choice of window manager in your .xsession file.
#
$TEKXP_ROOT/bin/xpsh mwm&
#
#
# The other clients
$TEKXP_ROOT/bin/xterm.sh -geometry 80x24+1+500 -xrm "*iconGeometry:+450+1" &

#
# The Session Control Client for xdm, often a window manager, perhaps an xterm,
# is exec'ed so that it is the sole process whose exit xdm is waiting for.
#
if test "$XDM_INITIATED"
then
    exec $TEKXP_ROOT/bin/xterm.sh -name "Session Control" -iconic -geometry 80x24+1+30 -xrm "*iconGeometry:+150+1" -ls
fi
