This confuses me a lot and I have no clew at all.
I used mintty on Windows and ssh to a linux server. I can use X applications at the beginning, like gvim, emacs, etc.
However, after some amount of time. Even my gvim GUI is still open, say, I want to open another gvim. Then I type
$ gvim
E233: cannot open display Press ENTER or type command to continue
and my $DISPLAY is $ echo $DISPLAY localhost:18.0
My x server on local Windows was always opened. And I can start a X application if I ctrl+d to quit current ssh connection and reconnect again using ssh, it can open X application again. However, it again still stopped working after some time. Looks like something is timing out.
Any advice will be appreciated! Thanks!