Re: spawning remote xwindows behind a router

From: Dances With Crows (
Date: 02/16/05

Date: 16 Feb 2005 19:42:53 GMT

On 16 Feb 2005 11:12:32 -0800, les ander staggered into the Black Sun
and said:
> i am using fedora3 with gnome 2.8. i have a cable modem at home and
> since i have multiple computers at home i have a router. I can ssh to
> a computer at work but then i have problems spawning any x
> applications.

The remote machine's sshd must be configured to allow X11 forwarding,
and you must do "ssh -Y remotemachine" (or -X; try both.) Check the
remote machine's /etc/ssh/sshd_config file and make sure the lines

X11Forwarding yes
X11DisplayOffset 10
# that can be any number, but 10 is most common
X11UseLocalhost yes

...are in it. Once that's done, restart sshd, and you should be able to
do this:

paganini:~$ ssh -Y my.home.machine
Last login: Wed Feb 16 11:43:14 2005 from remote.somewhere
samantha:~$ echo $DISPLAY
localhost:10.0 ssh has taken care of the DISPLAY setting automagically! I can
run an X client on samantha and have it display on paganini with "xterm
&" or something like that, no problem.

> I am not sure what to set the DISPLAY to.

Set sshd up correctly, use ssh -Y, and you don't have to bother with
setting DISPLAY.

> I tried to set DISPLAY=cable.modem.ip.address:0.0

Nope; your cablemodem isn't running an X server.

> and to the ip address that the router assigns to me

Nope, that's almost certainly a non-routable address in or , not a real address.

> but as expected, either of them don't work. (I also did xhost+)

Don't use "xhost +". Let ssh and sshd handle this; that's one of the
things they were designed to do. If you can't change sshd_config on the
remote machines, ask the network admin to change it for you and explain
what you need it for. If that doesn't work, things may get tricky. HTH,

Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin /    mail: TRAP + SPAN don't belong     /                Hire me! 

Relevant Pages

  • Re: X applications fail to run on ssh -X
    ... Error: Can't open display: ... sure DISPLAY is not unset/overwritten. ... Also check your client SSH config. ... Stop the current sshd. ...
  • Re: X applications fail to run on ssh -X
    ... Error: Can't open display: ... sure DISPLAY is not unset/overwritten. ... It will be recreated as soon as you log in using SSH if your setup is proper. ... Stop the current sshd. ...
  • Re: which port(s) does the X server listen on?
    ... > but remote X clients are unable to display to it. ... things just quietly fail to display. ... Most of the time one would ssh to the box they want to run the ... If everything is setup ...
  • Re: Attempting to run remote X app
    ... > I'm attempting to ssh into a central server and run an X app, ... Make sure the ssh server is forwarding X connections: ... DISPLAY environment variable is set), the connection to the X11 display ...
  • X11 Forwarding with OpenSSH
    ... We are able to do the X11 forwarding and it works as the user ... go into the environment as their ssh IDs. ... functional accounts with no direct access into the account). ... another way to set your Display or gettaround this limitation? ...