Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure people use xss-lock -l #207

Open
stapelberg opened this issue Nov 29, 2018 · 7 comments
Open

Ensure people use xss-lock -l #207

stapelberg opened this issue Nov 29, 2018 · 7 comments

Comments

@stapelberg
Copy link
Member

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.
@Airblader
Copy link
Member

In i3lock, check if the parent process is xss-lock

That sounds like a real hack(?)

@stapelberg
Copy link
Member Author

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

@Airblader
Copy link
Member

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?

@stapelberg
Copy link
Member Author

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.

Gerschtli added a commit to Gerschtli/home-manager-configurations that referenced this issue Jul 28, 2019
Lock before suspending/hibernating, see i3/i3lock#207.
@FrostKnight

This comment has been minimized.

@stapelberg
Copy link
Member Author

Let’s keep your discussion in #275 please.

cadadr added a commit to cadadr/configuration that referenced this issue Jan 2, 2022
stapelberg added a commit to stapelberg/i3lock that referenced this issue Feb 27, 2022
wlhlm pushed a commit to wlhlm/i3lock that referenced this issue Jun 5, 2022
@stapelberg stapelberg pinned this issue Sep 11, 2022
@ghost
Copy link

ghost commented Oct 30, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants