~ubuntu-branches/ubuntu/vivid/xdm/vivid

« back to all changes in this revision

Viewing changes to config/Xsession

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Stone
  • Date: 2005-12-10 16:17:22 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20051210161722-uf9qjm9mq9dxaj8z
Tags: 1:0.99.4-0ubuntu1
New upstream release.

Show diffs side-by-side

added added

removed removed

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