#!/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
          resources=$HOME/.Xdefaults
     fi
     if [ -f $resources ]; then
          xrdb -load $resources
     fi
     twm &
     exec xterm -geometry 80x24+10+10 -ls
fi
