head     1.14;
branch   ;
access   ;
symbols  ;
locks    ; strict;
comment  @# @;


1.14
date     96.01.28.15.35.02;  author svalente;  state Exp;
branches ;
next     1.13;

1.13
date     95.09.30.05.29.44;  author ghudson;  state Exp;
branches ;
next     1.12;

1.12
date     95.09.30.05.29.23;  author ghudson;  state Exp;
branches ;
next     ;


desc
@@


1.14
log
@If run with the argument "7", set the session to /usr/vue/config/Xsession.
Also, made it not run "stty sane" on the hp.
@
text
@#!/bin/sh 

# Top level Xsession file for all users
#
# $Id: Xsession,v 1.13 95/09/30 05:29:44 ghudson Exp Locker: svalente $

trap "kdestroy; unlog; fsid -u -f $USER; exit 0" 1 2 15

initlib="/usr/athena/lib/init"
defsession=$1
defsessioncmd="$2"

case $defsession in
1|4)
	if [ -f .xsession ]; then
		session="./.xsession"
	else
		session="$initlib/xsession"
	fi
	;;
2)
	session="$initlib/xsession -nocalls"
	;;
3)
	session="xterm -ls -geometry 80x24+280+220 -display :0.0"
	;;
5)
	session="$defsessioncmd"
	;;
7)
	session=/usr/vue/config/Xsession
	;;
esac

# Set the tty characteristics of the parent (console window)
# Redirect stdin since some versions of stty use it instead of stdout.
if [ "${hosttype}" = "decmips" ]; then
  stty dec 0<&1 2>/dev/null
else
  if [ "${hosttype}" != "hp" ]; then
    stty sane 0<&1 2>/dev/null
  fi
fi

# Make random Athena modifications to keymap if required.

test -f /usr/athena/lib/X11/keymaps/AthenaMods && \
  xmodmap /usr/athena/lib/X11/keymaps/AthenaMods

$session

status=$?
if [ $status != 0 ]; then
		echo ERROR:
		echo "Xsession returned non-zero status."
		echo ""
		echo 'Select the login option to "Ignore your customizations"'
		echo 'to login and repair your dot files.'
		kdestroy			# destroy tickets.
		sleep 10
		exit $status
fi


# Cannot detach homedir here, since this script is executed in the users
# homedir.

kdestroy				# destroy tickets.
cd /tmp
unlog
fsid -u -f $USER > /dev/null 2>&1
sleep 3					# let them see any messages (quickly)
exit 0
@


1.13
log
@Don't assume . in path in Xsession.
@
text
@d5 1
a5 1
# $Id: Xsession,v 1.12 1995/09/30 05:29:23 ghudson Exp ghudson $
d30 3
d40 3
a42 1
  stty sane 0<&1 2>/dev/null
@


1.12
log
@Imported.
@
text
@d5 1
a5 1
# $Id: Xsession,v 1.12 1995/01/10 07:27:11 cfields Exp cfields $
d16 1
a16 1
		session=".xsession"
@
