Letting Ubuntu bash on Windows 10 run
ssh -X to get a GUI environment on a remote server
Install all the following. On Window, install
Xming. On Ubuntu bash, use
sudo apt install to install
ssh xauth xorg.
sudo apt install ssh xauth xorg
Go to the folder contains
ssh_config file, mine is
ssh_config as administrator(USE
ssh_config, remove the hash
# in the lines
ForwardX11Trusted, and set the corresponding arguments to
ssh_config file, remove the front hash
Port 22 and
Protocol 2, and also append a new line at the end of the file to state the xauth file location,
XauthLocation /usr/bin/xauth, remember write your own path of xauth file.
# IdentifyFile ...
# Cipher 3des
Now since we are done editing
ssh_config file, save it when we leave the editor. Now go to folder
export DISPLAY=localhost:0 to your
.bashrc file and save it.
We are almost done. Restart your bash shell, open your
Xming program and use
ssh -X yourusername@yourhost. Then enjoy the GUI environment.
ssh -X yourusername@yourhost
The problem is also in Ubuntu subsystem on Windows, and the link is at
Note: the linked text includes 2 typos (
XauthLocaion instead of