Ubuntu – How to X11 forwarding through ssh in 15.10

15.10x11-forwarding

Since I am on Ubuntu, I'll try to have X11 forwarding through ssh on a remote desktop. But unfortunately it does not work.
Before I do this :

ssh -X username@hostname

and then for example :

gedit

But now under Ubuntu 15.10 It does not work and I have this message :

$ gedit Failed to connect to **Mir**: Failed to connect to server socket: No files or folders of this type Unable to init server: Unable to connect: Connection refused

(gedit:2492): Gtk-WARNING **: cannot open display:

So my question is how to have X11 forwarding through ssh ?

Best Answer

You need to enable X-Forwarding in the SSH server configuration, in /etc/ssh/sshd_config

It should look like:

X11Forwarding Yes

Uncomment any comments before this line.

After restarting the SSH Server everything should works fine.

Related Question