#! /bin/sh
-exec $HOME/.Xclients
+# SunOS /bin/sh is broken wrt local. *sigh*
+if test "`uname -s`" = "SunOS" -a "$RUNNING_UNDER_BASH" = ""; then
+ RUNNING_UNDER_BASH=1
+ export RUNNING_UNDER_BASH
+ exec bash $0 "$@"
+fi
+if [ -f $HOME/.xsession-errors ]; then
+ exec > $HOME/.xsession-errors 2>&1
+fi
+
+# Debugging
+echo `date`
+. $HOME/.environment
+
+xprop -root -remove _NET_NUMBER_OF_DESKTOPS -remove _NET_DESKTOP_NAMES -remove _NET_CURRENT_DESKTOP
+setxkbmap -option compose:caps
+
+#gnome-settings-daemon &
+#gnome-panel &
+#seahorse-daemon &
+#numlockx off
+
+exec $(findcommand startxfce4 openbox metacity twm)
+
+#if [ -f $HOME/.Xdefaults ]; then
+# xrdb -merge $HOME/.Xdefaults
+#fi
+
+xautolock -locker "xlock -mode blank" -nowlocker "xlock -mode blank" &
+gkrellm&
+
+#xmodmap -e 'keycode 115 = less greater'
+#xmodmap -e 'keycode 117 = greater less'
+
+eval `ssh-agent`
+#if [ -f $HOME/.ssh/identify ]; then
+ #ssh-add $HOME/.ssh/identity
+#fi
+#if [ -f $HOME/.ssh/id_dsa ]; then
+ #ssh-add $HOME/.ssh/id_dsa
+#fi
+
+xsetroot -solid DarkSlateGray &
+#$XTERM -ls -title xterm1 -geometry 83x25+0+23 &
+#$XTERM -ls -title xterm2 -geometry 83x25+0+375 &
+#$XTERM -ls -title xterm3 -geometry 83x25-0+23 &
+#$XTERM -ls -title xterm4 -geometry 83x25-0+375 &
+
+#$XTERM -xrm "*Desk:1" -ls -title xterm5 -geometry 83x25+0+23 &
+#$XTERM -xrm "*Desk:1" -ls -title xterm6 -geometry 83x25+0+375 &
+emacs -xrm "*Desk:1" -geometry 81x50-0+23 &
+unclutter -idle 5 -jitter 2 -root&
+
+#nice xstarfish -d 1 hour -s small &
+#root-portal -n&
+
+#gdesklets&
+randombg&
+
+xset r rate 250 50
+xset -b
+xset -c
+
+if type openbox; then
+ epist &
+ exec openbox
+fi
+
+if type oroborus; then
+ keylaunch &
+ exec oroborus
+fi
+
+if type fvwm24; then
+ exec fvwm24
+fi
+
+if type fvwm2; then
+ exec fvwm2
+fi
+
+if type fvwm; then
+ exec fvwm
+fi
+
+if type -p startkde; then
+ exec startkde
+fi
+
+if type -p sawfish; then
+ exec sawfish
+fi
+
+if type -p sawmill; then
+ exec sawmill
+fi
+
+# Absolute fallback
+exec $XTERM
+exec xterm