4 # note xinit needs full server path
6 if [ -f /usr/bin/Xfbdev ]; then
7 XSERVER=/usr/bin/Xfbdev
9 if [ -f /usr/bin/Xepson ]; then
10 XSERVER=/usr/bin/Xepson
12 if [ -f /usr/bin/Xorg ]; then
15 if [ -f /usr/bin/Xomap ]; then
16 XSERVER=/usr/bin/Xomap
18 if [ -f /usr/bin/Xglamo ]; then
19 XSERVER=/usr/bin/Xglamo
24 fallback_screen_arg() {
25 geom=`fbset | grep geometry`
26 w=`echo $geom | awk '{ print $2 }'`
27 h=`echo $geom | awk '{ print $3 }'`
28 b=`echo $geom | awk '{ print $6 }'`
29 echo -n "${w}x${h}x${b}"
33 ## used to read from assets, but sometimes assets is corrupted
34 # grep "Module ID" /proc/hal/assets | sed "s/.*://"
35 ## used to read from /proc/hal/model, but that is removed in 2.6
36 # echo ' iPAQ' `cat /proc/hal/model`
37 awk 'BEGIN { FS=": " } /Hardware/ { print $2 } ' </proc/cpuinfo
42 ARGS=" -pn +extension Composite"
44 # use ucb 1x00 touchscreen if present
45 if [ -z "$TSLIB_TSDEVICE" ] && [ -e /dev/touchscreen/ucb1x00 ]; then
46 ARGS="$ARGS -mouse /dev/touchscreen/ucb1x00"
49 # use usb mouse if present
50 # Xorg doesn't support "-mouse" option, and uses /dev/input/mice automatically
51 if [ -z "$TSLIB_TSDEVICE" ] && [ -e /dev/input/mice ] && [ "$XSERVER" != "Xorg" ]; then
52 ARGS="$ARGS -mouse /dev/input/mice"
55 # start off server in conventional location.
57 "HP iPAQ H3100" | "HP iPAQ H3800")
58 ARGS="$ARGS -br -dpi 100 -rgba vrgb -screen 320x240@90" ;;
59 "HP iPAQ H3600" | "HP iPAQ H3700" | "HP iPAQ H3900")
60 ARGS="$ARGS -br -dpi 100 -rgba vbgr -screen 320x240@270" ;;
61 "HP iPAQ H5400" | "HP iPAQ H2200")
62 ARGS="$ARGS -br -dpi 100 -rgba rgb" ;;
64 ARGS="$ARGS -br -dpi 200"
68 ARGS="$ARGS -br -dpi 100 -rgba vrgb -screen 320x240@90 vt2" ;;
69 # both 'Sharp-Collie' and just 'Collie' have been reported
71 ARGS="$ARGS -br -dpi 100 -rgba vrgb -screen 320x240@270" ;;
73 ARGS="$ARGS -br -dpi 100 -rgba vrgb -screen 320x240@270" ;;
74 "SHARP Shepherd" | "SHARP Husky" | "SHARP Corgi")
75 ARGS="$ARGS -br -dpi 200 -rgba rgb"
78 "SHARP Spitz" | "SHARP Akita" | "SHARP Borzoi")
79 ARGS="$ARGS -br -dpi 200 -rgba rgb -screen 480x640@270" ;;
81 ARGS="$ARGS -br -dpi 100 -rgba rgb" ;;
82 "Generic OMAP1510/1610/1710")
83 ARGS="$ARGS -br -dpi 220 -mouse /dev/input/event0" ;;
85 ARGS="$ARGS -br -dpi 100 -screen 240x320,10,1" ;;
87 ARGS="$ARGS -br -dpi 142" ;;
89 ARGS="$ARGS -br -dpi 225 -screen 480x640@270" ;;
90 "ARM-IntegratorCP" | "ARM-Versatile PB")
91 ARGS="$ARGS -br -rgba vrgb" ;;
94 ARGS="$ARGS -br -fb /dev/fb1" ;;
96 ARGS="$ARGS -dpi 285 -screen 480x640 -hide-cursor -br" ;;
97 "Motorola Ezx Platform")
98 ARGS="$ARGS -dpi 170 -screen 240x320 -hide-cursor -root-ppm /usr/share/pixmaps/xsplash-qvga.ppm vt1" ;;
100 ARGS="$ARGS -br -dpi 225 -screen 800x480x16 -mouse tslib" ;;
102 # That's what /proc/cpuinfo shows as hardware on the chumby
103 ARGS="$ARGS -dpi 121 -screen 320x240 -hide-cursor -mouse tslib -root-ppm /usr/share/pixmaps/xsplash-qvga.ppm vt1" ;;
105 # It is a device we do not know about, in which case we force
106 # kdrive to use the current framebuffer geometry -- otherwise
107 # it will default to trying to achieve 1024x768
108 S=`fallback_screen_arg`
109 ARGS="$ARGS -screen $S" ;;
112 if [ ! -z "$IMAGEON" ]; then
113 if [ -f /usr/bin/Xw100 ]; then
114 XSERVER=/usr/bin/Xw100
116 if [ -f /usr/bin/Ximageon ]; then
117 XSERVER=/usr/bin/Ximageon
123 exec xinit /etc/X11/Xsession -- $XSERVER $DISPLAY $ARGS $* >/tmp/x.log 2>&1