Skip to content

scootlock

scootlock locks the session and keeps it locked until you type your password. It locks every output at once through the ext-session-lock-v1 protocol, so the compositor itself hides your windows and routes input only to the lock screen. The lock screen shows the time, your name and a password field over a blurred copy of your wallpaper, in the colors of your look.

Terminal window
scootlock # lock now; returns after you unlock

With the scoot Nix desktop profile, make scootlock the locker for idle, sleep, lid close and Super+Escape with one line in your home configuration (the scoot NixOS module already declares its PAM service; see Idle and lock):

home.nix
programs.scoot.desktop.idle.lock.daemon = "scootlock";

Without the profile, bind scootlock with a spawn bind or start it from your idle daemon. It stays in the foreground until you unlock, so an idle daemon that waits for each command to exit (swayidle with -w) must start it in the background.

scootlock checks your password through PAM, service scootlock. Without that service PAM uses its other service, which on most systems refuses every password.

On NixOS:

configuration.nix
security.pam.services.scootlock = { };

Elsewhere, create /etc/pam.d/scootlock with your system’s usual login stack, for example:

auth include login
account include login

Your distribution’s swaylock or hyprlock file is a good model; copy it and keep the name scootlock.

  • Type your password and press Enter. Escape or Ctrl+U clears the field.
  • Every keyboard layout works, including dead keys and Compose. The field shows Caps Lock, and the active layout when you have more than one.
  • The field is on the output with keyboard focus (on scoot, the output under the pointer). Other outputs show the date and time.
  • A half-typed password is cleared after 10 seconds without a key.
  • Messages from PAM (for example pam_faillock’s “The account is locked due to 3 failed logins”) stay on screen after the attempt fails, wrapped to two lines.
  • After three wrong passwords in a row, Enter is ignored for 2 seconds, then 4, 8 and so on up to 30 seconds. You can keep typing meanwhile. This count belongs to the running scootlock: restarting it starts over. PAM’s pam_faillock, if your system uses it, is the limit that counts across restarts and services.
  • An input method never sees the password: scootlock does not use one.
Option What it does
--font PATH Draw text with this font file instead of the look’s
--help Print help
--version Print the version

There is no option or environment variable that changes how the password is checked.

Status Meaning
0 Unlocked: PAM accepted the password
1 Could not lock, or had to stop while locked. If it stopped while locked, the session stays locked
2 Bad command line
3 Another locker already holds the lock

The session stays locked. scoot paints the screen red so you can tell a crashed locker from a lock screen. Switch to a text console (Ctrl+Alt+F2), log in, and run scootlock again on the same display:

Terminal window
WAYLAND_DISPLAY=wayland-1 XDG_RUNTIME_DIR=/run/user/$(id -u) scootlock

The new scootlock takes over the lock. Switch back (usually Ctrl+Alt+F1 or F7) and unlock.

  • The text column is always on the left (centered on narrow outputs). Choosing the side per look is not available yet.
  • There is no option to choose which output shows the field.
  • Each output keeps a full-size copy of its screen plus two buffers in memory (about 24 MB per 1920x1080 output).
  • scootlock needs glibc 2.34 or later and Linux-PAM 1.0 or later.
  • An account with an empty password cannot unlock: scootlock refuses an empty field and asks PAM to refuse an empty password. Set a password before using scootlock as the idle locker.
  • If a PAM module hangs (a network module with no timeout), the screen stays on “Still checking…” and Escape cannot cancel it. Recover from another console: kill scootlock and start a new one, as in If scootlock crashes.

When scootbg runs, scootlock shows scootbg’s blurred picture of each output’s wallpaper. Otherwise it shows the look’s background color. It never takes a screenshot, so nothing from your windows appears on the lock screen.

The colors and the font come from your look’s login-screen fragment (~/.local/state/scoot/look/greet.toml), so the lock screen matches the login screen. With no look, the built-in colors are afterglow’s.

Symptom: the right password is refused (“That password didn’t work”, or “Permission denied”).

PAM has no scootlock service, or the service does not check passwords the way your login does. Add it as in Set up PAM first. PAM’s own messages are in the journal:

Terminal window
journalctl -b --since -10min | grep -i pam

Symptom: “A PAM module asked for something scootlock cannot answer”.

A module in the scootlock service shows a visible prompt (a one-time code, a user name). scootlock answers only hidden password prompts. Remove that module from /etc/pam.d/scootlock.

Symptom: scootlock exits with status 3 at once.

Another locker (swaylock, a second scootlock) holds the lock. Unlock that one first.

Symptom: “the compositor does not offer ext-session-lock-v1”.

The compositor does not support the lock protocol. scoot, sway, Hyprland and niri do.