PDA

View Full Version : [SOLVED] Can't get X11 forwarding to work



r.darwish
October 31st, 2011, 07:48 PM
On my PC I have Ubuntu 11.10 64-bit installed. On my laptop I have Ubuntu 11.10 32-bit installed. I want to be able to forward X applications from my laptop to my PC using SSH.
I followed all tutorials but I can't get it to work.

sshd_config on the laptop contains the line:

X11Forwarding yes

It doesn't seem to work, however:


roey@roey-desktop:~$ ssh -X roey-1000h.local
Welcome to Ubuntu 11.10 (GNU/Linux 3.0.0-12-generic i686)

* Documentation: https://help.ubuntu.com/

Last login: Mon Oct 31 20:30:25 2011 from 192.168.1.100
roey@roey-1000H:~$ firefox
Error: no display specified
roey@roey-1000H:~$ DISPLAY=:0.10 firefox

Error: cannot open display: :0.10

r.darwish
November 2nd, 2011, 06:41 AM
Anyone?

r.darwish
November 3rd, 2011, 12:03 PM
Did Ubuntu 11.10 break the X11 forwarding feature completly?

pavi_elex
November 3rd, 2011, 12:07 PM
Enable X11 forwarding (access other host through your terminal)
ssh username@hostname -X
or ssh username@hostname -Y

If you still get the “cannot open display” error, set the DISPLAY variable as shown below.
$ export DISPLAY='IP:0.0' (without quotation)
IP is the local workstation’s IP where you want the GUI application to be displayed.

r.darwish
November 3rd, 2011, 06:40 PM
Thank you for replying. I tried -X and -Y and none worked. Setting the DISPLAY environment variable manually didn't work either.
I looked at auth.log and found a line that might indicate the problem:

Nov 3 19:37:24 roey-desktop sshd[23022]: error: Failed to allocate internet-domain X11 display socket.
Can anyone tell what does it mean?

r.darwish
November 3rd, 2011, 08:12 PM
I managed to solve this after a bit Googling. The cause was the fact that I disabled ipv6 on the server. As described Here, (https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/136947) I had to add sshd_config

AddressFamily inet

davidwhthomas
April 17th, 2013, 12:43 PM
Thanks, I got X forwarding working over SSH well by

Editing my ssh config file at:

vim ~/.ssh/config

Adding the AddressFamily inet directive for, in this case, all hosts

Host *
ForwardAgent yes
AddressFamily inet

Displayed 32-bit remote app UI over X nicely.

oldos2er
April 17th, 2013, 04:38 PM
Old thread closed.