Skip to content

How to enable WSLg from within a devcontainer? #173

Answered by anttikes
anttikes asked this question in Q&A
Discussion options

You must be logged in to vote

After looking into this issue a bit longer it seems that this is actually a bug in the docker-desktop distribution.

If I install e.g. "Debian" distribution onto WSL2, set it as my default distribution, and then repeat this exercise then I do not have to do anything, and the Qt application "just works", like magic.

The key setting in VS Code is "Dev > Containers: Forward WSLServices". This setting already mounts the folders and sets the environment variables. But when you only have docker-desktop distribution then it does not work correctly because for some reason this distribution uses /mnt/host/wslg/ folder to hold the files instead of /mnt/wslg like stated in the WSLg documentation.

I w…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by anttikes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant