table of contents
- trixie-backports 0.26.4+ds-2~bpo13+1
- testing 0.26.5+ds-1
- unstable 0.26.6+ds-1
| TTYAUTOLOCK(1) | General Commands Manual | TTYAUTOLOCK(1) |
NAME¶
ttyautolock - Lock session if associated TTY loses focus
SYNOPSIS¶
[SESSION_ID | auto]
DESCRIPTION¶
Takes session ID or auto, finds associated TTY, watches /sys/class/tty/tty0/active for changes. Locks session on transition from associated TTY to any other. Locking is done via "loginctl lock-session".
auto argument relies on "loginctl show-session auto" behavior.
SYSTEMD USER SERVICE¶
ttyautolock@.service with default auto specifier can be enabled and started to always lock graphical session on TTY switch.
Alternatively it can be started on-demand and with custom session ID as specifier.
SEE ALSO¶
loginct(1), inotifywait(1)
| 2026-04-06 |