555fc4941c6619060b20c785815a2191c292abb9
[openwrt/svn-archive/archive.git] / Xorg / xserver / xglamo / files / x.init
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2006 OpenWrt.org
3 START=99
4
5 ARGS=""
6
7 screen() {
8 local cfg="$1"
9 config_get resolution $cfg resolution
10 config_get dpi $cfg dpi
11 [ -n "$resolution" ] && ARGS="$ARGS -screen $resolution"
12 [ -n "$dpi" ] && ARGS="$ARGS -dpi $dpi"
13 }
14
15 desktop() {
16 local cfg="$1"
17 config_get autostart $cfg autostart
18 [ -n "$autostart" ] && eval $autostart &
19 }
20
21 start() {
22 export DISPLAY=":0"
23 config_load x11
24 config_foreach screen screen
25 TSLIB_TSDEVICE="/dev/event1" Xglamo $ARGS &
26 config_foreach desktop desktop
27 #test -d /etc/xdg/autostart || exit
28 #for elem in `ls /etc/xdg/autostart/`; do
29 # exec=`grep "^Exec=" "/etc/xdg/autostart/$elem"`
30 # eval ${exec#*=} &
31 #done
32 }