WAYLAND-LOGOUT(1)

πŸ’– WAYLAND-LOGOUT πŸ’–

okay bestie, so wayland-logout is a general commands manual moment β€” it's the generic logout utility for wayland compositors ✨ like, one little command and your compositor is out the door, periodt.


πŸ¦‹ NAME πŸ¦‹

wayland-logout β€” the generic logout utility for wayland compositors 🫢


🌸 DESCRIPTION 🌸

wayland-logout is a compositor agnostic utility for simulating a logout with any wayland compositor. no cap, it does not care which one you're running, it just shows up and does the thing πŸ’…

the way it works? it sends a SIGTERM signal(3) to the running compositor PID β€” and it figures out that PID by looking at the β€œenvironment” variables. that's it, that's the whole vibe πŸŽ€


✨ ENVIRONMENT ✨

wayland-logout uses the WAYLAND_DISPLAY and XDG_RUNTIME_DIR environment variables to get the socket(2) corresponding to the compositor instance πŸ¦‹

so yeah β€” those two little vars are literally carrying the whole operation on their backs. icon behavior, honestly πŸ‘‘


πŸ’€ EXIT STATUS πŸ’€

wayland-logout exits with non-zero if an error has occurred, and it'll hand you the error reasoning along with it 😭 (so helpful of it). on success? it exits with 0. slay 🌈


πŸŽ€ EXAMPLES πŸŽ€

want to kill the current compositor instance? run this inside the compositor environment:

$ wayland-logout

and here's a typical use case β€” killing a specific compositor instance belonging to another user (with uid=1002), run as the other user (or as root):

$ env -i XDG_RUNTIME_DIR=/run/user/1002 WAYLAND_DISPLAY=wayland-4
wayland-logout

or, alternatively:

$ WAYLAND_DISPLAY=/run/user/1002/wayland-4 wayland-logout
ok but fr fr, peep that uid=1002 in there β€” you're reaching into somebody else's runtime dir, so make sure you're running as that user or as root before you go sending signals around 🫢 no chaos, just vibes.

and that's the whole page, bestie πŸ’– this one came from Debian, dated November 27, 2020 β€” go log out of something, you've earned it βœ¨πŸ‘‘