odd ssh/X11 forward behavior

Mike Miskulin birdfund at yahoo.com
Sat Apr 17 19:57:22 UTC 2010


Appreciate any insight, I'm stumped.  Situation is as below:

host#1: freebsd
host#2: linux 

I would like to run X apps on host #2 so they are displayed on host #1.
I've set up as best I can tell the appropriate options in ssh_/sshd_config files to do this.  

Procedure:  
in an open xterm window on host #1.  issue ssh -Y -l username host#2
After connection, $DISPLAY is host#2:10.0    attempt to run an X program such as xcalc.   Get 'unable to open display' as well as an authentication error.  spend a while mucking about to no avail.  

at some point, connect again to host #2 via a second xterm window which was open.  run xcalc.   magically, xcalc displays on host #1  happy days!

notice that I still have open another connection in first xterm to host #2. try to exit, hangs at logout message.  remains thus until I close the xcalc window and then it completes logout.  

try to run xcalc again in the 2nd session. failure. same error messages as before.  

open another session again to host #2.  run xcalc.  magic, it displays.
go back to the other session, try to run xclock.  magic, it displays.

So... I have no clue here.  If I have *two* open ssh sessions to host #2 (both with X forwarding) I can run applications which display on host #1 and in fact can run any application from either session at same time.   However, if there is only *one* session open, nothing works and I get the various error messages related to opening the display and authentication. 

Where have I gone wrong?

Thanks for your help.



      


More information about the freebsd-questions mailing list