I had Cygwin X 64 bit running fine on Windows 7. I upgraded to Windows 10 and things stopped working.
So I wiped out the Cygwin and installed again from scratch. I installed Cygwin X 1.18.4 (x86_64). I started X server using startxwin. I could only get xterm to work when I set DISPLAY=:0.
If I set DISPLAY=localhost:0 I get can't open display.

Also I can't have another computer throw a xterm back to Cygwin X. I get same error. I even tried throwing xterm to a Linux host and that gave same error. Windows firewall is turned off and I set xhost + on all hosts.

Any advice on why I can't explicitly set the DISPLAY to localhost or the local IP of my computer?



This is how you can void "-nolisten tcp" option and run xserver automatiaclly:

    <path-to-cygwin>\bin\run.exe -p /usr/X11R6/bin XWin -listen tcp -multiwindow -clipboard -silent-dup-error
|improve this answer|||||

As mentioned on

'-nolisten tcp' is now the default, so the server only accepts local connections on a unix domain socket. A '-listen' option has been added which can be used to restore the previous behaviour.

|improve this answer|||||

I see it's better to use ssh -Y host option https://x.cygwin.com/docs/faq/cygwin-x-faq.html#q-ssh-no-x11forwarding

|improve this answer|||||

My DISPLAY is set as ":0.0" and it works well. I got this setting by trial and error but the CYGWIN/X FAQ do say this:

    3.13. I upgraded and now X clients can't connect


    Since X server 1.17, by default the server does not listen for TCP/IP
    connections, only accepting local connections on a unix domain socket.

    For local clients, use DISPLAY=:0.0, rather than DISPLAY=localhost:0.0,        
    DISPLAY=, DISPLAY=::1:0.0, etc. See Q: 1.6.. 

    For remote clients, rather than connecting over TCP/IP by explicitly
    setting DISPLAY and allowing access using xhost or by disabling access
    control, use ssh tunnelling with ssh -Y instead. (See the User's Guide
    section on X forwarding using ssh for more details).


    Use the -listen tcp option to restore the previous behaviour, allowing 
    the X server to open a TCP/IP socket as well e.g. startxwin -- -listen
    tcp. See Q: 4.2.. 

CYGWIN/X FAQ URL https://x.cygwin.com/docs/faq/cygwin-x-faq.html

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.