~ubuntu-branches/ubuntu/quantal/xdm/quantal

« back to all changes in this revision

Viewing changes to config/Xsession.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Stone
  • Date: 2005-12-10 16:17:22 UTC
  • mto: (7.1.1 gutsy) (9.1.1 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20051210161722-sj2ihp6lh0q8ve08
Tags: upstream-0.99.4
ImportĀ upstreamĀ versionĀ 0.99.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
XCOMM!SHELL_CMD
 
2
XCOMM
 
3
XCOMM $Xorg: Xsession,v 1.4 2000/08/17 19:54:17 cpqbld Exp $
 
4
XCOMM $XFree86: xc/programs/xdm/config/Xsession,v 1.2 1998/01/11 03:48:32 dawes Exp $
 
5
 
 
6
XCOMM redirect errors to a file in user's home directory if we can
 
7
for errfile in "$HOME/.xsession-errors" "${TMPDIR-/tmp}/xses-$USER" "/tmp/xses-$USER"
 
8
do
 
9
        if ( cp /dev/null "$errfile" 2> /dev/null )
 
10
        then
 
11
                chmod 600 "$errfile"
 
12
                exec > "$errfile" 2>&1
 
13
                break
 
14
        fi
 
15
done
 
16
 
 
17
case $# in
 
18
1)
 
19
        case $1 in
 
20
        failsafe)
 
21
                exec BINDIR/xterm -geometry 80x24-0-0
 
22
                ;;
 
23
        esac
 
24
esac
 
25
 
 
26
XCOMM The startup script is not intended to have arguments.
 
27
 
 
28
startup=$HOME/.xsession
 
29
resources=$HOME/.Xresources
 
30
 
 
31
if [ -s "$startup" ]; then
 
32
        if [ -x "$startup" ]; then
 
33
                exec "$startup"
 
34
        else
 
35
                exec /bin/sh "$startup"
 
36
        fi
 
37
else
 
38
        if [ -r "$resources" ]; then
 
39
                BINDIR/xrdb -load "$resources"
 
40
        fi
 
41
#if defined(__SCO__) || defined(__UNIXWARE__)
 
42
        [ -r /etc/default/xdesktops ] && {
 
43
                . /etc/default/xdesktops
 
44
        }
 
45
 
 
46
        [ -r /etc/default/xdm ] && {
 
47
                . /etc/default/xdm
 
48
        }
 
49
 
 
50
        XCOMM Allow the user to over-ride the system default desktop
 
51
        [ -r $HOME/.xdmdesktop ] && {
 
52
                . $HOME/.xdmdesktop
 
53
        }
 
54
 
 
55
        [ -n "$XDESKTOP" ] && {
 
56
                exec `eval $XDESKTOP`
 
57
        }
 
58
#endif
 
59
        exec BINDIR/xsm
 
60
fi