#!/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 startkde startxfce4 fluxbox"

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

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

