summaryrefslogtreecommitdiff
path: root/arm-common/startx.in
diff options
context:
space:
mode:
Diffstat (limited to 'arm-common/startx.in')
-rwxr-xr-xarm-common/startx.in42
1 files changed, 42 insertions, 0 deletions
diff --git a/arm-common/startx.in b/arm-common/startx.in
new file mode 100755
index 0000000..f3bf9c6
--- /dev/null
+++ b/arm-common/startx.in
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+DISPLAY=":0"
+LOGDIR="/var/log"
+XORG_CONF=" -config /etc/X11/xorg.conf -configdir /etc/X11/xorg.conf.d "
+OTHER_OPTIONS=" -logfile ${LOGDIR}/Xorg.0.log -ac -noreset +accessx 0 +dpmsphone "
+
+#backup previous Xorg.0.log file
+if [ -e ${LOGDIR}/Xorg.0.log ]; then
+ mv ${LOGDIR}/Xorg.0.log ${LOGDIR}/prev.Xorg.0.log
+fi
+
+#backup previous Xorg.0.log.old file
+if [ -e ${LOGDIR}/Xorg.0.log.old ]; then
+ mv ${LOGDIR}/Xorg.0.log.old ${LOGDIR}/prev.Xorg.0.log.old
+fi
+
+if [ -e ~/.xinitrc ]; then
+ XINITRC=~/.xinitrc
+else
+ XINITRC=/etc/X11/xinitrc
+fi
+
+XSERVER_OPTIONS=" ${DISPLAY} ${OTHER_OPTIONS} ${XORG_CONF} "
+
+if [ "$1" = "--gdb" ]; then
+ if [ -x /usr/bin/pvrsrvinit ]; then
+ pvrsrvinit start
+ fi
+ gdb --args Xorg ${XSERVER_OPTIONS}
+else
+ if [ "$1" = "--only" ]; then
+ if [ -x /usr/bin/pvrsrvinit ]; then
+ pvrsrvinit start
+ fi
+
+ Xorg ${XSERVER_OPTIONS} &
+ else
+ xinit ${XINITRC} -- @PREFIX@/bin/Xorg ${XSERVER_OPTIONS} &
+ fi
+fi
+