I have a laptop running Windows with a Cygwin X server. On this machine I have a virtual Linux box running under VMWare.
I set export DISPLAY=xserver:0 on the VM and do xhost +xclient on the cygwin shell. I can use either the hostname or the IPv4 address. I can now run my X programs (mostly emacs/xterm) by redirecting the display. So far so good.
I also need to use the AWS VPN client to connect to AWS (horrible client but it works). This runs on the Windows laptop but also gets picked up by the virtual machine. I can now talk to AWS on either machine. So far so good.
However, if I try to start any X programs on the linux machine, it refuses to authenticate it. I just get the error "Authorization required, but no authorization protocol specified". If I add the IP address or the server name, it doesn't matter - same error. Neither IP address has changed (I've verified this with Wireshark).
If I do xhost + to disable the authentication, then I can connect but this is obviously hideously insecure and I don't want to do it.
I've tried going down the xauth rabbit hole but that just replaces the above errors with Invalid MIT-MAGIC-COOKIE-1 errors.
Any idea what's going on?