diff options
Diffstat (limited to 'firstboot-windowmanager')
| -rwxr-xr-x | firstboot-windowmanager | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/firstboot-windowmanager b/firstboot-windowmanager index b4fb12c..ab79a4e 100755 --- a/firstboot-windowmanager +++ b/firstboot-windowmanager @@ -3,12 +3,29 @@ # This is the list of supported window manager binaries WMS=("metacity" "kwin" "xfwm4" "openbox" "marco") +# Get the application binary to start and remove it from +# the argument list +BINARY=$1 +shift + for WM in ${WMS[@]}; do FILE=$(which $WM 2>/dev/null) FOUND=$? if [ $FOUND -eq 0 -a -x "$FILE" ]; then - exec "$FILE" "$@" + # start window manager + "$FILE" "$@" & + pid=$! + + # start the application + $BINARY + res=$? + + # stop window manager + kill $pid + + # return result + exit $res fi done |
