]> TLD Linux GIT Repositories - packages/lxdm.git/blob - lxdm.Xsession
- updated to 0.5.3, PLD merge
[packages/lxdm.git] / lxdm.Xsession
1 #!/bin/sh
2
3 # Make it login shell
4 if [ "$HAVE_LOGIN_SHELL" != "yes" ]; then
5         export HAVE_LOGIN_SHELL=yes
6         case $SHELL in
7                 */csh|*/tcsh)
8                 # [t]cshrc is always sourced automatically.
9                 # Note that sourcing csh.login after .cshrc is non-standard.
10                 exec $SHELL -c "if (-f /etc/csh.login) source /etc/csh.login; if (-f ~/.login) source ~/.login; exec $0 $*"
11                 ;;
12                 *)
13                 exec $SHELL -l $0 $*
14         esac
15 fi
16 unset HAVE_LOGIN_SHELL
17
18 # Call standard xinit actions
19 . /etc/X11/xinit/xinitdefs
20
21 case $1 in
22 failsafe)
23         exec xterm -geometry 80x24-0-0
24         ;;
25 ""|default)
26         # take default action
27         if [ -x "$HOME/.Xclients" ]; then
28             exec "$HOME/.Xclients"
29         else
30             exec /etc/X11/xinit/Xclients
31         fi
32         ;;
33 custom)
34         if [ -x "$HOME/.xsession" ]; then
35             exec "$HOME/.xsession"
36         else
37             exec xmessage -center -buttons OK:0 -default OK \
38             "Sorry, $HOME/.xsession not found."
39         fi
40         ;;
41 *)
42         exec /etc/X11/xinit/Xclients $1
43 esac