I use Windows VS code and this extensions "Remote SSH", "Remote X11", "Remote X11 (SSH)" to connect and to get graphics from remote server.
I run VcXsrv, Pageant. X11 forwarding works if I connect with Pageant directly. It even works in VS code terminal if I set "export DISPLAY=localhost:10.0" in remote server. So all works besides Remote X11, it cant set DISPLAY variable, with this log: Failed to get DISPLAY: Error: Invalid cygwin unix socket path
I found the solution to this here https://github.com/microsoft/vscode-remote-release/issues/4600. I am summarizing the steps here, since the steps are not very clear there. Before you start make sure you have one of the recent versions of VScode (I am using 1.55.2).
Steps to connect from Windows to Linux:
ForwardAgent yes
ForwardX11 yes
ForwardX11Trusted yes
You can actually check the logs of remote host, if x11 forwarding is successful and port is set. If not set properly, it will complain that the display is not set. An easier check is to see if the DISPLAY variable is automatically set in the Linux server.Hopefully everything works after these steps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With