diff --git a/start-captive-wmaker.sh b/start-captive-wmaker.sh index 32a5f402..2afb4c33 100755 --- a/start-captive-wmaker.sh +++ b/start-captive-wmaker.sh @@ -77,10 +77,18 @@ if [ -n "$1" -a -x "$WindowMaker$1" ] ; then shift fi -Xephyr -screen 1080x760 :1 & +for i in $(seq 5 10) ; do + if [ "x$DISPLAY" != "x:$i" ] ; then + xephyr_display=":$i" + break + fi +done +echo "Running Xephyr on display $xephyr_display" + +Xephyr -screen 640x480 "$xephyr_display" & xephyr_pid=$! -DISPLAY=:1 gdb \ +DISPLAY="$xephyr_display" gdb \ --directory "$project_base" \ --quiet \ - --args "$WindowMaker" -display :1 --for-real "$@" + --args "$WindowMaker" -display "$xephyr_display" --for-real "$@" kill $xephyr_pid