Hello,

On Thu, 11 Jul 2019, Laurence Perkins wrote:
>You could also leave DontVTSwitch on all the time and set a keyboard
>shortcut to run chvt (man 1 chvt) with appropriate permissions and
>parameters instead.  Keyboard shortcuts shouldn't get processed if the
>screen is locked.

The screensaver has to get _and keep_ the lock on input.

The sad thing is, people do needless rewrites and get it wrong again
and again and again, despite jwz' xscreensaver code from 1991 on,
setting an example on how to do it right... Cue gnome-screensaver, the
kde stuff, apparently also i3lock etc.pp. ad nauseam, all repeating
the very bugs jwz wrote about in 2004 (the toolkits.html)...

VT Switching is just a little subclass of the underlying problems of
those "lock screen" programs that don't lock your screen.

==== https://www.jwz.org/xscreensaver/toolkits.html / Epilogue ====
I wrote this document in 2004, explaining the approach to privilege
separation that xscreensaver has taken since 1991. Of course, the
people doing needless rewrites of xscreensaver have ignored it for
that whole time, and have then gone on to introduce exactly the bug
that I described in this document as a hypothetical strawman! And --
this would be hilarious if it weren't so sad -- have introduced it
multiple times. As I said in 2015:

    If you are not running xscreensaver on Linux, then it is safe to
    assume that your screen does not lock. Once is happenstance. Twice
    is coincidence. Three times is enemy action. Four times is
    Official GNOME Policy.
====
(read the whole thing linked document!). Also:

https://www.jwz.org/xscreensaver/man1.html#8
https://www.jwz.org/blog/2014/04/the-awful-thing-about-getting-it-right-the-first-time-is-that-nobody-realizes-how-hard-it-was/
https://www.jwz.org/blog/2015/04/i-told-you-so-again/
(also follow the "previous" links ;)

So the solution is to just use "xscreensaver" by jwz. Which can be
configured to just blank the screen etc. as wanted by the op. See also
the FAQ: https://www.jwz.org/xscreensaver/faq.html

HTH,
-dnh

-- 
"Humans need fantasy .. to *be* human"     -- Death (in Hogfather)

Reply via email to