X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=usr_bin%2Fwm-ng;fp=usr_bin%2Fwm-ng;h=16608486e69158066881cdea952e823bd451ea35;hb=e2295813ea9693d34f541a790eff8ec387bbb107;hp=0e62170b1710ccf7b36857f7b2e12f0e7612ea4b;hpb=3a552f4fc901acfa377f91bb414296b8b8cab05d;p=grml-scripts.git diff --git a/usr_bin/wm-ng b/usr_bin/wm-ng index 0e62170..1660848 100755 --- a/usr_bin/wm-ng +++ b/usr_bin/wm-ng @@ -6,11 +6,19 @@ # License: This file is licensed under the GPL v2. ################################################################################ -gkrellm -g -1+26 & - -(sleep 2; idesk &) & - -fluxbox +# start Grml's fluxbox setup only if fluxbo is present +if [ -x "$(which fluxbox 2>/dev/null)" ] ; then + gkrellm -g -1+26 & + (sleep 2; idesk &) & + fluxbox +elif [ "$(basename $(readlink -f $(which x-window-manager 2>/dev/null)))" != "fluxbox" ] && \ + [ "$(basename $(readlink -f $(which x-window-manager 2>/dev/null)))" != "$(basename $0)" ] ; then + # fall back unless it's set to fluxbox or points back to wm-ng + x-window-manager +else + echo "Error: fluxbox not present + x-window-manager is not an alternative neither." >&2 + exit 1 +fi exit $?