#!/bin/sh # if [ ! -x /usr/X11R6/bin/Xfbdev ] ; then exit 0 ; fi . /etc/profile killproc() { # kill the named process(es) pid=`/bin/ps -e | /bin/grep $1 | /bin/sed -e 's/^ *//' -e 's/ .*//'` [ "$pid" != "" ] && kill $pid } export USER=root export HOME=/root export XAPPLRESDIR=/usr/X11R6/lib/app-defaults export XFILESEARCHPATH=./%N%S%C.ad:/usr/X11R6/lib/X11/%L/%T/%N%S%C:/usr/X11R6/lib/X11/%l/%T/%N%S%C:/usr/X11R6/lib/X11/%T/%N%S%C:./%N%S.ad:/usr/X11R6/lib/X11/%L/%T/%N%S:/usr/X11R6/lib/X11/%l/%T/%N%S:/usr/X11R6/lib/X11/%T/%N%S:/usr/local/lib/X11/app-defaults/%N%S%C.ad export DISPLAY=:0 case $1 in 'start') echo "Starting X..." cd $HOME Xfbdev -screen 240x320@90 -dpi 100 & bl 1 1 32 if [ -f /etc/xcalibrate.conf ]; then echo "Restoring touch screen calibration" /usr/X11R6/bin/xcalibrate -cal `cat /etc/xcalibrate.conf` fi xmodmap -e "keycode 135 = Mode_switch Multi_key" mbsession & xset s 30 180 # -nocpp since there is no C pre-processor. xrdb -load -nocpp < /etc/X11/Xdefaults xrdb -load -nocpp < /root/.Xdefauls ;; 'stop') echo "Killing X..." killproc Xfbdev ;; *) echo "usage: $0 { start | stop }" ;; esac