X11 over SSH not working?

Sunnz

Who wants a stylus?
I did this in X11:
ssh -X name@linux

Then I tried to run mozilla-bin but it said:
Code:
xdpyinfo:  unable to open display "".
Unable to connect to X server

Gtk-WARNING **: cannot open display: 
mozilla-bin exited with non-zero status (1)
How do I make it work???

X on Linux is 6.8.2.
 
Dumb question time. Do you have X11 running on your Mac? If you do, have you correctly set up the DISPLAY variable?
 
Try:
Code:
ssh [b]-Y[/b] name@linux
I had to do the "-Y" to force X11 forwarding under X11 on my Mac OS X box... -X never worked for me.
 
Generally speaking, if you do an ssh -X, you do not need to set the DISPLAY variable. If it is not a security concern, you might want to try setting it, anyways.

I haven't tried doing this myself, but I just might when I get home.
 
Serves me right for not getting enough sleep :eek:. Ah well, off to bed with me and I'll see if I can shed any light on it in the morning.
 
Ok it turns out that X11 forwarding was being turn off in sshd_config! :(

*slaps myself in the head*

It now works when I do ssh -X me@linux.

What's the difference anyway? Is X better than Y? :)

Also, what is the display variable about??? Would I be able to forward X11 to say a Window in Xnest?
 
The DISPLAY variable is so that you can use X11 from inside the Terminal.app or any other process that is launched outside of the xterm.

Never knew there was a difference between -X and -Y. What I usually do is also put -C in the command, to enable compression :)
 
I see...

BTW, does anyone know how might one run a small Windows Manager from Linux over ssh? Something similar to:
win32-X-4.jpeg
 
-Y is more secure than -X in general. As a result the OpenSSH guys have been really pushing it.
 
My understanding is that -Y is actually less secure, because it bypasses the X11-related security settings. -Y says, "Trust the remote server to have full access to my display."

Read the end of this thread for more information.
 
You are correct. In the original discussion of the shift to -Y I made the mistake that -Y was providing greater security, but rather they increased the security on -X (which often breaks things).

Mea culpa
 
Hey Sunnz -- some time ago I posted instructions on how to do something like this. Only caveat is it's full-screen. Check out this thread. Hope that helps
 
Well, after fiddling around, I have found a much more elegant solution and I really like, running Xnest on the server side.

I simply log on to the remote machine by ssh -X me@remote, then with in that session, I run:

Xnest :1 & wmaker -display :1
 
Back
Top