Closed thjwong closed 3 years ago
If x forwarding is not working, it's most likely a firewall or addressing issue. What you're doing there is connecting to X through your wireless interface's IP (which is likely a private network as opposed to WSL which for some random reason is registered as a "public" network and therefore has different firewall rules).
It's a common shortcut that a lot of people end up taking, but ultimately it shouldn't be required. You could also do the same thing in .bashrc if you like without having to modify the .bat
files which could be a little easier to manage going forward if you really wanted to go down this road.
Setting an appropriate .bashrc
and ensuring the firewall rule updates as documented here should be enough to get up and running.
All applications except the terminal applications were not able to access the X server (VcXsrv):
I have to add the following code to the .bat files before calling the wsl.exe in order to make them work: