#!/bin/sh
# $HOME/.xsession
# This script launch a WM when user choose default session
# from GUI login (KDM, GDM, WDM or XDM).
#
# Licence : GNU GPL
# (c) Eko M. Budi, 2004
# (c) Vector Linux, 2004
#

# It search a Window manager according to the WMLIST
# Change this to reorder the priotity
WMLIST="XwmMenu starticewm startfluxbox startkde startxfce4"

# Launch xscreensaver if available, but only as non-root user
test $UID -gt 0 && xscreensaver -no-splash &

if [ -r $HOME/.xset.sh ]; then
   . $HOME/.xset.sh
fi

for WM in $WMLIST; do
   which $WM &> /dev/null
   if [ $? = 0 ]; then
      exec $WM
   fi
done

