News for hackers. Stuff that matters.
Re:One Thing Well – A weblog about simple, useful software by ivank on Sunday September 21, 2014 @03:48PM (#8348052)
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

(Note: don't sudo vlock -sna if you haven't set a root password, add yourself to the vlock group instead.)

Re:One Thing Well – A weblog about simple, useful software by pyroh on Sunday September 21, 2014 @07:05PM (#8348619)
There'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

Re:One Thing Well – A weblog about simple, useful software by 616c on Sunday September 21, 2014 @03:52PM (#8348062)
Very 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?

Re:One Thing Well – A weblog about simple, useful software by ivank on Sunday September 21, 2014 @03:54PM (#8348072)
You don't need to switch to a tty console yourself, you can run vlock -n while in X and it'll switch for you.
Re:One Thing Well – A weblog about simple, useful software by 616c on Sunday September 21, 2014 @04:02PM (#8348095)
You 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

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!)

Re:One Thing Well – A weblog about simple, useful software by ivank on Sunday September 21, 2014 @04:14PM (#8348135)
That 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

Re:One Thing Well – A weblog about simple, useful software by 616c on Monday September 22, 2014 @01:45AM (#8349418)
Turns 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/).

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!