athackst / vscode_ros2_workspace

A template for using VSCode as an IDE for ROS2 development.
https://althack.dev/vscode_ros2_workspace
Apache License 2.0
857 stars 177 forks source link

wsl2 can't use #40

Closed zhangzhiwei-zzw closed 1 year ago

zhangzhiwei-zzw commented 1 year ago

how to use this demo in wsl2? I have installed docker in wsl2, but can't display.

athackst commented 1 year ago

To make this work in windows/wsl I needed to hard-code the DISPLAY variable to ":0" This value probably depends on your setup.

Open VSCode and then open it in the container When you echo $DISPLAY in the devcontainer, what do you see?