Ensure people use xss-lock -l
Opened this issue · 7 comments
When using xss-lock, the -l flag should be used so that the screen is locked before the machine is suspended. Otherwise, at least on some machines, there’s a race where users can interact with the running applications (e.g. enter “ls” into a terminal) before the screen is locked.
We should:
- Update the manpage to not only talk about xautolock, but also xss-lock, and mention the -l flag there.
- In i3lock, check if the parent process is xss-lock, and if its command line is lacking -l, then print a warning. Need to double-check if said warning would actually be printed.
In i3lock, check if the parent process is xss-lock
That sounds like a real hack(?)
Absolutely. But this is the best way I can think of to make users aware of this misconfiguration. If you have any other suggestions, let me know :)
I'd probably question why xss-lock not only allows locking after suspension (is there a point to that?), but also why that is the default. I mean this doesn't just affect i3lock specifically, right?
The -l option enables readiness notifications, which must explicitly be supported by the locker. xss-lock can’t enable it by default without breaking all existing lockers that don’t support it.
I also can’t think of a way to re-design the protocol in such a way that it would negotiate with the locker whether readiness notifications are supported.
Can there be an alternative for those who don't use systemd, such as slock built in capabilities or xautolock? and then obviously add it to the wiki? Would be very helpful!
As it is now, xss-lock option is useless for gentoo users and other non-systemd users.
Let’s keep your discussion in #275 please.
xss-lock
& xautolock
are not an ideal solutions. Caz it doesn't allow screen saver blanking, doesn't allow inhibition, as well as blanking without locking. I recommend disabling all xscreen savers & manually setup xidlehook & xset dpms.
xset s off -dpms
exec --no-startup-id xidlehook \
--detect-sleep \
--not-when-audio \
--not-when-fullscreen \
--timer 180 'xset dpms force standby' '' \
--timer 180 'i3lock' '' \
--timer 360 'systemctl suspend' '' &
Or if you wanna combine blanking as well as locking, you can do that. Just pipe i3lock & dpms standby in one timer. xidlehook
supports infinite timers btw.
Lock possible on manual suspend too.
bindsym <key> exec --no-startup-id i3lock | systemctl suspend
Also when you exit i3, make sure to kill xidlehook, since you don't wanna have multiple instances on re-login.
bindsym <key> exec --no-startup-id pkill xidlehook | i3-msg exit