introduce new uci option "autostart" and modify xserver init scripts and window manag...
[openwrt/svn-archive/archive.git] / Xorg / xorg / xserver / xorg-server / files / x.init
index 04ef4ae1e1eb9b79b06f28f5a90e2c99260e5cbd..08dbf86932cb8dc048f7d5be99af4ddcf0bbf167 100755 (executable)
@@ -27,19 +27,23 @@ input() {
        ARGS="$ARGS -$cfg $driver,,device=$device"
 }
 
-start_with_x() {
+desktop() {
        local cfg="$1"
-       config_get start $cfg start
-       [ -n "$start" ] && START="$START $start &"
+       config_get autostart $cfg autostart
+       [ -n "$autostart" ] && eval $autostart &
 }
 
 start() {
+       export DISPLAY=":0"
        config_load x11
        config_foreach screen screen
        config_foreach graphic graphic
        config_foreach input input
-       #config_foreach start_with_x start
        X $ARGS &
-       #eval $START # not used yet, because the buildroot lacks of the functionality of editing uci-values while building a package
-       sleep 1 && DISPLAY=":0" WM & # workaround
+       config_foreach desktop desktop
+       #test -d /etc/xdg/autostart || exit
+       #for elem in `ls /etc/xdg/autostart/`; do
+       #       exec=`grep "^Exec=" "/etc/xdg/autostart/$elem"`
+       #       eval ${exec#*=} &
+       #done
 }