[Xcb] Connecting to an X Server

Antoine Latter aslatter at gmail.com
Mon Aug 4 19:38:10 PDT 2008


Hello,

I'm trying to work out how the initial setup with an X server is
negotiated, and I'm not sure if the problems I'm having are due to not
understanding X or not understand the language I'm working with
(Haskell, for the curious).

After I get a handle to the server the first thing I do is send down
my 10-byte setup-request, which consists of:

   + 1 byte for ByteOrder = 66
   + 1 byte padding
   + 2 bytes major version = 11
   + 2 bytes minor version = 0
   + 2 bytes auth protocol name length = 0
   + 2 bytes auth data length = 0

And then I wait for the setup response which never comes.  Is there
something else I'm supposed to be sending?  If I add two bytes of
padding onto the end, I get a response all of the sudden.

I'm not ruling out me doing something wrong with buffering on my end,
but I thought I'd check in over here to see if I'm trying the right
thing.

This is on Mac OS 10.5, connecting to the file-socket pointed to by
$DISPLAY (that is, $DISPLAY looks like a literal path to a
file-socket, so I'm using that).

-Antoine


More information about the Xcb mailing list