summaryrefslogtreecommitdiffstats
path: root/sesman/startwm.sh
diff options
context:
space:
mode:
authorjsorg71 <jsorg71>2009-08-09 00:04:11 +0000
committerjsorg71 <jsorg71>2009-08-09 00:04:11 +0000
commite71b3012d59846e885282c9e324e40b3f7e774ab (patch)
treee55b694408b80178f45370646f2cabad81a88f99 /sesman/startwm.sh
parenta34ca6793a5729a38abd51bc7ead94e2936e7dd5 (diff)
downloadxrdp-proprietary-e71b3012d59846e885282c9e324e40b3f7e774ab.tar.gz
xrdp-proprietary-e71b3012d59846e885282c9e324e40b3f7e774ab.zip
make startwm.sh simpler and added comments
Diffstat (limited to 'sesman/startwm.sh')
-rwxr-xr-xsesman/startwm.sh60
1 files changed, 18 insertions, 42 deletions
diff --git a/sesman/startwm.sh b/sesman/startwm.sh
index 3445c494..ea8eab0d 100755
--- a/sesman/startwm.sh
+++ b/sesman/startwm.sh
@@ -1,48 +1,24 @@
#!/bin/sh
-# edit this file to run whatever window manager you want
-# defaults to running kde
+# change the order in line below to run to run whatever window manager you
+# want, default to kde
-# for kde
-if [ -d /opt/kde3/bin ]; then
- export PATH=/opt/kde3/bin:$PATH
-fi
-if [ -d /opt/kde/bin ]; then
- export PATH=/opt/kde/bin:$PATH
-fi
-which startkde
-if [ $? -eq 0 ]; then
- startkde
- exit 0
-fi
-which kde
-if [ $? -eq 0 ]; then
- kde
- exit 0
-fi
+SESSIONS="startkde gnome-session startxfce4 xterm"
-# gnome
-which gnome-session
-if [ $? -eq 0 ]; then
- gnome-session
- exit 0
-fi
+# 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
-# blackbox
-#if [ "'which blackbox'" != "" ]; then
-# blackbox
-# exit 0
-#fi
+for WindowManager in $SESSIONS
+do
+ which $WindowManager
+ if test $? -eq 0
+ then
+ echo "Starting $WindowManager"
+ $WindowManager
+ exit 0
+ fi
+done
-# fvwm95
-#if [ "'which fvwm95'" != "" ]; then
-# fvwm95
-# exit 0
-#fi
-
-# fall back on xterm
-which xterm
-if [ $? -eq 0 ]; then
- xterm
- exit 0
-fi
+exit 1