xyb3rt / physlock

Lightweight linux console locking tool
GNU General Public License v2.0
303 stars 36 forks source link

Lock each VT separately #75

Closed jluttine closed 5 years ago

jluttine commented 5 years ago

Thanks for this great physlock! I experimented with a bit and wanted share my minor thought.

Would it be a good idea to lock each VT separately? That is, when the screen is locked, each VT is locked based on the user in that VT (or not locked if there was no user). Currently, if I suspend in VT without logged in user, nothing gets locked because physlock cannot detect a user. I see this as a problem. Instead, it could wake up without asking for a password, but when trying to switch to a VT with a logged in user, it'd ask for the password. This would lead to giving the password in each VT after screen locking, but I don't think that'd be an issue. I actually think it'd be ok. Does this make sense?

xyb3rt commented 5 years ago

This is out of the scope of physlock. vlock(1) can lock individual ttys, maybe you're able to combine this with the lock-sessions command of systemd's loginctl(1)