#!/bin/sh
#
# Xsession
#
# This is the program that is run as the client
# for the display manager.  This example is
# quite friendly as it attempts to run a per-user
# .xsession file instead of forcing a particular
# session layout
#

case $# in
1)
	case $1 in
	failsafe)
		exec xterm -geometry 80x24-0-0 -ls
		;;
	esac
esac

startup=$HOME/.xsession
resources=$HOME/.Xresources

if [ -f $startup ]; then
	exec $startup
	exec /bin/sh $startup
else
	if [ -f $resources ]; then
		xrdb -load $resources
	fi
	xterm -geometry 80x24+350+300 -ls -T Login -n Login &
	twm &
	xclock -geometry 100x100-0+0 &
	exec xlogout -label 'Click here to Logout'
fi
