SLOCK(1)

πŸ“¦
version 49 Β· 2 versions
, in alpine 3.24, arch rolling, nixos 26.05, nixpkgs unstable, ubuntu resolute, ubuntu stonking

πŸ’– SLOCK(1) β€” the slock page from the General Commands Manual πŸ’–

okay bestie, sit down, hydrate, and let me tell you about slock ✨


🌸 NAME 🌸

slock β€” the simple X screen locker. that's it. that's the whole vibe. she locks your screen and she does it beautifully πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

slock [-v] [cmd [arg ...]]

like… look at her. three little pieces. no cap, it's giving minimalism πŸ‘‘


✨ DESCRIPTION ✨

okay so slock is a simple X screen locker. that's literally the whole pitch and honestly? iconic.

and here's the cute part β€” if you give her a cmd, she will execute that command after the screen has been locked. so you lock up first, then the thing runs. order matters, bestie 🫢

the options are as follows:

  • -v β€” prints version information to stdout and then dips out (exits). that's the whole flag. she's a one-flag wonder and we love her for it πŸ’–

⭐ EXIT STATUS ⭐

the slock utility exits 0 on success, and >0 if an error occurs. simple as. no crumbs left over 😌


🌈 EXAMPLES 🌈

here's the moment you've been waiting for, the example:

$ slock /usr/sbin/s2ram

lock the screen, then send the machine off to sleep. main character energy fr fr 😴✨


πŸ”₯ SECURITY CONSIDERATIONS πŸ”₯

okay this part is serious, no jokes, listen up bestie πŸ™ˆ

to make sure a locked screen can not be bypassed by switching VTs or killing the X server with Ctrl+Alt+Backspace, it is recommended to disable both in xorg.conf(5) for maximum security:

Section "ServerFlags"
        Option "DontVTSwitch" "True"
        Option "DontZap"      "True"
EndSection
like, genuinely β€” if you skip this, someone can just ✨vibe✨ their way past your lock screen. don't be that girl. disable both. πŸ’€

πŸŽ€ CUSTOMIZATION πŸŽ€

slock can be customized by creating a custom config.h from config.def.h and (re)compiling the source code.

and why tho? because it keeps her fast, secure and simple. the trifecta. the holy trinity. she ate and left no crumbs πŸ‘‘πŸ’–


πŸ’œ SEE ALSO πŸ’œ

hmm, actually there's no SEE ALSO section here β€” but she does name-drop xorg.conf(5) up in security considerations, so go read that one if you're curious 🧚


and that's the whole page, bestie!! this one came from the Debian fam, dated October 6, 2023 β€” so if you see that date, you know exactly which version of the SLOCK(1) page you're reading πŸ’…βœ¨ stay locked, stay safe, mwah πŸ«ΆπŸ’–

πŸ“¦ where this page comes from