slitaz-boot-scripts rev 64 1.8.1
Manage default WM using /etc/X11/wm.default
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Fri Mar 21 13:55:51 2008 +0100 (2008-03-21) |
parents | 31837608fcdf |
children | 870239113baf |
files | etc/init.d/bootopts.sh etc/init.d/hwconf.sh |
line diff
1.1 --- a/etc/init.d/bootopts.sh Fri Mar 21 12:32:40 2008 +0000 1.2 +++ b/etc/init.d/bootopts.sh Fri Mar 21 13:55:51 2008 +0100 1.3 @@ -102,3 +102,23 @@ 1.4 modprobe ac 1.5 modprobe battery 1.6 fi 1.7 + 1.8 +# Check for a Window Manager (for a flavor, default WM can be changed 1.9 +# with boot option or with an addfile in /etc/X11/wm.default. 1.10 +if grep -q "wm=" /proc/cmdline; then 1.11 + mkdir -p /etc/X11 1.12 + WM=`cat /proc/cmdline | sed 's/.*wm=\([^ ]*\).*/\1/'` 1.13 + case $WM in 1.14 + jwm) 1.15 + echo "jwm" > /etc/X11/wm.default ;; 1.16 + ob|openbox|openbox-session) 1.17 + echo "openbox" > /etc/X11/wm.default ;; 1.18 + e17|enlightenment|enlightenment_start) 1.19 + echo "enlightenment" > /etc/X11/wm.default ;; 1.20 + esac 1.21 +else 1.22 + # If no default WM fallback to JWM. 1.23 + if [ ! -f /etc/X11/wm.default ]; then 1.24 + echo "jwm" > /etc/X11/wm.default 1.25 + fi 1.26 +fi
2.1 --- a/etc/init.d/hwconf.sh Fri Mar 21 12:32:40 2008 +0000 2.2 +++ b/etc/init.d/hwconf.sh Fri Mar 21 13:55:51 2008 +0100 2.3 @@ -66,9 +66,9 @@ 2.4 sed -i s/'slim'/''/ /etc/rcS.conf 2.5 status 2.6 else 2.7 - tazx 2.8 + tazx `cat /etc/X11/wm.default` 2.9 fi 2.10 else 2.11 - tazx 2.12 + tazx `cat /etc/X11/wm.default` 2.13 fi 2.14 fi