We define "idle" based on how screen savers in Linux define it.
I found this tool called "xautolock".
I tested it like this:
/usr/X11R6/bin/xautolock -time 1 -locker "notify-send test"
I placed this in
/etc/rc.d/rc.local, but for some reason it was not working and I couldn't debug it.
Someone said to place it in
.bash_profile. I found this file and placed it in there, but now my GUI won't start.
Because this command is a forever command, it always listens once executed. It never stops listening in order to determine idleness, so this means it can not go into
I do not know how to place it in to
/etc/rc.d/rc.local, so where can it go if it can not go into these files?
Perhaps there is a way to modify it so it can go into
/etc/rc.d/rc.local? Perhaps something like:
DISPLAY=:0.0 /usr/X11R6/bin/xautolock -time 1 -locker "notify-send test"
Would that work?
I'm on CentOS and GNOME.