I just installed Cygwin/X and I launch it with startxwin -- -listen tcp to allow remote clients to connect to it through tcp.
However, remote clients fail to connect to the remote display with the following error message:
Authorization required, but no authorization protocol specified 3 Answers
If you use VcXsrv, you should turn on "Disable access control" setting. But note, after that anyone from Network who has access to your X-server may show their UI on you X-server.
1You need to install the xhost Cygwin package, and after starting the X server, run the following (also on Cygwin):
$ DISPLAY=:0.0 xhost <remote_hostname_or_ip>This command authorizes <remote_hostname_or_ip> (e.g. a WSL Ubuntu installation, a separate Linux system in the network, etc.) to connect to and use Cygwin/X.
I am running xinit 1.4.1-1 and xorg-server 1.20.4-1 with PuTTY 0.72. Like you, I added the startxwin parameters "-- -listen tcp". I just did it to the X-Win Server shortcut at C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Cygwin-X. I also needed to enable X11 forwarding and specify the path to .Xauthority file in PuTTY Configuration. PuTTY can modify the .Xauthority file directly without xhost.