Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AHinMaine/71fa55a992bed5f0412299732a3487b8 to your computer and use it in GitHub Desktop.
Save AHinMaine/71fa55a992bed5f0412299732a3487b8 to your computer and use it in GitHub Desktop.
Code2Pro: How to Forward X11 to Windows 10 via PuTTY & vcxsrv

Code2Pro: How to Forward X11 to Windows 10 via PuTTY & vcxsrv

Scope

Tested on Windows 10 & Ubuntu 16.

Steps

  1. Check that sshd on Ubuntu is properly configured
sudo vim /etc/ssh/sshd_config

The most important line is X11Forwarding yes (it's added by default, but if not, you can add it).

X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no
# http://develorium.com/2015/05/remote-eclipse-over-x11/
X11UseLocalhost no

Then reload sshd:

sudo service sshd reload
  1. Install vim-gtk3 or other packages that have UI on Ubuntu
sudo apt-get install vim-gtk3

You can also try gnome-terminal.

For more, check: http://packages.ubuntu.com/xenial/x11/

  1. Install VcXsrv Windows X Server
  1. Configure PuTTY
  • Navigate to SSH => X11 => Tick Enable X11 forwarding
  • Pass the value of $DISPLAY (which is 127.0.0.1:0.0) to the field X display location
  1. Launch from Ubuntu
  • Use PuTTy to log in as normal
  • Run gvim for example on the Ubuntu via PuTTY
  • Use the GVim window

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment