Can't Run GTK on WSL, Display Error
WSL doesn't come with an X server by default, because Windows doesn't use an X server. Which would also be why xhost
failed to do anything remotely useful.
In order to do something like this, you need to download an X server for Windows, and then configure that. For example, you can use the Xming project to run a display server. When launching Xming, you can use the -multiwindow
option to make it so you don't have a virtual desktop. However, this may not be the case with other X servers present on Windows.
You can find a quick tutorial here for Xming specifically (really, it's just install + configure + export DISPLAY=:0
) or here also for Xming. Alternatively you can use MobaXTerm (tutorial), which will achieve the same basic result.
In short, find an X server you like, and install it on Windows. After that, your WSL instance should be able to pick up on the fact that an X server is available, and you should be able to run GUI-based programs without much hassle.