Simple screen locker utility for X, fork of sflock, which is based on slock. Main difference is that sxlock uses PAM authentication.
- provides basic user feedback
- uses PAM
- sets DPMS timeout to 10 seconds, before exit restores original settings
- basic RandR support (drawing centered on the primary output)
- Locks all virtual terminals, needs SUID bit
- Corrected PAM file to work with debian
- libX11 (Xlib headers)
- libXext (X11 extensions library, for DPMS)
- libXrandr (RandR support)
- libXft
- PAM
For manual installation just install dependencies, checkout and make:
$ git clone https://github.com/markuspetermann/sxlock.git
$ cd ./sxlock
$ make
$ sudo make install
When using systemd, you can use
the following service (create /lib/systemd/system/lock@.service
) to let the
system lock your X session on hibernation or suspend:
[Unit]
Description=Lock X session using sxlock
Before=sleep.target
[Service]
User=<username>
Environment=DISPLAY=:0
ExecStart=/usr/bin/sxlock
[Install]
WantedBy=sleep.target
This service then needs to be enabled for each user, for user foo
use
$ sudo systemctl enable lock@foo.service
To use Win + L to lock the screen add the following to rc.xml
<keybind key="W-l">
<action name="Execute"><command>sxlock</command></action>
</keybind>