Linux: How To Setup A Lockscreen To Run On Sleep/Suspend

Subscribers:
102,000
Published on ● Video Link: https://www.youtube.com/watch?v=-jA2OzttHQI



Duration: 14:00
8,862 views
217


If you care even remotely about your security you probably will want to probably want to at least setup a lockscreen for your computer, whilst this isn't perfectly safe it'll keep out the general prying eyes, and if you have a lockscreen you may want it to run when your computer goes to sleep or suspend mode and that's what we're doing today. If you care even more about security you will likely also want to disable the ability to kill your xorg server and switch tty so that it's a bit harder to circumvent your lockscreen, I do address this but I also think it's dangerous for reasons besides security but it's your system so feel free to configure it as you wish.

πŸ’– Subscribe and ding the bell for more videos!
πŸ‘ Leave a like if you got something out of this video!
✍ Comment some video feedback or what you want to see next time!

==========Resources==========
Slock Arch Wiki:
https://wiki.archlinux.org/index.php/Slock

Linux Lockscreens Arch Wiki:
https://wiki.archlinux.org/index.php/List_of_applications#Screen_lockers

Slock Service:
[Unit]
Description=Lock X session using betterlockscreen for user %i
Before=sleep.target
Before=suspend.target

[Service]
User=%i
Type=simple
Environment=DISPLAY=:0
ExecStartPre=/usr/bin/xset dpms force suspend
ExecStart=/usr/bin/slock
TimeoutSec=infinity

[Install]
WantedBy=sleep.target
WantedBy=suspend.target

Xorg Conf Changes:
Section "ServerFlags"
Option "DontVTSwitch" "True"
Option "DontZap" "True"
EndSection

==========Support The Channel==========
Patreon:
https://www.patreon.com/brodierobertson
Paypal:
https://www.paypal.me/BrodieRobertsonVideo
BTC Wallet Address:
1Aokiv3pFQXUEmh2LbzZQAwxMvq6bpT2UN
ETH Wallet Address:
0x80451867c86bdf08c3888d407c1e3fcb6add61ed
LBC Wallet Address:
bLRN9fm17sCexKfgbYqmMj5xskZF2ogpEh

=========Video Platforms==========
πŸŽ₯ LBRY:
https://open.lbry.com/@BrodieRobertson#5
πŸ“š LBRY Referral Link:
https://api.lbry.com/user/refer?r=3jiXsRmYEV9vZEtETdEFzibFzWuwLhJc
πŸ“Ί BitTube:
https://bittube.tv/profile/BrodieRobertson

==========Social Media==========
🎀 Discord:
https://discord.gg/PkMRVn9
🐦 Twitter:
https://twitter.com/BrodieOnYoutube
🧠 Minds:
https://www.minds.com/brodierobertson/
βœ‰οΈ Telegram:
https://t.me/BrodieRobertson
🌐 Mastodon:
https://mastodon.social/@BrodieOnYoutube

==========My Repos==========
πŸ–₯️ GitHub:
https://github.com/BrodieRobertson

==========Credits==========
🎡 Opening music
Full Power by ZAYFALL https://soundcloud.com/zayfallmusic
Creative Commons β€” Attribution 3.0 Unported β€” CC BY 3.0
Free Download / Stream: https://bit.ly/_full-power
Music promoted by Audio Library https://youtu.be/vWuGCATLwxI

🎡 Ending music
Music from https://filmmusic.io
"Basic Implosion" by Kevin MacLeod (https://incompetech.com)
License: CC BY (http://creativecommons.org/licenses/by/4.0/)







Tags:
brodie robertson
linux lock screen
slock linux
slock linux lockscreen
lockscreen on linux
slock on linux
linux lockscreen on sleep
linux lockscreen on susped
lockscreen on sleep
lockscreen on suspend
linux i3lock
systemd lockscreen
systemd suspend system
betterlockscreen
lockscreen linux
lock on sleep
linux
lock on suspend
i3lock
arch linux
slock
i3lock linux
ubuntu
systemd sleep hook
sleep hook
linux security
security linux
linux security lockscreen