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!