initial commit
[profile/ivi/xorg-x11-xinit.git] / xinitrc.cpp
1 XCOMM!SHELL_CMD
2 XCOMM $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $
3
4 userresources=$HOME/.Xresources
5 usermodmap=$HOME/.Xmodmap
6 sysresources=XINITDIR/.Xresources
7 sysmodmap=XINITDIR/.Xmodmap
8
9 XCOMM merge in defaults and keymaps
10
11 if [ -f $sysresources ]; then
12 #ifdef __APPLE__
13     if [ -x /usr/bin/cpp ] ; then
14         XRDB -merge $sysresources
15     else
16         XRDB -nocpp -merge $sysresources
17     fi
18 #else
19     XRDB -merge $sysresources
20 #endif
21 fi
22
23 if [ -f $sysmodmap ]; then
24     XMODMAP $sysmodmap
25 fi
26
27 if [ -f "$userresources" ]; then
28 #ifdef __APPLE__
29     if [ -x /usr/bin/cpp ] ; then
30         XRDB -merge "$userresources"
31     else
32         XRDB -nocpp -merge "$userresources"
33     fi
34 #else
35     XRDB -merge "$userresources"
36 #endif
37 fi
38
39 if [ -f "$usermodmap" ]; then
40     XMODMAP "$usermodmap"
41 fi
42
43 XCOMM start some nice programs
44
45 #if defined(__SCO__) || defined(__UNIXWARE__)
46 if [ -r /etc/default/xdesktops ]; then
47   . /etc/default/xdesktops
48 fi
49
50 if [ -r $HOME/.x11rc ]; then
51   . $HOME/.x11rc
52 else
53   if [ -r /etc/default/X11 ]; then
54   . /etc/default/X11
55   fi
56 fi
57
58 #if defined(__SCO__)
59 if [ -n "$XSESSION" ]; then
60   case "$XSESSION" in
61     [Yy][Ee][Ss])
62       [ -x /usr/bin/X11/scosession ] && exec /usr/bin/X11/scosession
63       ;;
64   esac
65 fi
66
67 if [ -n "$XDESKTOP" ]; then
68   exec `eval echo $"$XDESKTOP"`
69 else
70   if [ -x /usr/bin/X11/pmwm -a -x /usr/bin/X11/scoterm ]; then
71     /usr/bin/X11/scoterm 2> /dev/null &
72     exec /usr/bin/X11/pmwm    2> /dev/null
73   fi
74 fi
75 #elif defined(__UNIXWARE__)
76 if [ -n "$XDESKTOP" ]; then
77   exec `eval echo $"$XDESKTOP"`
78 else
79   if [ -x /usr/X/bin/pmwm ]; then
80     exec /usr/X/bin/pmwm    2> /dev/null
81   fi
82 fi
83 #endif
84
85 XCOMM This is the fallback case if nothing else is executed above
86 #endif /* !defined(__SCO__)  && !defined(__UNIXWARE__) */
87
88 #ifdef __APPLE__
89
90 if [ -d XINITDIR/xinitrc.d ] ; then
91         for f in XINITDIR/xinitrc.dXSLASHGLOB.sh ; do
92                 [ -x "$f" ] && . "$f"
93         done
94         unset f
95 fi
96
97 #endif
98
99 TWM &
100 XCLOCK -geometry 50x50-1+1 &
101 XTERM -geometry 80x50+494+51 &
102 XTERM -geometry 80x20+494-0 &
103 exec XTERM -geometry 80x66+0+0 -name login