xss-lock man page

xss-lock — use external locker as X screen saver

Synopsis

xss-lock [-n notify_cmd] [--ignore-sleep] [-l] [-v|-q] [--] locker [arg] ...
xss-lock --help|--version

Description

xss-lock hooks up your favorite locker to the MIT screen saver extension for X and also to systemd's login manager. The locker is executed in response to events from these two sources:

xss-lock waits for the locker to exit -- or kills it when screen saver deactivation or session unlocking is forced -- so the command should not fork.

Also, xss-lock manages the idle hint on the login session. The idle state of the session is directly linked to user activity as reported by X (except when the notifier runs before locking the screen). When all sessions are idle, the login manager can take action (such as suspending the system) after a preconfigured delay.

Options

-n cmd--notifier=cmd

Run cmd when the screen saver activates because of user inactivity. Shell-style quoting is supported. The notifier is killed when X signals user activity or when the locker is started. The locker is started after the first screen saver cycle, as set with xset s TIMEOUT CYCLE.

This can be used to run a countdown or (on laptops) dim the screen before locking. For an example, see the script /usr/share/doc/xss-lock/dim-screen.sh.

-l, --tranfer-sleep-lock

Allow the locker process to inherit the file descriptor that represents the delay lock obtained from the login manager. The corresponding index will be made available in the environment variable $XSS_SLEEP_LOCK_FD; this will only be set if the reason for locking is that the system is preparing to go to sleep. The locker should close this file descriptor to indicate it is ready.

Example scripts that wrap existing lockers are available as /usr/share/doc/xss-lock/transfer-sleep-lock-*.sh.

--ignore-sleep

Do not lock on suspend/hibernate.

-q, --quiet

Output only fatal errors.

-v, --verbose

Output more messages.

-h, --help

Print help message and exit.

--version

Print version number and exit.

Signals

SIGHUP

Upon receiving this signal, xss-lock resets the screen saver, but only if the screen is not currently locked (unlike xset s reset).

This can be used in MPlayer's configuration as a workaround for MPlayer's failure to restart the screen saver timer when playback is paused:

heartbeat-cmd="killall -HUP xss-lock"
stop-xscreensaver=false
NOTE:

This is ineffective with mplayer2 (and mpv), because its heart keeps beating while playback is paused.

SIGINT/SIGTERM

Upon receiving this signal, xss-lock exits after killing any running notifier or locker.

Notes

Examples

See Also

xset(1), systemd-logind.service(8)

Author

Raymond Wagenmaker <raymondwagenmaker@gmail.com>

Info

November 2013