startwm.sh add back startup logic

ulab-next
Jay Sorg 12 years ago
parent d4d6a65adb
commit 9c3635fa5e

@ -1,25 +1,101 @@
#!/bin/sh #!/bin/sh
if [ -r /etc/default/locale ]; then
. /etc/default/locale #start the window manager
export LANG LANGUAGE wm_start()
fi {
if [ -r /etc/default/locale ]; then
# debian . /etc/default/locale
if [ -r /etc/X11/Xsession ]; then export LANG LANGUAGE
. /etc/X11/Xsession fi
exit 0
fi # debian
if [ -r /etc/X11/Xsession ]; then
# el . /etc/X11/Xsession
if [ -r /etc/X11/xinit/Xsession ]; then exit 0
. /etc/X11/xinit/Xsession fi
exit 0
fi # el
if [ -r /etc/X11/xinit/Xsession ]; then
# suse . /etc/X11/xinit/Xsession
if [ -r /etc/X11/xdm/Xsession ]; then exit 0
. /etc/X11/xdm/Xsession fi
exit 0
fi # suse
if [ -r /etc/X11/xdm/Xsession ]; then
xterm . /etc/X11/xdm/Xsession
exit 0
fi
xterm
}
#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
#PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
#export PATH=$PATH
# 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
pre_start
wm_start
post_start
exit 1

Loading…
Cancel
Save