-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add instructions for WSL2 #3
Comments
I forgot where I found this solution for the IP address under WSL2, but it works for me.
That said, one also need to run the X server so it accepts non-local connections, and change Windows Defender firewall to. I did a gross 'hack' and just turned it off the Public firewall. |
Thanks for the input. Don't have the need and time to try WSL2 atm. Here is a link to setup the firewall it seems to make it secure: |
Another link that helps with WSL2 setup: To properly connect the access control in VcXsrv is diabled (option -ac) so you don't have to touch the firewall settings. As mentionned this is not super safe:
Looks like WSL makes a user for you now the first time it is started and probably sets it as default user:
|
I am trying to use emacs in WSL2. A few comments about this page:
|
@Adriankhl Thanks for your inputs. Will be adding instructions for cygwin/x and remove the desktop installation part (made two new issues). Will be adding WSL2 instructions once it is available to non-insiders. Hopefully the memory leakage will be fix by then. If not I will be adding it. |
I had some trouble setting up X server for WSL2. Now that I solved it, thought I might contribute to this thread. |
The stuff I had to do to get it working on WSL2 was
That last bit was the last hurdle for me, and I can't believe a Windows trouble shooter worked for once. |
Will adapt README.org once WSL2 it for non-insiders as well
(Update 25.09.2020: got access WSL2 on one computer, will have a go and try to get this working)
TODOs from everything in here so far:
Add https://docs.microsoft.com/en-us/windows/wsl/install-win10 and adapt instructions.
Have to go through the installation (or check a video or the ms documentation) with WSL and WSL2 to see if it does setup a user for you and sets it as default user. Adapt the documentation accordingly. Looks like it does - https://www.youtube.com/watch?v=RTATnSA47Ak
Add the best way to connect to the DISPLAY for WSL2. There are multiple solutions in [WSL 2] WSL 2 cannot access windows service via localhost:port microsoft/WSL#4619:
The last comment Unable to accessing Windows applications from WSL microsoft/WSL#4793 (comment) looks promising and is fully documented at https://github.com/famelis/wsl2-x11. Hmm, got changed, has access control now disabled as well.
Another secure solution from Unable to accessing Windows applications from WSL microsoft/WSL#4793 (comment) and then https://github.com/cascadium/wsl-windows-toolbar-launcher#troubleshooting
Or the not so safe way (not quite sure about the consequences) by just disabling the access control in VcXsrv Unable to accessing Windows applications from WSL microsoft/WSL#4793 (comment) and then to set the display automatically use
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0
. In the comment it is done manually.This SOF answer tells you how to add a firewall rule. https://stackoverflow.com/a/61110604/1365754 The IP address is not working for me, probably have to use the one from resolv.conf.
This SOF answer use another approach for the IP (in comments) as resolv.conf can have muliple IPs it seems.
export DISPLAY=$(ip route | awk '/default via / {print $3; exit}' 2>/dev/null):0
Already existing Windows Firewall Rules need to be checked. There might be one automatically created blocking VcXsrv.
Add a troubleshooting section
Add a troubleshooting section
Update FAQ
Helpful links to set up up WSL2:
The text was updated successfully, but these errors were encountered: