[K12OSN] More OO.o export goodness (man this is a difficult subject!)

Les Mikesell les at futuresource.com
Fri Apr 16 20:01:44 UTC 2004


On Fri, 2004-04-16 at 14:17, Shawn Powers wrote:

> So, please correct me if I'm wrong, if you use "ssh -X x.x.x.x oowriter"  it 
> will tunnel all the traffic through the server that is running the window 
> manager for you.  While this will help with CPU usage on the window manager 
> server, it wont' help with bandwidth at all.

Yes that is correct.

>   BUT if you change the DISPLAY 
> variable, and use "ssh -x x.x.x.x oowriter" it will NOT do the ssh magic 
> display tunneling, but connect directly to the workstation.  Is that correct?  

Close: you have to set DISPLAY for the shell at the remote side
yourself now:  Something like:
ssh -x x.x.x.x "DISPLAY=$DISPLAY oowriter"
should work because the $DISPLAY value will expand locally (using
double quotes, not single) and putting an environment variable
setting on a command line at the remote side will export the
value for the command in the rest of the line.

> Can you still use the compression in ssh to save bandwidth, or does that only 
> work when using -X rather than -x ?

The X session no longer has much to do with the ssh session. X programs
don't use the stdin/stdout inherited from their parent, unlike character
mode programs.

> Silly me, I always just assumed that the -X flag changed the DISPLAY variable 
> somehow.  i didnt' realize it was something unique to ssh.

That is only part of the magic.  Ssh sets the remote DISPLAY value to
an unused screen on the remote host, then arranges port forwarding
for a connection to that to really be passed back to the DISPLAY
on the side where the ssh command was given.  If you have reasons
to want the connection to be encrypted or compressed you would want
to let ssh handle it for you.

---
  Les Mikesell
   les at futuresource.com






More information about the K12OSN mailing list