On Oct 31, 2007, at 3:52 PM, Greg Parker wrote:
On Oct 31, 2007, at 3:06 PM, Bobby Jones wrote:
The scenario I was thinking about is ssh from Tiger to Tiger once
you remove DISPLAY to accomodate Leopard. I had DISPLAY exported
in /etc/bashrc for all my Tiger installs. . . but Leopard
obviously doesn't play well with that.
So now I remove that to accommodate Leopard's X. . . but now when
I ssh Tiger to Tiger. . .obviously there is no DISPLAY being
passed. So I guess now I have to manually set DISPLAY every time I
ssh from Tiger to Tiger if I've removed DISPLAY to accommodate
Leopard's new X11?
The best way to handle this is to set DISPLAY if not already set,
in some appropriate shell startup file. The file to use and syntax
depend on which shell you're using; presumably adding an
appropriate `if` statement where you're already handling it in
Tiger will work.
The results:
Tiger: DISPLAY is not set, script sets it
Leopard: launchd set DISPLAY, script leaves it alone
SSH -Y out: ssh sees DISPLAY set at one end, ssh starts X
forwarding and sets DISPLAY at the other end
SSH -Y in: ssh set DISPLAY, script leaves it alone
Why do you need to set DISPLAY at all? I did not know ssh looked at
your DISPLAY, I thought it always tunneled port 6000.