introduce new uci option "autostart" and modify xserver init scripts and window manag...
authorMirko Vogt <mirko@openwrt.org>
Wed, 21 Jan 2009 21:02:54 +0000 (21:02 +0000)
committerMirko Vogt <mirko@openwrt.org>
Wed, 21 Jan 2009 21:02:54 +0000 (21:02 +0000)
SVN-Revision: 14140

Xorg/wm/fluxbox/Makefile
Xorg/wm/fluxbox/files/uci-defaults/x11 [new file with mode: 0644]
Xorg/wm/matchbox-window-manager/Makefile
Xorg/wm/matchbox-window-manager/files/uci-defaults/x11 [new file with mode: 0644]
Xorg/xorg/xserver/xorg-server/files/x.init
Xorg/xserver/xglamo/Makefile
Xorg/xserver/xglamo/files/x.init

index d1ed3fa67bd29566eaf8d753e0bd57556a04bbd9..42b12f66468c561cf171b1e39773861a4953a40a 100644 (file)
@@ -68,9 +68,10 @@ define Package/fluxbox/install
        $(CP) $(PKG_INSTALL_DIR)/usr/share/fluxbox/styles/* $(1)/usr/share/fluxbox/styles/
        $(CP) files/init $(1)/usr/share/fluxbox/
        $(CP) files/menu $(1)/usr/share/fluxbox/
-       echo "#!/bin/sh" > $(1)/usr/bin/WM
-       echo "/usr/bin/fluxbox" >> $(1)/usr/bin/WM
-       chmod +x $(1)/usr/bin/WM
+       $(INSTALL_DIR) $(1)/etc/uci-defaults
+       $(INSTALL_DATA) \
+               ./files/uci-defaults/x11 \
+               $(1)/etc/uci-defaults/
 endef
 
 define Package/fbsetbg/install
@@ -88,5 +89,12 @@ define Package/fbrun/install
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fbrun $(1)/usr/bin/
 endef
 
+define Package/fluxbox/postinst
+       #!/bin/sh
+       [ -n "$${IPKG_INSTROOT}" ] && exit
+       . /etc/functions.sh
+       uci_apply_defaults
+endef
+
 $(eval $(call BuildPackage,fbrun))
 $(eval $(call BuildPackage,fluxbox))
diff --git a/Xorg/wm/fluxbox/files/uci-defaults/x11 b/Xorg/wm/fluxbox/files/uci-defaults/x11
new file mode 100644 (file)
index 0000000..3d029c0
--- /dev/null
@@ -0,0 +1 @@
+uci set x11.@desktop[0].autostart=enlightenment_start
\ No newline at end of file
index 948a573bdbf834e6b9e0300331a16c5c51421288..43439f1162d808f2a85a82694e0f7bb4e74da01a 100644 (file)
@@ -58,6 +58,17 @@ define Package/matchbox-window-manager/install
        $(CP) \
                $(PKG_INSTALL_DIR)/usr/share/themes/* \
                $(1)/usr/share/themes/
+       $(INSTALL_DIR) $(1)/etc/uci-defaults
+       $(INSTALL_DATA) \
+               ./files/uci-defaults/x11 \
+               $(1)/etc/uci-defaults/
+endef
+
+define Package/matchbox-window-manager/postinst
+       #!/bin/sh
+       [ -n "$${IPKG_INSTROOT}" ] && exit
+       . /etc/functions.sh
+       uci_apply_defaults
 endef
 
 $(eval $(call BuildPackage,matchbox-window-manager))
diff --git a/Xorg/wm/matchbox-window-manager/files/uci-defaults/x11 b/Xorg/wm/matchbox-window-manager/files/uci-defaults/x11
new file mode 100644 (file)
index 0000000..3d029c0
--- /dev/null
@@ -0,0 +1 @@
+uci set x11.@desktop[0].autostart=enlightenment_start
\ No newline at end of file
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
 }
index fd2f9312ef4a2ec83dfc6eb412cabbe81ee461a0..d16d2689018dbd967998e5e792906dde33508829 100644 (file)
@@ -123,7 +123,7 @@ define Build/Compile
 endef
 
 define Package/xglamo/install
-       $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib $(1)/etc/init.d $(1)/etc/config
+       $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib $(1)/etc/init.d $(1)/etc/config $(1)/etc/uci-defaults
        $(CP) $(PKG_INSTALL_DIR)/usr/bin/Xglamo $(1)/usr/bin/
        $(CP) ./files/x.init $(1)/etc/init.d/x11
        $(if $(TS_POINTERCAL),$(CP) ./files/pointercal.$(TS_POINTERCAL) $(1)/etc/pointercal)
index 78ce6c4e774136c8ac32ac38c9c2d3ccbd0f476c..555fc4941c6619060b20c785815a2191c292abb9 100755 (executable)
@@ -12,9 +12,21 @@ screen() {
        [ -n "$dpi" ] && ARGS="$ARGS -dpi $dpi"
 }
 
+desktop() {
+       local cfg="$1"
+       config_get autostart $cfg autostart
+       [ -n "$autostart" ] && eval $autostart &
+}
+
 start() {
+       export DISPLAY=":0"
        config_load x11
        config_foreach screen screen
        TSLIB_TSDEVICE="/dev/event1" Xglamo $ARGS &
-       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
 }