howto exec a cmd after certain time of inactivity?
hi, I'm traying to find out how to trigger a command after X minutes (exactly as a screensaver do) .. I thought it could be possible from xorg.conf, but.. those settings are just for blanking the screen, not for anything.
I also reviewed the xscreensaver app, but didn't find in it an option like "use this screensaver" where to add the command. so, what I'm looking for is a way to use kinda "screen-saver engine" ..or something that allows me to trigger a command after certain inactivity time. (I need it just under X, no need to work in console). if there is a way or app already within slack, the better. anyway, if it's needed to add some proggy, I'll try it out. thanks in advance |
You can use:
at - executes commands at a specified time. |
thanks 4 taking your time to answer..
but -til I know, `at` do not execute commands after certain time of inactivity, just do it after an exact amount of time given by the user. what I'm looking 4 is something like the "first part" of a screensaver application (the part in where inactivity is measured) any idea will be welcome. |
Ya RLY :)
Sorry my bad for not reading it carefully. Can't help you in that case tho :) |
Quote:
Quote:
|
This script runs a command when a xscreensaver locks or blanks desktop. Something similar can be easily made for gnome-screensaver:
Code:
#!/usr/bin/perl -w You have to put the script in autostart of you desktop environment (for Gnome: in Sessions Manager). It should be run every time when X is started or you logged in. M. |
very thanks 4 the answers.
I solved doing this: I opened the xscreensaver control-gui, looked 4 a screensaver entry unusable; selected it and in its (advanced) properties, deleted it name and put in its place the command I needed. this way works just fine ..but blanks the screen! -nothing is perfect, uh? ;) think it's the easiest way to do the job. (about the "at" command: right, there's something called "batch".. but I've never been able to make the 'at' command work-I give up using it long time ago) cheers |
All times are GMT -5. The time now is 06:19 PM. |