risingsunxy
Posts: 4
Joined: Sat Jul 28, 2012 11:08 am

any one get ssh x11 forwarding working

Sat Jul 28, 2012 11:14 am

hi guys,
has anyone successfully got the ssh x11 forwarding working?
in /etc/ssh/sshd_config
X11Forwarding yes
X11DisplayOffset 10

the DISPLAY is also set to my desktop

ssh -X is also used to login.
but still got the can not open display error, e.g., gvim
E233: cannot open displayE852: The child process failed to start the GUI
Press ENTER or type command to continue

midori
Midori - Cannot open display:

any ideas to get this to work?

thanks a lot!

gazmandev
Posts: 12
Joined: Wed Jul 11, 2012 10:12 am

Re: any one get ssh x11 forwarding working

Sun Jul 29, 2012 5:50 am

I have this working on a OSX laptop. I haven't actually done anything other than what you've done. I do find however that if I'm logged in and idle for a while, I need to log out and back in for it to get back into action - Midori will report that error message your getting. Also, some windows will not open regardless (I know gparted refuses to open at all over SSH).

If you're using Windows, you will need to use something that has a X Server/Client. Putty won't cut it. I haven't been successful in getting X working over SSH in Windows using the Pi or any other version of Linux.

Heater
Posts: 14801
Joined: Tue Jul 17, 2012 3:02 pm

Re: any one get ssh x11 forwarding working

Sun Jul 29, 2012 7:46 am

On my stock raspian I have not changed any configs for ssh or X. I get X forwarded to my Debian PC with just the ssh -X.... command.
Memory in C++ is a leaky abstraction .

User avatar
PIstolero
Posts: 101
Joined: Mon Jul 23, 2012 6:28 am
Location: paradise city, where the grass is green and the girls are pretty

Re: any one get ssh x11 forwarding working

Sun Jul 29, 2012 9:08 am

X11 forwarding is already enabled on the raspian image. To get it working on Windows I just installed Xming as Xserver and used putty to launch an X app

risingsunxy
Posts: 4
Joined: Sat Jul 28, 2012 11:08 am

Re: any one get ssh x11 forwarding working

Sun Jul 29, 2012 10:15 am

my desktop is a Ubuntu 12.04 PC.
I also tried to xhost+, but still not working....

marosg
Posts: 25
Joined: Sat Jul 07, 2012 2:41 pm

Re: any one get ssh x11 forwarding working

Sun Jul 29, 2012 10:24 am

Worked for me without any configuration.

Maybe it would help if you ssh -X to raspbian and post
1. echo $DISPLAY
2. actual copy/paste error from running midori or lnxterm

risingsunxy
Posts: 4
Joined: Sat Jul 28, 2012 11:08 am

Re: any one get ssh x11 forwarding working

Sun Jul 29, 2012 10:46 am

after login, echo $DISPLAY
got nothing
then I export DISPLAY=192.168.1.66:10 (my desktop ip)
$gvim

E233: cannot open displayE852: The child process failed to start the GUI
Press ENTER or type command to continue


$midori


Midori - Cannot open display:

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: any one get ssh x11 forwarding working

Sun Jul 29, 2012 11:03 am

With the caveat that it should, of course, "just work", I have to ask:

Is there any reason to go the "X forwarding" route, as opposed to going the VNC route?
The VNC route seems a lot cleaner and normal-er to me.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

risingsunxy
Posts: 4
Joined: Sat Jul 28, 2012 11:08 am

Re: any one get ssh x11 forwarding working

Sun Jul 29, 2012 11:08 am

Now I got it working on my windows after a little bit hacking of the xming (put -ac options in xming shortcut).

but still not working on the ubuntu side.

I think this at least mean the config on pi is ok, should be my ubuntu side 's issue.

User avatar
PIstolero
Posts: 101
Joined: Mon Jul 23, 2012 6:28 am
Location: paradise city, where the grass is green and the girls are pretty

Re: any one get ssh x11 forwarding working

Sun Jul 29, 2012 11:08 am

With X forwarding I can have a single application on my remote box, with VNC I have the complete GUI on my remote box. I would not say that one is better as the other, it is just different.

marosg
Posts: 25
Joined: Sat Jul 07, 2012 2:41 pm

Re: any one get ssh x11 forwarding working

Sun Jul 29, 2012 12:00 pm

On Ubuntu you have to allow remote connection coming. Issue "xhost +" (of course more secure is to specify just single IP)

marosg
Posts: 25
Joined: Sat Jul 07, 2012 2:41 pm

Re: any one get ssh x11 forwarding working

Sun Jul 29, 2012 12:03 pm

Joe Schmoe wrote:With the caveat that it should, of course, "just work", I have to ask:

Is there any reason to go the "X forwarding" route, as opposed to going the VNC route?
The VNC route seems a lot cleaner and normal-er to me.
VNC starts the whole X server, so it consumes more CPU cycles. X forwarding is always there, while you have to install VNC.

But of course for many circumstances VNC is better, it depends on your needs.

JosephRedfern
Posts: 1
Joined: Mon Oct 15, 2012 6:45 pm

Re: any one get ssh x11 forwarding working

Mon Oct 15, 2012 6:47 pm

I had this issue, too. I had previously removed everything to do with X11/xserver/xorg - I thought by re-installing X I'd be good to go in terms of X11 forwarding, but it turns out not.

I ran:

Code: Select all

sudo apt-get install xauth
and now all is well.

TillM
Posts: 36
Joined: Wed Oct 17, 2012 7:54 am

Re: any one get ssh x11 forwarding working

Wed Oct 17, 2012 9:27 am

Works perfectly for me from my debian box to rasbian.
I just ssh -l USERNAME -X RAS_IP /YOUR/PROGRAM/YOU/WANT/TO/RUN

wanderer
Posts: 3
Joined: Fri Sep 14, 2012 3:24 am

Re: any one get ssh x11 forwarding working

Thu Oct 18, 2012 4:13 am

Working from mint 13 to raspbian using putty. Under Connections--> X11 set "X display location" to localhost:0 . Test with xclock & to see if working.

tobiz
Posts: 11
Joined: Tue Mar 20, 2012 2:18 pm

Re: any one get ssh x11 forwarding working

Mon Mar 18, 2013 9:15 am

Working from mint 13 to raspbian using putty. Under Connections--> X11 set "X display location" to localhost:0 . Test with xclock & to see if working.
It would be most useful to say on which machine of mint 13 and the raspi you do this; it's not very clear from your post (don't assume it's obvious).

HJ_SK
Posts: 1
Joined: Wed Oct 30, 2019 4:03 pm

Re: any one get ssh x11 forwarding working

Wed Oct 30, 2019 4:08 pm

risingsunxy wrote:
Sun Jul 29, 2012 11:08 am
Now I got it working on my windows after a little bit hacking of the xming (put -ac options in xming shortcut).

but still not working on the ubuntu side.

I think this at least mean the config on pi is ok, should be my ubuntu side 's issue.
Thanks! This is a nice solution for me! :lol:

Return to “Raspbian”