summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xModules/CPack.RuntimeScript.in7
1 files changed, 6 insertions, 1 deletions
diff --git a/Modules/CPack.RuntimeScript.in b/Modules/CPack.RuntimeScript.in
index 9195d52..1ce43bc 100755
--- a/Modules/CPack.RuntimeScript.in
+++ b/Modules/CPack.RuntimeScript.in
@@ -22,12 +22,17 @@ else
echo \$DISPLAY > "$TMP/display"
fi
__END_OF_GETDISPLAY_SCRIPT__
+chmod +x "$TMP/getdisplay.sh"
rm -f $TMP/display
open-x11 $TMP/getdisplay.sh || \
open -a XDarwin $TMP/getdisplay.sh || \
echo ":0" > $TMP/display
-while [ "$?" == "0" -a ! -f $TMP/display ]; do sleep 1; done
+while [ "$?" == "0" -a ! -f $TMP/display ];
+do
+ #echo "Waiting for display $TMP/display"
+ sleep 1;
+done
export "DISPLAY=`cat $TMP/display`"
ps -wx -ocommand | grep -e '[X]11' > /dev/null || exit 11