cygwin Xserver losing connection

0

I am running Xserver on cygwin (on top on Windows 7), and then using xterm to remote to linux via ssh -X, and run remote applications there, like konsole, emacs and others.

Initially all works fine, e.g. executing emacs pops up the correctly working window on my Windows 7 box.

But if I try to run the same emacs some time (like an hour) later, I get a linux message Display localhost:10.0 unavailable, simulating -nw and emacs runs in-line.

I have checked and the Xserver seems still up and running ok. Indeed, if I exit out to the original cygwin and reconnect to Linux by ssh -X again, it works just fine.

Would you know what is happening and how can it be fixed? Why is my Xserver connection being dropped?

Thank you very much.

gt6989b

Posted 2012-10-24T21:48:06.693

Reputation: 543

Is it just emacs,or do other programs show this problem? Are you sure Xserver is still running? – Isaac Rabinovitch – 2012-10-25T05:41:52.543

@IsaacRabinovitch Other programs have the same problem, like konsole, for example. I'm sure Xserver is still running -- like I wrote, logging out from linux back to cygwin and connecting again via ssh -X allows to run everything ok, supposedly on the same Xserver... – gt6989b – 2012-10-25T14:43:43.067

Answers

0

Feel like a total moron to ask a question and answer it myself, but for the same of a future reference, here is a work around that helped. Instead of using ssh -X, if ssh -Y is used instead, it works better and does not drop the ability to spawn new windows over time.

gt6989b

Posted 2012-10-24T21:48:06.693

Reputation: 543