Skip to content

Commit

Permalink
fix #38: added support for WSL for turtlesim demo
Browse files Browse the repository at this point in the history
  • Loading branch information
Giuseppe Coco committed Dec 15, 2024
1 parent 5471dc2 commit 04a2f60
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 04a2f60

Please sign in to comment.