2020-10-27 07:29:56 +01:00
|
|
|
Index: xrdp-0.9.14/sesman/startwm.sh
|
|
|
|
===================================================================
|
|
|
|
--- xrdp-0.9.14.orig/sesman/startwm.sh
|
|
|
|
+++ xrdp-0.9.14/sesman/startwm.sh
|
|
|
|
@@ -7,34 +7,81 @@
|
2018-03-28 08:50:44 +02:00
|
|
|
# exec xterm
|
|
|
|
|
2017-06-30 09:57:10 +02:00
|
|
|
|
|
|
|
-# Execution sequence for interactive login shell - pseudocode
|
|
|
|
-#
|
|
|
|
-# IF /etc/profile is readable THEN
|
|
|
|
-# execute ~/.bash_profile
|
|
|
|
-# END IF
|
|
|
|
-# IF ~/.bash_profile is readable THEN
|
|
|
|
-# execute ~/.bash_profile
|
|
|
|
-# ELSE
|
|
|
|
-# IF ~/.bash_login is readable THEN
|
|
|
|
-# execute ~/.bash_login
|
|
|
|
-# ELSE
|
|
|
|
-# IF ~/.profile is readable THEN
|
|
|
|
-# execute ~/.profile
|
|
|
|
-# END IF
|
|
|
|
-# END IF
|
|
|
|
-# END IF
|
|
|
|
+#start the window manager
|
|
|
|
+wm_start()
|
|
|
|
+{
|
2020-10-27 07:29:56 +01:00
|
|
|
+ #To customize system-wise session, edit this file.
|
|
|
|
+ #To customize user specific session, copy this file to $HOME and edit it.
|
|
|
|
+ #Please refer to DefaultWindowManager and UserWindowManager in /etc/xrdp/sesman.ini for more details.
|
|
|
|
+
|
|
|
|
+ #The default session is gnome (GNOME Session)
|
2020-03-24 15:55:46 +01:00
|
|
|
+ #sle means SLE-Classic Session
|
|
|
|
+ SESSION="gnome"
|
2017-06-30 09:57:10 +02:00
|
|
|
+
|
|
|
|
+ case $SESSION in
|
|
|
|
+ sle)
|
|
|
|
+ if [ -r /usr/bin/gnome-session ]; then
|
2020-03-24 15:55:46 +01:00
|
|
|
+ export XDG_SESSION_TYPE=x11
|
|
|
|
+ export GNOME_SHELL_SESSION_MODE=sle-classic
|
2017-06-30 09:57:10 +02:00
|
|
|
+ /usr/bin/gnome-session --session gnome-classic
|
2020-10-27 07:29:56 +01:00
|
|
|
+ elif [ -r /usr/bin/icewm-session ]; then
|
|
|
|
+ /usr/bin/icewm-session
|
2017-06-30 09:57:10 +02:00
|
|
|
+ fi
|
|
|
|
+ ;;
|
|
|
|
+ gnome)
|
|
|
|
+ if [ -r /usr/bin/gnome-session ]; then
|
2020-03-24 15:55:46 +01:00
|
|
|
+ export XDG_SESSION_TYPE=x11
|
2017-06-30 09:57:10 +02:00
|
|
|
+ /usr/bin/gnome-session
|
2020-10-27 07:29:56 +01:00
|
|
|
+ elif [ -r /usr/bin/icewm-session ]; then
|
|
|
|
+ /usr/bin/icewm-session
|
|
|
|
+ fi
|
|
|
|
+ ;;
|
|
|
|
+ plasma)
|
|
|
|
+ if [ -r /usr/bin/startplasma-x11 ]; then
|
|
|
|
+ export XDG_SESSION_TYPE=x11
|
|
|
|
+ /usr/bin/startplasma-x11
|
|
|
|
+ elif [ -r /usr/bin/icewm-session ]; then
|
|
|
|
+ /usr/bin/icewm-session
|
2017-06-30 09:57:10 +02:00
|
|
|
+ fi
|
|
|
|
+ ;;
|
|
|
|
+ icewm)
|
|
|
|
+ if [ -r /usr/bin/icewm-session ]; then
|
|
|
|
+ /usr/bin/icewm-session
|
|
|
|
+ fi
|
|
|
|
+ ;;
|
|
|
|
+ esac
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+#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 [ -r /etc/profile ]; then
|
|
|
|
+ if [ -f /etc/profile ]
|
|
|
|
+ then
|
|
|
|
. /etc/profile
|
|
|
|
fi
|
|
|
|
- if [ -r ~/.bash_profile ]; then
|
|
|
|
+ if [ -f ~/.bash_profile ]
|
|
|
|
+ then
|
|
|
|
. ~/.bash_profile
|
|
|
|
else
|
|
|
|
- if [ -r ~/.bash_login ]; then
|
|
|
|
+ if [ -f ~/.bash_login ]
|
|
|
|
+ then
|
|
|
|
. ~/.bash_login
|
|
|
|
else
|
|
|
|
- if [ -r ~/.profile ]; then
|
|
|
|
+ if [ -f ~/.profile ]
|
|
|
|
+ then
|
|
|
|
. ~/.profile
|
|
|
|
fi
|
|
|
|
fi
|
2020-10-27 07:29:56 +01:00
|
|
|
@@ -42,11 +89,11 @@ pre_start()
|
2017-06-30 09:57:10 +02:00
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
-# When loging out from the interactive shell, the execution sequence is:
|
|
|
|
-#
|
|
|
|
-# IF ~/.bash_logout exists THEN
|
|
|
|
-# execute ~/.bash_logout
|
|
|
|
-# END IF
|
|
|
|
+#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()
|
2016-09-21 13:37:09 +02:00
|
|
|
{
|
2020-10-27 07:29:56 +01:00
|
|
|
if [ -r ~/.bash_logout ]; then
|
|
|
|
@@ -55,46 +102,6 @@ post_start()
|
2017-06-30 09:57:10 +02:00
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
-#start the window manager
|
|
|
|
-wm_start()
|
|
|
|
-{
|
2016-09-21 13:37:09 +02:00
|
|
|
- if [ -r /etc/default/locale ]; then
|
|
|
|
- . /etc/default/locale
|
|
|
|
- export LANG LANGUAGE
|
|
|
|
- fi
|
|
|
|
-
|
|
|
|
- # debian
|
|
|
|
- if [ -r /etc/X11/Xsession ]; then
|
2017-06-30 09:57:10 +02:00
|
|
|
- pre_start
|
2016-09-21 13:37:09 +02:00
|
|
|
- . /etc/X11/Xsession
|
2017-06-30 09:57:10 +02:00
|
|
|
- post_start
|
2016-09-21 13:37:09 +02:00
|
|
|
- exit 0
|
|
|
|
- fi
|
|
|
|
-
|
|
|
|
- # el
|
|
|
|
- if [ -r /etc/X11/xinit/Xsession ]; then
|
2017-06-30 09:57:10 +02:00
|
|
|
- pre_start
|
2016-09-21 13:37:09 +02:00
|
|
|
- . /etc/X11/xinit/Xsession
|
2017-06-30 09:57:10 +02:00
|
|
|
- post_start
|
2016-09-21 13:37:09 +02:00
|
|
|
- exit 0
|
|
|
|
- fi
|
2017-06-30 09:57:10 +02:00
|
|
|
-
|
2016-09-21 13:37:09 +02:00
|
|
|
- # suse
|
|
|
|
- if [ -r /etc/X11/xdm/Xsession ]; then
|
2017-06-30 09:57:10 +02:00
|
|
|
- # since the following script run a user login shell,
|
|
|
|
- # do not execute the pseudo login shell scripts
|
2016-09-21 13:37:09 +02:00
|
|
|
- . /etc/X11/xdm/Xsession
|
|
|
|
- exit 0
|
2020-10-27 07:29:56 +01:00
|
|
|
- elif [ -r /usr/etc/X11/xdm/Xsession ]; then
|
|
|
|
- . /usr/etc/X11/xdm/Xsession
|
|
|
|
- exit 0
|
2016-09-21 13:37:09 +02:00
|
|
|
- fi
|
|
|
|
-
|
2017-06-30 09:57:10 +02:00
|
|
|
- pre_start
|
2016-09-21 13:37:09 +02:00
|
|
|
- xterm
|
2017-06-30 09:57:10 +02:00
|
|
|
- post_start
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
#. /etc/environment
|
|
|
|
#export PATH=$PATH
|
|
|
|
#export LANG=$LANG
|
2020-10-27 07:29:56 +01:00
|
|
|
@@ -109,6 +116,8 @@ wm_start()
|
2017-06-30 09:57:10 +02:00
|
|
|
# includes
|
|
|
|
# auth required pam_env.so readenv=1
|
|
|
|
|
|
|
|
+pre_start
|
|
|
|
wm_start
|
|
|
|
+post_start
|
2016-09-21 13:37:09 +02:00
|
|
|
|
2017-06-30 09:57:10 +02:00
|
|
|
exit 1
|