Skip to content

Commit 44a071d

Browse files
authored
Merge pull request #48 from giuseppe-coco/wsl-support
fix #38: added support for WSL for turtlesim demo
2 parents 5471dc2 + 04a2f60 commit 44a071d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

demo.sh

+6-1
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)