HS-IVI2.0 release - spec changes
[adaptation/panda/system-adaptation-pandaboard.git] / common / startx
1 #!/bin/sh
2
3 [ -r /etc/X11/Xorg.arch-options ] && . /etc/X11/Xorg.arch-options
4
5 DISPLAY=":0"
6 LOGDIR="/var/log"
7 XORG_CONF=" -config /etc/X11/xorg.conf -configdir /etc/X11/xorg.conf.d "
8 OTHER_OPTIONS=" -logfile /var/log/Xorg.0.log -ac -noreset -r +accessx 0 $XORG_ARCH_OPTS"
9
10 # Xorg automatically preserves logs in $LOGDIR/Xorg.DPY.log.(old)
11
12
13 for scriptlet in $(find /etc/X11/arch-preinit.d ! -type d); do
14     test -x "$scriptlet" && . "$scriptlet"
15 done
16
17 if [ -e ~/.xinitrc ]; then
18         XINITRC=~/.xinitrc
19 else
20         XINITRC=/etc/X11/xinitrc
21 fi
22
23 XSERVER_OPTIONS=" ${DISPLAY} ${OTHER_OPTIONS} ${XORG_CONF} "
24
25 if [ "$1" = "--gdb" ]; then
26         gdb --args Xorg ${XSERVER_OPTIONS}
27 else
28         if [ "$1" = "--only" ]; then
29
30                 Xorg ${XSERVER_OPTIONS} &
31         else
32                 xinit ${XINITRC} -- /usr/bin/Xorg ${XSERVER_OPTIONS} &
33         fi
34 fi
35