Headless machines
Most of the surface needs no screen. On a server, in CI, or in a container,
exec, file, pkg, network, system, power, battery, font,
debug and serve work exactly as they do on a laptop.
What the machine says about itself
Section titled “What the machine says about itself”$ aos headless statusplatform darwinvirtual not available on this platformnote desktop commands need a logged-in session here
display yes — window, mouse, key, capture, and display commands will workThe desktop commands refuse, rather than fail deep
Section titled “The desktop commands refuse, rather than fail deep”$ aos window listaos: "window list" needs a display, and this machine has noneStart one with `aos headless start`, or check `aos headless status`.On Linux, give it a display
Section titled “On Linux, give it a display”aos headless start --size=1920x1080 --wm # Xvfb + a lightweight WMaos window list # the display is adopted automaticallyaos headless stopheadless start waits for the window manager to claim the screen before it
returns, so the next command works instead of losing a race with it. Later runs
of aos adopt the managed display on their own — there is no
export DISPLAY step. An environment that already names a display always wins,
so this never redirects a real session.
macOS and Windows have no Xvfb equivalent. There, the desktop commands need a
real logged-in session, and headless status says exactly that.
Knowing in advance what will work
Section titled “Knowing in advance what will work”aos headless status # is there a display, and where did it come fromaos commands # screenless machines list only what will runaos commands --all # `g` marks a command waiting on a displayaos commands --json # each entry carries "needs_display"aos serve mcp --gui=off # expose only the screenless toolsIt is tested this way
Section titled “It is tested this way”The end-to-end suite drives the built binaries on real machines, and on a
machine configured hasDisplay: false it asserts the refusal — window list
must exit 2 saying it needs a display — rather than skipping quietly.