skip to content
vvhybe
the blog

, a 1-minute read

X11 or Wayland: what's between your apps and your screen

Two ways a Linux desktop puts windows on the screen: one server every app talks through, or a compositor that is the server. What changes, and how to tell which one you're on.

Every window on a Linux desktop is drawn by an app and put on the screen by something else. For decades that something was the X server. More and more often now it's a Wayland compositor, like Hyprland, which runs my desk.

X11: one server in the middle

The X Window System dates from 1984; its protocol, X11, from 1987. It's a client and a server: the X server owns the screen, the keyboard and the mouse, and the apps are its clients, asking it to draw and hearing about input through it. The window manager and the compositor are only more clients.

That gives X its famous strength. Client and server speak a protocol, so an app can run on one machine and show its windows on another (ssh -X).

And its famous weakness: every client sees a lot. Any X app can read the whole screen and listen to the keyboard, whichever window has it. That's how screenshot tools and global hotkeys always worked, and how a keylogger does too.

Wayland: the compositor is the server

Wayland, begun in 2008, folds the display server, the window manager and the compositor into one program. Each app draws its own window into a buffer and hands it over; the compositor decides where it goes and puts the frame together.

Apps stop seeing each other. A window gets input only while it has focus, and can't read what the others show. Screenshots, screen sharing and global shortcuts go through the compositor or the desktop portals, which ask you first.

X11Wayland
who puts windows on screenthe X server, a window manager and a compositor beside itthe compositor: all three in one
what an app seesthe whole session's screen and inputits own windows, and input while it has focus
over the networkbuilt in (ssh -X)not in the protocol (waypipe adds it)
apps made for the othernativethrough XWayland, an X server running as a Wayland client

which one you're on

echo $XDG_SESSION_TYPE   # x11, or wayland

My desk moved to Wayland with Hyprland, and my dotfiles are its configuration. The apps that still need X run under XWayland, side by side with the rest.

First published on my wiki, 13 March 2025; rewritten here, 25 November 2026. The original, on my wiki