[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: crontab + "xset dpms"



Seth R Arnold <sarnold@willamette.edu> writes:

> Greetings fellow debheads;
> 
> I would like to set my monitor power off times to be different during
> the night than during the day. To this end, I have added the following
> lines to my crontab (output with crontab -l):
> 
> 0       10      *       *       *       xset dpms 3600 0 0
> 30      0       *       *       *       xset dpms 300 0 0 

I think you have to specify the display, so try something like:
30 0 * * * DISPLAY=:0.0 xset dpms 300 0 0

The standard crontab allows variables to be set, so you can just
put a line 'DISPLAY = :0.0' earlier in your crontab, which will
set the variable for all crontab entries.

I am assuming that you are running this in your crontab, as the
same user that is running X, and not as root.  If you want it in
the root crontab, you have to give others permission to access the
display, which is a potential security hole.

-- 
Carl Johnson		carlj@peak.org


Reply to: