Install suckless’ X display locker slock on GNU/Linux
About slock, from suckless’ site:
“Simple X display locker. This is the simplest X screen locker we are aware of. It is stable […]”
Create a directory where you’ll clone slock’s repository:
$ cd
$ mkdir ~/bin
Move to that directory:
$ cd ~/bin
Clone the repository of slock locally:
$ git clone git://git.suckless.org/slock
If you don’t have git installed:
$ sudo apt install git
Move to the directory of slock:
$ cd slock/
Now you could follow what’s on the README of slock.
$ less README
And so run:
$ make clean install
But I use checkinstall to make a package off source code, so I run:
make clean
sudo checkinstall
Now I can run slock from any shell session by running:
$ slock
To unlock your screen type your user password — there is no prompt.
~/bin and path
You might need to add ~/bin/
to $PATH
Checkinstall
If you don’t have checkinstall see: https://yctct.com/checkinstall
About slock’s package
Checkinstall creates a package for slock:
$ ls ~/bin/slock/*deb
slock_20250917-1_amd64.deb
$ apt list slock
slock/now 20250917-1 amd64 [installed,local]
I have limited knowledge on what checkinstall does. I assume both are the same; I have not tested removing either of these packages with apt remove slock
or dpkg -r slock_20250917-1_amd64.deb
yet.
personal computing command-line interface (cli) gnu linux trisquel shell literacy wiki suckless