3 ms·
You can go simpler than slock: vlock -sna will switch to a locked console tty and prevent you from switching out until you've unlocked it. This avoids all of t
by ivank 12y ago
You can go simpler than slock: vlock -sna will switch to a locked console tty and prevent you from switching out until you've unlocked it. This avoids all of the problems with X-based lockers, some hinted at on https://github.com/google/xsecurelock#security-design https://github.com/google/xsecurelock#security-design
(Note: don't sudo vlock -sna if you haven't set a root password, add yourself to the vlock group instead.)
- 616c 12y agoVery cool tip. This is one of the most useful Linux power user tips I got in a while. Thanks! Now to script it as I spent most of my time in a X term emulator with a tmux session. Can someone effectively script X -> tty console then vlock?
- ivank 12y agoYou don't need to switch to a tty console yourself, you can run vlock -n while in X and it'll switch for you.
- 616c 12y agoYou sir are going to cause some late night geekage. Damn you! UPDATE: So am I missing something, because I get more or less the man page below: http://linux.die.net/man/1/vlock http://linux.die.net/man/1/vlock And I see no -n argument. Are you using Linux or some other Unix? What version do you use? (Sorry, I really need to sleep early, but you have to keep telling me how to improve my laptop!)
- ivank 12y agoThat looks like a man page from an old version. I've seen vlock -n on Ubuntu 14.04 and a two-year-old Gentoo. http://manpages.ubuntu.com/manpages/trusty/man1/vlock.1.html http://manpages.ubuntu.com/manpages/trusty/man1/vlock.1.html
- 616c 12y agoTurns out, quite annoyingly, the package on Arch providing vlock, and an older version at that, is kbd, from the Keyboard Project (http://www.kbd-project.org/ http://www.kbd-project.org/). FYI to everyone on Arch, for a current version that makes this work, you need the AUR package vlock-original, and then invoke that as the executable name in the terminal. I already replace xscreensaver and got rid of it. Thanks for the tip!
- pyroh 12y agoThere's physlock[0] as well, as vlock (apparently) has some limitations according to physlock(1): physlock is an alternative to vlock, it is equivalent to `vlock -an'. It is written because vlock blocks some linux kernel mechanisms like hibernate and suspend and can therefore only be used with some limita‐ tions. I can't attest to this as I've only used vlock, so correct me if I'm wrong. [0] http://github.com/muennich/physlock http://github.com/muennich/physlock