Wayland Display Server

Last update: 2025-12-31 01:50:01 +0800 +0800
Available translations: 日本語 / 中文(简体) / 中文(繁體)

Wayland is a display protocol designed for a local client and compositor on the same kernel. A toolkit’s Wayland backend uses libwayland-client to connect to a Unix socket, usually $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY such as /run/user/1000/wayland-0.

Protocol Model #

Clients and the compositor exchange typed requests and events for numbered objects such as surfaces, buffers, and input seats. XML protocol definitions generate the marshalling stubs. Clients render into shared-memory or DMA-BUF-backed buffers and submit those buffers to the compositor, which combines surfaces and controls outputs and input. A Wayland compositor therefore combines roles that were often separate in an X11 server, window manager, and compositor.

The core protocol has no TCP transport; remote-display solutions provide their own transport and security model. The runtime directory and display socket are security boundaries, so they should not be mounted into untrusted containers.

Xwayland Compatibility #

Xwayland runs an X server nested under the Wayland compositor. It accepts legacy X11 clients on an X11 Unix socket and translates their windows into Wayland surfaces. Native Wayland applications do not require Xwayland, but it remains important for applications that use libX11 or another X11-only toolkit backend.

Comments

Read or comment on GitHub (sign-in required to comment)