introduce new uci option "autostart" and modify xserver init scripts and window managers to make use of it
git-svn-id: svn://svn.openwrt.org/openwrt/packages@14140 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
12d724e810
commit
34cb96d60c
@ -68,9 +68,10 @@ define Package/fluxbox/install
|
|||||||
$(CP) $(PKG_INSTALL_DIR)/usr/share/fluxbox/styles/* $(1)/usr/share/fluxbox/styles/
|
$(CP) $(PKG_INSTALL_DIR)/usr/share/fluxbox/styles/* $(1)/usr/share/fluxbox/styles/
|
||||||
$(CP) files/init $(1)/usr/share/fluxbox/
|
$(CP) files/init $(1)/usr/share/fluxbox/
|
||||||
$(CP) files/menu $(1)/usr/share/fluxbox/
|
$(CP) files/menu $(1)/usr/share/fluxbox/
|
||||||
echo "#!/bin/sh" > $(1)/usr/bin/WM
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||||
echo "/usr/bin/fluxbox" >> $(1)/usr/bin/WM
|
$(INSTALL_DATA) \
|
||||||
chmod +x $(1)/usr/bin/WM
|
./files/uci-defaults/x11 \
|
||||||
|
$(1)/etc/uci-defaults/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/fbsetbg/install
|
define Package/fbsetbg/install
|
||||||
@ -88,5 +89,12 @@ define Package/fbrun/install
|
|||||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fbrun $(1)/usr/bin/
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fbrun $(1)/usr/bin/
|
||||||
endef
|
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,fbrun))
|
||||||
$(eval $(call BuildPackage,fluxbox))
|
$(eval $(call BuildPackage,fluxbox))
|
||||||
|
1
Xorg/wm/fluxbox/files/uci-defaults/x11
Normal file
1
Xorg/wm/fluxbox/files/uci-defaults/x11
Normal file
@ -0,0 +1 @@
|
|||||||
|
uci set x11.@desktop[0].autostart=enlightenment_start
|
@ -58,6 +58,17 @@ define Package/matchbox-window-manager/install
|
|||||||
$(CP) \
|
$(CP) \
|
||||||
$(PKG_INSTALL_DIR)/usr/share/themes/* \
|
$(PKG_INSTALL_DIR)/usr/share/themes/* \
|
||||||
$(1)/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
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,matchbox-window-manager))
|
$(eval $(call BuildPackage,matchbox-window-manager))
|
||||||
|
1
Xorg/wm/matchbox-window-manager/files/uci-defaults/x11
Normal file
1
Xorg/wm/matchbox-window-manager/files/uci-defaults/x11
Normal file
@ -0,0 +1 @@
|
|||||||
|
uci set x11.@desktop[0].autostart=enlightenment_start
|
@ -27,19 +27,23 @@ input() {
|
|||||||
ARGS="$ARGS -$cfg $driver,,device=$device"
|
ARGS="$ARGS -$cfg $driver,,device=$device"
|
||||||
}
|
}
|
||||||
|
|
||||||
start_with_x() {
|
desktop() {
|
||||||
local cfg="$1"
|
local cfg="$1"
|
||||||
config_get start $cfg start
|
config_get autostart $cfg autostart
|
||||||
[ -n "$start" ] && START="$START $start &"
|
[ -n "$autostart" ] && eval $autostart &
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
export DISPLAY=":0"
|
||||||
config_load x11
|
config_load x11
|
||||||
config_foreach screen screen
|
config_foreach screen screen
|
||||||
config_foreach graphic graphic
|
config_foreach graphic graphic
|
||||||
config_foreach input input
|
config_foreach input input
|
||||||
#config_foreach start_with_x start
|
|
||||||
X $ARGS &
|
X $ARGS &
|
||||||
#eval $START # not used yet, because the buildroot lacks of the functionality of editing uci-values while building a package
|
config_foreach desktop desktop
|
||||||
sleep 1 && DISPLAY=":0" WM & # workaround
|
#test -d /etc/xdg/autostart || exit
|
||||||
|
#for elem in `ls /etc/xdg/autostart/`; do
|
||||||
|
# exec=`grep "^Exec=" "/etc/xdg/autostart/$elem"`
|
||||||
|
# eval ${exec#*=} &
|
||||||
|
#done
|
||||||
}
|
}
|
||||||
|
@ -123,7 +123,7 @@ define Build/Compile
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/xglamo/install
|
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) $(PKG_INSTALL_DIR)/usr/bin/Xglamo $(1)/usr/bin/
|
||||||
$(CP) ./files/x.init $(1)/etc/init.d/x11
|
$(CP) ./files/x.init $(1)/etc/init.d/x11
|
||||||
$(if $(TS_POINTERCAL),$(CP) ./files/pointercal.$(TS_POINTERCAL) $(1)/etc/pointercal)
|
$(if $(TS_POINTERCAL),$(CP) ./files/pointercal.$(TS_POINTERCAL) $(1)/etc/pointercal)
|
||||||
|
@ -12,9 +12,21 @@ screen() {
|
|||||||
[ -n "$dpi" ] && ARGS="$ARGS -dpi $dpi"
|
[ -n "$dpi" ] && ARGS="$ARGS -dpi $dpi"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
desktop() {
|
||||||
|
local cfg="$1"
|
||||||
|
config_get autostart $cfg autostart
|
||||||
|
[ -n "$autostart" ] && eval $autostart &
|
||||||
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
export DISPLAY=":0"
|
||||||
config_load x11
|
config_load x11
|
||||||
config_foreach screen screen
|
config_foreach screen screen
|
||||||
TSLIB_TSDEVICE="/dev/event1" Xglamo $ARGS &
|
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
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user