Tested on Windows 10 & Ubuntu 16.
- 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
- 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/
- Install
VcXsrv
Windows X Server
- Download and install: https://sourceforge.net/projects/vcxsrv/
- Check that VcXsrv runs and right-click, get logs to find
DISPLAY=127.0.0.1:0.0
- Note down the value of
$DISPLAY
and pass it ot PuTTY
- Configure PuTTY
- Navigate to SSH => X11 => Tick
Enable X11 forwarding
- Pass the value of
$DISPLAY
(which is127.0.0.1:0.0
) to the fieldX display location
- Launch from Ubuntu
- Use PuTTy to log in as normal
- Run
gvim
for example on the Ubuntu via PuTTY - Use the GVim window
- http://develorium.com/2015/05/remote-eclipse-over-x11/
- https://infectedproject.wordpress.com/2007/07/09/forwarding-gnome-via-ssh/
- https://superuser.com/questions/99303/what-are-my-x-client-options-for-ms-windows
- http://dasunhegoda.com/gui-ubuntu-server-x11-forwarding/679/
- http://dasunhegoda.com/remote-login-gui-vnc-linux/602/
- http://www.pcworld.com/article/3055403/windows/windows-10s-bash-shell-can-run-graphical-linux-applications-with-this-trick.html
- http://packages.ubuntu.com/xenial/x11/
- http://serverfault.com/questions/827259/how-to-run-gnome-terminal-on-remote-centos-7-machine
- https://sourceforge.net/projects/vcxsrv/
- https://sourceforge.net/projects/xming/
- https://www.howtogeek.com/261575/how-to-run-graphical-linux-desktop-applications-from-windows-10s-bash-shell/
- https://www.quora.com/What-are-the-options-for-X11-on-Windows-10
I found it necessary to install xauth on the Linux box (xorg-x11-xauth package on CentOS) to allow the sshd server to accept the X server's DISPLAY variable. Otherwise, $DISPLAY was blank. ("echo $DISPLAY" on the Linux host to test.) Note that the first connection will complain that ~/.Xauthority does not exist. xauth will create that file on the first run.