i3 / i3lock

improved screen locker
https://i3wm.org/i3lock
BSD 3-Clause "New" or "Revised" License
921 stars 404 forks source link

reload background image on failed attempt #262

Closed KnutZuidema closed 4 years ago

KnutZuidema commented 4 years ago

This is more a feature request, but it would be nice to be able to define some event (i.e. a failed login attempt) where the lock background would be reloaded.

Is something that has a possibility to be implemented? I would be happy to create a PR with the necessary changes (unless this is already possible, in which case I would appreciate you letting me know how).

stapelberg commented 4 years ago

It is important for i3lock to do as little work as possible while the screen is locked, because everything it does has a chance to introduce security vulnerabilities. Especially loading an image is not uncritical from that perspective.

Hence, I’m inclined to say no to this feature request, but thanks for your suggestion!

fblz commented 4 years ago

Sorry for posting in a closed issue but I'd like to build something like this aswell. I tried to pidof i3lock, spawn a new i3lock and then kill the old by pid but this doesn't work. I now killall i3lock and respawn the process after but that's kind of not elegant. From your knowledge of the code can this work somehow?

stapelberg commented 4 years ago

It’s not possible to replace i3lock reliably with a new process. i3lock grabs the X11 server, so your new process needs to kill the existing i3lock to release the grab, but then you have an unlocked screen, and if anything goes wrong with the new process, your computer is unprotected.

Don’t do this. It’s a huge security risk.