Tweak start-captive-wmaker.sh to behave a little more nicely. #5

Merged
trurl merged 1 commits from trurl/wmaker:refactor/wutil-rs into refactor/wutil-rs 2025-10-28 21:36:53 -04:00

View File

@@ -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