# X11 over SSH not working?



## Sunnz (Sep 7, 2006)

I did this in X11:
ssh -X name@linux

Then I tried to run mozilla-bin but it said:

```
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.


----------



## Viro (Sep 7, 2006)

Dumb question time. Do you have X11 running on your Mac? If you do, have you correctly set up the DISPLAY variable?


----------



## Sunnz (Sep 7, 2006)

I said:





> I did this in *X11*:


In the very first sentence of the very first post...


----------



## ElDiabloConCaca (Sep 7, 2006)

Try:

```
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.


----------



## bluedevils (Sep 7, 2006)

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.


----------



## bluedevils (Sep 7, 2006)

always a minute too late


----------



## Viro (Sep 7, 2006)

Serves me right for not getting enough sleep . Ah well, off to bed with me and I'll see if I can shed any light on it in the morning.


----------



## Sunnz (Sep 8, 2006)

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?


----------



## Viro (Sep 8, 2006)

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


----------



## Sunnz (Sep 8, 2006)

I see...

BTW, does anyone know how might one run a small Windows Manager from Linux over ssh? Something similar to:


----------



## lurk (Sep 8, 2006)

-Y is more secure than -X in general.  As a result the OpenSSH guys have been really pushing it.


----------



## billbaloney (Sep 8, 2006)

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.


----------



## lurk (Sep 9, 2006)

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


----------



## Sunnz (Sep 9, 2006)

So... anyone know how to run Window Managers like wmaker?


----------



## macbri (Sep 9, 2006)

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


----------



## Sunnz (Sep 15, 2006)

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


----------

