Questions tagged [xautolock]

8 questions
16
votes
2 answers

Why does desktop locking stop working after some time?

xautolock is clearly running: $ ps wafux | grep [x]autolock user 21410 0.0 0.0 20124 2628 ? S Nov05 0:04 xautolock -time 10 -notify 30 -notifier notify-send --urgency low --expire-time=10000 -- 'Locking screen in 30 seconds'…
l0b0
  • 50,672
  • 41
  • 197
  • 360
5
votes
0 answers

Why does my Before=sleep.target service run *after resuming*?

I've defined the following service to start a screen locker before suspending: $ cat /etc/systemd/system/screenlock.service [Unit] Description=Lock X session using…
l0b0
  • 50,672
  • 41
  • 197
  • 360
3
votes
1 answer

Trying to use xautolock to suspend activity after a certain amount of time

I'm using manjaro (5.8.18-1-MANJARO) and the i3 window manager. I'm trying to lock the screen then suspend activity after given amounts of idle time. I've found that xautolock should suit my needs using both the -locker and -killer flags. My i3…
2
votes
1 answer

xautolock/ssh-add can't interact with ssh-agent if launched from .xsessionrc

I use xautolock to lock the screen and suspend my laptop after a given amount of time of inactivity. This works fine. This is how xautolock is started from .xsessionrc: xautolock -time 60 -detectsleep -locker '~/bin/lockscreen --suspend' & The…
Andreas
  • 171
  • 6
1
vote
0 answers

Can I use xautolock or anything else to run a command when input is received after the timeout?

I want to have my screen lock and backlight fade out after some delay, and then I want to have the backlight fade back in when I move the cursor or press a button. Having the screen fade out is easy enough with xautolock, but I can't figure out a…
Nick
  • 11
  • 2
0
votes
1 answer

xautolock locker function stops working after a minute

I have a slightly different way of using xautolock: After I lock the screen (using i3lock in my case), I want the display to turn off after some period of time of inactivity. AND I want it to re-turn off if it detects activity, turns on the screen,…
James Wright
  • 387
  • 1
  • 3
  • 13
0
votes
2 answers

Script to detect mouse clicks like a screen saver while ignoring mouse movement

Would like to disconnect an nic after a minute of user inactivity, where inactivity is defined as no mouse clicks or wheel scrolls. Mouse movement is to be ignored so xscreensaver is not suitable and neither is xautolock. How can mouse events be…
Ulysses_
  • 49
  • 6
0
votes
1 answer

shell script run by xautolock keeps stall value in command substitution

I'm trying to make a simple script to put my computer to sleep if it runs on battery unattended. I have this simple script: #!/bin/sh if [ `cat /sys/class/power_supply/ADP1/online` -eq 0 ]; then cat /sys/class/power_supply/ADP1/online; # actual…
Dmitry Grigoryev
  • 7,123
  • 2
  • 23
  • 62