#!/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

##	# AIX mod by GR
##	TZ=MET-1METDST,M3.4.0,M9.4.0
##	export TZ
##	PATH=${PATH}:/usr/local/bin
##	export PATH

resources=$HOME/.Xresources

startup=$HOME/.xsession
if [ -f $startup ]; then
	# if .xsession exist run it by /bin/sh
	exec /bin/sh $startup
else
	startup=$HOME/.xinitrc
	if [ -f $startup ]; then
		# if no .xsession then perhaps a .xinitrc
		exec /bin/sh $startup
	else
		if [ -f $resources ]; then
			xrdb -load $resources
		fi
		twm &
		exec xterm -geometry 80x24+10+10 -ls
	fi
fi
