IT lexicon › Infra & Ops › xsetroot

xsetroot

Infra & Ops På svenska → Updated: 2026-10-07

A tiny X11 utility for setting the root window's background, cursor and name — which accidentally became the status bar for a generation of minimalist window managers.

xsetroot has shipped with X since the 1980s and does three things to the root window. -solid paints the background a single colour, -bitmap tiles a pattern from an XBM file, and -cursor_name replaces the black X that hovered over empty desktop with an ordinary arrow. The line xsetroot -solid gray20 lived in countless .xinitrc files.

The fourth use came much later. xsetroot -name sets the root window's WM_NAME, and dwm displays exactly that string in its bar. A shell loop writing the time and battery level there is all it takes, and so a tool for background colours turned into a status API.

← Back to the lexicon