[vox-tech] X11 on remote machine

Mark K. Kim vox-tech@lists.lugod.org
Wed, 18 Sep 2002 23:46:25 -0700 (PDT)


You can forward X two different ways: One technique using a normal
connection (using xhost and setting the proper DISPLAY), or the second
technique using secure shell's X tunneling.  If you can't forward X using
`xhost`, then the problem isn't with ssh's settings, but somewhere else
(which is your case.)

But it sounds like you got ssh running properly already.  In that case,
don't set the DISPLAY parameter but use the default (should be something
like "remote_machine_IP:10", not "local_machine_IP:0").

This is how it works (I think... nobody ever tells me these things so I
gotta figure 'em out myself, unfortunately...):

   1. When you ssh from local_machine to remote_machine,
      the ssh daemon on remote_machine sets up a local "fake" display,
      generally "remote_machine:10".  It'll create a fake display, and
      set the default DISPLAY to that fake display.

   2. When you try to run an X app, it'll try to connect to the "fake"
      display setup by ssh, "remote_machine:10".

   3. Now, ssh is listening for connections on that fake display.
      When it receives data, it'll send it across to your local_machine
      over your ssh connection (remember you're still ssh'ed between
      the two machines from step #1).  And it'll display on whatever
      DISPLAY that was set when you first typed `ssh` in step #1,
      generally "local_machine:0".

   4. Now your local_machine's ssh sends data to local_machine:0,
      displaying data.

That's how data travels from remote_machine to local_machine.  The data
also flows the other way in the reverse direction.

I hope that helps!

-Mark (rearranged his room and happy with more space :)


On Wed, 18 Sep 2002, Robin Snyder wrote:

> I recently upgraded to Debian's woody distribution and can no longer
> forward X11 info. when I'm logged into a remote machine via ssh.
> Here's the situation:
>
> logged on remotely to my account on another machine.  I want to send it's
> X output to my screen.  On my machine, I used xhost +theothermachine to
> give it permission, then, once logged in, used setenv DISPLAY
> my_IP:0 to switch the display to my screen.  No go.  It's not a
> case of doubly assigned or incorrect IP numbers--I can ssh back into my
> machine using that IP.  When I try to start emacs, I get
>
> _X11TransSocketINETConnect: Can't connect: errno = 111
>
> and when I try to run mathtematica, I get
>
> connect 169.237.66.157 port 6000: Connection refused
> connect 169.237.66.157 port 6000: Connection refused
> X connection to localhost:14.0 broken (explicit kill or server shutdown).
>
> I realized that ssh has changed some between distributions (ssh now =
> OpenSSH) and that now ForwardX11 is set to no in ssh_d.config.  I tried
> switching that to yes.  I also tried ssh with the -X option, which should
> allow X11 forwarding.  None of these worked.  Ideas?
>
> 			- robin.
>
>
>
>
>
> _______________________________________________
> vox-tech mailing list
> vox-tech@lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech
>

--
Mark K. Kim
http://www.cbreak.org/
PGP key available upon request.