On Saturday 21 March 2015 06:07:41 Petter Adsen wrote:
> On Sat, 21 Mar 2015 05:58:44 -0400
>
> Gene Heskett <ghesk...@wdtv.com> wrote:
> > On Saturday 21 March 2015 05:18:18 Reco wrote:
> > >  Hi.
> > >
> > > On Sat, 21 Mar 2015 05:02:53 -0400
> > >
> > > Gene Heskett <ghesk...@wdtv.com> wrote:
> > > > Greetings;
> > > >
> > > > Running a wheezy based linux here.
> > > >
> > > > While I as a user can use xset to remind the system of the
> > > > monitors dpms controls, an identical entry in my crontab results
> > > > in an email that it could not open my 0:0 display.
> > >
> > > Since cron should strip out every environment variable from
> > > whatever its told to run - that's to be expected.
> > >
> > > > So I cannot "script" this reminder.
> > >
> > > You can. All you need to do is to define the needed DISPLAY and
> > > XAUTHORITY in the script itself.
> > >
> > > I.e.
> > >
> > > #!/bin/sh
> > > export DISPLAY=:0.0
> >
> > It will not install, claiming bad minute
> >
> > > export XAUTHORITY=<your XAuthority goes here>
> > > xset +foo -bar
> > >
> > > Reco
> >
> > This what I have, but it will not install
> >
> > #!/bin/sh
> > export DISPLAY=:0:0
> > export XAUTHORITY=/home/gene/.Xauthority
> > # m h  dom mon dow   command
> > */5 * * * * /home/gene/bin/makesig
> > 30 0 * * * /home/gene/bin/sa-train-bayes
> > 01 * * * *  xset -display 0:0 +dpms
> > 02 * * * *  xset -display 0:0 dpms 300 0 600
> >
> > error msg on quitting nano:
> >
> > crontab: installing new crontab
> > "/tmp/crontab.O2BPk0/crontab":1: bad minute
> > errors in crontab file, can't install.
> >
> > Its probably obvious, but I can't see why it fails.
>
> Either set the variables like
> DISPLAY=:0.0
>
> or, better yet, write the line as:
> 01 * * * *  /home/gene/bin/name-of-script
>
> and set the variables in the script itself.
>
> Petter

And that latter seems to have worked.  Thank you Petter.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/201503210734.03293.ghesk...@wdtv.com

Reply via email to