Had to dust off the old keyboard skills this week with a really old issue on very old Solaris machine. There was a relocation of an old machine and the utility they have on their desktop stopped working as the server would no longer export the display back.
The classic error of Xlib: Connection to “:0.0” Refused by Server
I used the command below to check what it would allow.
$ xauth list $DISPLAY
This seems ok, so connect to root and ran the command.
xhost+
This was still being blocked, however to another client machine, this worked, done this by testing the app and xclock. So now this was down to the client. On the desktop we use Xming. So I looked into the XMing Client Log. The log was full of lines like the one below.
Xming.exe: client 4 rejected from IP XXX.XXX.XXX.XXX
From here I found and added the IP to the Xo.hosts file. Once the IP was added I restarted Xming and then everything worked as it should. This was actually nothing to do with the server side, this was all client related.