From 8179f73a3f979567778fa093b99369cb123b98cf Mon Sep 17 00:00:00 2001 From: mirko Date: Wed, 11 Feb 2009 21:23:47 +0000 Subject: [PATCH] adding poc implementation for autostarting x11 applications git-svn-id: svn://svn.openwrt.org/openwrt/packages@14479 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Xorg/xorg/xserver/xorg-server/files/x.init | 19 +++++++++++++------ Xorg/xserver/xglamo/files/x.init | 17 ++++++++++++----- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/Xorg/xorg/xserver/xorg-server/files/x.init b/Xorg/xorg/xserver/xorg-server/files/x.init index 08dbf8693..6571696e5 100755 --- a/Xorg/xorg/xserver/xorg-server/files/x.init +++ b/Xorg/xorg/xserver/xorg-server/files/x.init @@ -31,6 +31,8 @@ desktop() { local cfg="$1" config_get autostart $cfg autostart [ -n "$autostart" ] && eval $autostart & + config_get fdo_compliance $cfg fdo_compliance + [ -n "`echo \"$fdo_compliance\" 2> /dev/null | grep autostart`" ] && exit # in case the environment provides its own functionality to do the autostart stuff exit here } start() { @@ -39,11 +41,16 @@ start() { config_foreach screen screen config_foreach graphic graphic config_foreach input input - X $ARGS & + Xorg $ARGS & + sleep 1 # give the xserver some time get initialized 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 + test -d /etc/xdg/autostart || exit + sleep 1 # give the first x11 application some time to get present - afterwars we'll start the x11 autostart applications + for elem in `ls /etc/xdg/autostart/`; do + if grep "^Hidden=true" "/etc/xdg/autostart/$elem" > /dev/null; then + continue + fi + exec=`grep "^Exec=" "/etc/xdg/autostart/$elem"` + eval ${exec#*=} & + done } diff --git a/Xorg/xserver/xglamo/files/x.init b/Xorg/xserver/xglamo/files/x.init index 555fc4941..ddefa1254 100755 --- a/Xorg/xserver/xglamo/files/x.init +++ b/Xorg/xserver/xglamo/files/x.init @@ -16,6 +16,8 @@ desktop() { local cfg="$1" config_get autostart $cfg autostart [ -n "$autostart" ] && eval $autostart & + config_get fdo_compliance $cfg fdo_compliance + [ -n "`echo \"$fdo_compliance\" 2> /dev/null | grep autostart`" ] && exit # in case the environment provides its own functionality to do the autostart stuff exit here } start() { @@ -23,10 +25,15 @@ start() { config_load x11 config_foreach screen screen TSLIB_TSDEVICE="/dev/event1" Xglamo $ARGS & + sleep 1 # give the xserver some time get initialized 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 + test -d /etc/xdg/autostart || exit + sleep 1 # give the first x11 application some time to get present - afterwars we'll start the x11 autostart applications + for elem in `ls /etc/xdg/autostart/`; do + if grep "^Hidden=true" "/etc/xdg/autostart/$elem" > /dev/null; then + continue + fi + exec=`grep "^Exec=" "/etc/xdg/autostart/$elem"` + eval ${exec#*=} & + done }