diff options
author | jsorg71 <jsorg71> | 2010-07-26 01:52:12 +0000 |
---|---|---|
committer | jsorg71 <jsorg71> | 2010-07-26 01:52:12 +0000 |
commit | aefd3808a11439a83c295f1a1cecaff97011c6d5 (patch) | |
tree | 84efb15a8f3531eab6dcd370899311b108765686 /sesman/startwm.sh | |
parent | 4e024ccb4cc02aa11ae07c8e2aedcf8165fb89cc (diff) | |
download | xrdp-proprietary-aefd3808a11439a83c295f1a1cecaff97011c6d5.tar.gz xrdp-proprietary-aefd3808a11439a83c295f1a1cecaff97011c6d5.zip |
don't use -l
Diffstat (limited to 'sesman/startwm.sh')
-rwxr-xr-x | sesman/startwm.sh | 91 |
1 files changed, 76 insertions, 15 deletions
diff --git a/sesman/startwm.sh b/sesman/startwm.sh index 74850296..16008517 100755 --- a/sesman/startwm.sh +++ b/sesman/startwm.sh @@ -1,9 +1,80 @@ -#!/bin/sh -l +#!/bin/sh # change the order in line below to run to run whatever window manager you # want, default to kde -SESSIONS="startkde gnome-session startxfce4 xterm" +SESSIONS="gnome-session blackbox startxfce4 startkde xterm" + +#start the window manager +wm_start() +{ + for WindowManager in $SESSIONS + do + which $WindowManager + if test $? -eq 0 + then + echo "Starting $WindowManager" + $WindowManager + return 0 + fi + done + return 0 +} + +#Execution sequence for interactive login shell +#Following pseudo code explains the sequence of execution of these files. +#execute /etc/profile +#IF ~/.bash_profile exists THEN +# execute ~/.bash_profile +#ELSE +# IF ~/.bash_login exist THEN +# execute ~/.bash_login +# ELSE +# IF ~/.profile exist THEN +# execute ~/.profile +# END IF +# END IF +#END IF +pre_start() +{ + if [ -f /etc/profile ] + then + . /etc/profile + fi + if [ -f ~/.bash_profile ] + then + . ~/.bash_profile + else + if [ -f ~/.bash_login ] + then + . ~/.bash_login + else + if [ -f ~/.profile ] + then + . ~/.profile + fi + fi + fi + return 0 +} + +#When you logout of the interactive shell, following is the +#sequence of execution: +#IF ~/.bash_logout exists THEN +# execute ~/.bash_logout +#END IF +post_start() +{ + if [ -f ~/.bash_logout ] + then + . ~/.bash_logout + fi + return 0 +} + +#. /etc/environment +#export PATH=$PATH +#export LANG=$LANG # change PATH to be what your environment needs usually what is in # /etc/environment @@ -14,19 +85,9 @@ SESSIONS="startkde gnome-session startxfce4 xterm" # 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 +pre_start +wm_start +post_start exit 1 |