I have spent the past 5 hours pouring over the Cygwin/X FAQ and countless mailing list archives but have turned up empty. In brief, I am having trouble getting my Cygwin X Server to receive forwarded X11 connections.
More specifically, when I
ssh -X user@remote-host from the Cygwin XTerm, the remote-host doesn’t have a DISPLAY environment variable set. Obviously, this is bad, because it means the X11 forwarding doesn’t have a display to go to (i.e., it is b0rk)!
I’ve tried to
ssh -vv -X user@remote-host to get some interesting debugging output, but the only X11-related messages I get are too cryptic for my understanding:
debug2: x11_get_proto: /usr/X11R6/bin/xauth -f /tmp/ssh-UbLPAD1860/xauthfile generate 127.0.0.1:0.0 MIT-MAGIC-COOKIE-1 untrusted timeout 1200 2>/dev/null debug2: x11_get_proto: /usr/X11R6/bin/xauth -f /tmp/ssh-UbLPAD1860/xauthfile list 127.0.0.1:0.0 . 2>/dev/null debug1: Requesting X11 forwarding with authentication spoofing. debug2: channel 0: request x11-req confirm 0
The bit about “authentication spoofing” is unnerving. Could this “spoofing” simply not be working? If that’s the case, then the problem has something to do with the way xauth(1) is configured, no? (Yes, I’ve poured over the man pages as well, but to no avail. As far as I can tell the output fom
xauth -v list is fine.)
Additionally, I’ve got doubts about whether or not it is okay that the xauth data is being written to a temp file like that with
xauth ... generate .... Note that there doesn’t seem to be any problem forwarding the display of X client programs to a different server, only the other way around (forwarding other displays to my Cygwin X Server) causes problems.
Am I missing something really stupid?
After some more fiddling, I have gotten it to work if I set
$DISPLAY manually through the SSH connection. That is, after I
Cygwin-Box$ ssh user@remote-host Remote-Host% setenv DISPLAY "192.168.1.102:0.0"
will work and its display will appear on Cygwin-Box. But why doesn’t
ssh -X ... do this automatically?
Anyway, if anyone has any idea why SSH isn’t setting
$DISPLAY for an X11 connection, I’d really appreciate some advice. Thanks in advance.