When trying to connect remote clients to Cygwin/X, I get 'Authorization required, but no authorization protocol specified'

25,335

Solution 1

You 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.

Solution 2

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.

Share:
25,335

Related videos on Youtube

qwertzguy
Author by

qwertzguy

I have the 'Autobiographer' badge.

Updated on September 18, 2022

Comments

  • qwertzguy
    qwertzguy almost 2 years

    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
    
  • Ken Ingram
    Ken Ingram about 5 years
    is that supposed to be an export?
  • Ken Ingram
    Ken Ingram about 5 years
    DISPLAY=:0.0 xhost xterm 192.168.122.5 No protocol specified xhost: unable to open display ":0.0"
  • qwertzguy
    qwertzguy about 5 years
    @KenIngram remove 'xterm' from your command, you need to put the ip right after xhost just like in my answer.
  • Drazisil
    Drazisil over 3 years
    One note here: If you already launched VcXsrv, make sure to close it before starting against with the access list disabled :)