Using dm-tool lock and xautolock locks my computer multiple times

I'm using dm-tool lock to lock my computer. In my i3 config I have the following lines:

exec --no-startup-id xautolock -time 10 -locker 'dm-tool lock'
bindsym $mod+BackSpace exec --no-startup-id dm-tool lock

It's been giving me some issues.

I have it set to lock after 10 minutes of activity. But it locks every 10 minutes, even if it was already locked. When I went away from my computer for an hour, I had to unlock it six times.

Is this an issue with xautolock or dm-tool lock? How can I fix this?

Make sure you have commented or removed this part in i3 config file:

# Lock screen
bindsym $mod+9 exec --no-startup-id blurlock

and also

exec --no-startup-id xautolock -time 10 -locker blurlock

I think you have to define the default locker first and use something like:
"dm-tool lock", mode "default"
but i never try it as i prefer the i3exit with blurlock

I got rid of that, yeah. My lock-relevant i3 settings:

# locking
bindsym $mod+9 exec dm-tool lock
bindsym $mod+BackSpace exec dm-tool lock
exec --no-startup-id xautolock -time 10 -locker 'dm-tool lock'

Where would I define the mode?

For anyone coming across this thread in the future, I've had no luck in finding a solution.

Oh, and dm-tool lock doesn't actually lock the screen. The best solution - and only, to my knowledge - would to customize i3lock.

i just checked it again and still easily worked around with ctrl+alt+f7. in addition it also now seems to break my touchpad.

i've found it to work across all DE's and DM's so far and never fails to work properly. you can use xautolock to have it lock after a certain amount of inactivity. if you want it to lock on suspend i have a service i wrote for that.
(you can replace blurlock with i3lock if you want)

i have this autorun at boot to set an inactivity lock.

xautolock -locker blurlock -time 5 -resetsaver -detectsleep

heres the lock on suspend service

sudo nano /etc/systemd/system/blurlockonsuspend@dglt.service

(replace @dglt with your username @username)

#sudo systemctl enable blurlockonsuspend@dglt.service

Description=Turning blurlock on before sleep/suspend

ExecStartPost=/usr/bin/sleep 1


sudo systemctl enable blurlockonsuspend@dglt.service
sudo systemctl daemon-reload

modify to your needs, i just prefer blurlock instead of plain i3lock. dont forget to replace @dglt with your user name so the the service works properly.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by