xrdp/sesman/startwm.sh

33 lines
747 B
Bash
Raw Normal View History

2010-07-08 11:50:50 +08:00
#!/bin/sh -l
2006-02-20 12:20:54 +08:00
# change the order in line below to run to run whatever window manager you
# want, default to kde
2006-02-20 12:20:54 +08:00
SESSIONS="startkde gnome-session startxfce4 xterm"
2006-02-20 12:20:54 +08:00
# change PATH to be what your environment needs usually what is in
# /etc/environment
#PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
#export PATH=$PATH
2006-02-20 12:20:54 +08:00
# for PATH and LANG from /etc/environment
# pam will auto process the environment file if /etc/pam.d/xrdp-sesman
# includes
# auth required pam_env.so readenv=1
#. /etc/environment
#export PATH=$PATH
#export LANG=$LANG
for WindowManager in $SESSIONS
do
which $WindowManager
if test $? -eq 0
then
echo "Starting $WindowManager"
$WindowManager
exit 0
fi
done
2006-02-20 12:20:54 +08:00
exit 1