Skip to content

Commit 04a2f60

Browse files
committed
fix #38: added support for WSL for turtlesim demo
1 parent 5471dc2 commit 04a2f60

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

demo.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,12 @@ DEVELOPMENT=${DEVELOPMENT:-false}
2929
case "$(uname)" in
3030
Linux*|Darwin*)
3131
echo "Enabling X11 forwarding..."
32-
export DISPLAY=host.docker.internal:0
32+
# If running under WSL, use :0 for DISPLAY
33+
if grep -q "WSL" /proc/version; then
34+
export DISPLAY=:0
35+
else
36+
export DISPLAY=host.docker.internal:0
37+
fi
3338
xhost +
3439
;;
3540
MINGW*|CYGWIN*|MSYS*)

0 commit comments

Comments
 (0)