Does xautolock re-trigger slock if no activity occurs while slock is already active in DWM?
0
votes
0
answers
37
views
I am using DWM on Debian 12, and I have configured xautolock to automatically lock my screen using slock after a period of inactivity. Here is the command I am using:
xautolock -time 9 -locker slock -notify 60 -notifier "notify-send 'Locking in 1 minute' 'The system will be locked in one minute!'"
My question is: **If xautolock triggers slock, and then while slock is active there is no activity, will xautolock attempt to start another instance of slock, effectively locking the screen twice?**
I want to ensure that only a single instance of
slock
runs at any given time. If xautolock
keeps **re-triggering** slock
even when the screen is already locked, it could cause issues.
## What I have tried: ##
1. Checking man xautolock
, but I didn't find explicit documentation on how it handles already active lockers.
2. Running ps aux | grep slock
while slock is active, but I haven't tested whether a second instance could be started.
3. Considering using pgrep
or pidof
in the -locker
command to prevent multiple instances, but I want to understand how xautolock
behaves by default before implementing a workaround.
Would xautolock attempt to lock the screen again while slock is already running, and if so, what would be the best way to prevent multiple instances?
*Any insights or suggestions would be greatly appreciated!*
Asked by Fauzy Madani
(1 rep)
Mar 23, 2025, 04:39 AM
Last activity: Mar 23, 2025, 04:40 AM
Last activity: Mar 23, 2025, 04:40 AM