Skip to content

Commit

Permalink
Merge pull request #48 from giuseppe-coco/wsl-support
Browse files Browse the repository at this point in the history
fix #38: added support for WSL for turtlesim demo
  • Loading branch information
RobRoyce authored Dec 15, 2024
2 parents 5471dc2 + 04a2f60 commit 44a071d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ DEVELOPMENT=${DEVELOPMENT:-false}
case "$(uname)" in
Linux*|Darwin*)
echo "Enabling X11 forwarding..."
export DISPLAY=host.docker.internal:0
# If running under WSL, use :0 for DISPLAY
if grep -q "WSL" /proc/version; then
export DISPLAY=:0
else
export DISPLAY=host.docker.internal:0
fi
xhost +
;;
MINGW*|CYGWIN*|MSYS*)
Expand Down

0 comments on commit 44a071d

Please sign in to comment.