You are not logged in.
Hello
I'm using i3wm and thus far here's what I'm doing:
```
set $i3lockwall betterlockscreen --off 600 -l
exec xset s 180
exec xss-lock -- $i3lockwall
```
That way after 180 seconds of inactivity the computer will go in lock screen. But there are some problems:
1. I would like to have a way to automatically suspend the pc after n. minutes of inactivity inside lock screen
2. I would like to have a way to inhibit xset, something like an app called "caffeine" (which does not work)
I tried using xfce power manager, and I can obtain point 2 thanks to "Presentation mode", but suspend wont. If I set on power manger "sleep after 2 mintues" then after two minutes I get a pop-up telling me that "None of the lock scree tools run successfully", but if I press "Yes" then the pc will suspend corectly...
I was wondering if there's a better seamless way to manage lockscreen and automatic sleep.
Thanks
Last edited by ironhak (2025-10-18 07:43:35)
Offline
"xset s 0"
https://github.com/betterlockscreen/bet … lockscreen is just a shell script, you could
…
(sleep $((n*60)) && systemctl suspend) &
SUS_JOB=$!
[[ $runlock ]] && lockinit "$lockstyle"
kill $SUS_JOB
…resp. leverage ~/.config/betterlockscreen/custom-{pre,post}.sh for that (you'll have to store the pid of the delayed suspend process in some tmpfile here)
Offline
Thanks but isn't there something like xfce power manager where I can have every setting inside a single UI program?
Thanks
Offline
Yes: xfce power manager.
If you want to approach this w/ the screensaver timeout and betterlockscreen you'll have adjust betterlockscreen to conditionally suspend the system.
If you want to have something where a custom screenlocker is already integrated w/ a custom power manager and a custom UI, you want to have a desktop system.
There's also stuff like xautolock which you can run multiple instances of that will do random things after different times of inactivity.
https://wiki.archlinux.org/title/Session_lock#xautolock
Offline
Hello, thanks.
I solved my issue by disabling "Lock screen when system is going to sleep" on xfce power manager. That way I don't get the pop-up telling me that xfce couldn not find the screen locker.
And the screen gets locked nonetheless because I run:
exec xss-lock -- betterlockscreen -lat session startup.
Thanks ![]()
Last edited by ironhak (2025-09-12 10:11:55)
Offline
\o/
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Offline