XShmAttach returns an ok status and no Error is passed back from the
remote X-Server via the error handlers (client is synced'd to maintain
order of responses).

I have found that the problem is that there exist a shared memory
segment with the same credentials on the remote machine. So the normal
way of detecting the extension and if a display is remote does not work
(gdk source and XShm doc's).

All I have to play with is the Display struct as I am writing a
library.

Is there any other way of detecting if a Display connection is to a
remote X-Server?

Thanks
Damian