IT lexicon › Networking › Connection setup (X11)

Connection setup (X11)

Networking På svenska → Updated: 2026-10-11

The opening exchange on an X connection, in which the client states its byte order and credentials and the server replies with a description of the entire display.

The very first thing a client sends is a single byte: B (0x42) for most significant byte first, or l (0x6C) for least. Then comes protocol version 11.0 and any authorisation, typically the name MIT-MAGIC-COOKIE-1 and the cookie from .Xauthority. The server commits to speaking the client's byte order for the rest of the connection, so it is always the server that swaps bytes, never the client.

The reply is Failed with a reason string, Authenticate, or Success. A successful reply is a small encyclopaedia: vendor string and release number, the resource-id-base and mask for the client's resource IDs, the maximum request size, image formats and, for each screen, the root window, default colormap, dimensions in pixels and millimetres and every visual. That is why xdpyinfo can print pages of output without asking another question: nearly all of it was in the greeting.

← Back to the lexicon