summaryrefslogtreecommitdiffstats
path: root/firstboot-windowmanager
diff options
context:
space:
mode:
authorMartin Sivak <msivak@redhat.com>2013-03-08 14:19:46 +0100
committerMartin Sivak <msivak@redhat.com>2013-03-08 16:26:36 +0100
commite2927e730fe7053b819ff09672de3d6043870862 (patch)
treefbce30908b448b35ee96ba3451e416e6a266163f /firstboot-windowmanager
parent2fec10595bae9ca4ebf44ad2e80bd3521fa2244b (diff)
downloadfirstboot2-e2927e730fe7053b819ff09672de3d6043870862.tar.gz
firstboot2-e2927e730fe7053b819ff09672de3d6043870862.tar.xz
firstboot2-e2927e730fe7053b819ff09672de3d6043870862.zip
Fix graphical and text systemd target
- the xserver unit approach worked (after some patch fixes), but still had one serious issue. The graphical unit (initial-setup) started before Xserver was fully initialized... - this update starts the initial-setup process inside the xinit session and thus ensures that the Xserver is initialized by the time initial-setup tests the DISPLAY variable - text target was configured to conflict with graphical and to have it's stdout and stdin routed to terminal
Diffstat (limited to 'firstboot-windowmanager')
-rwxr-xr-xfirstboot-windowmanager19
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