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

Re: crontab + "xset dpms"



I'd probably try a different approach to this:

Somewhere in the X initialization scripts, create a routine which
creates a small script (or scripts) corresponding to the X session(s)
you have active.  The script will essentially read:

    DISPLAY=<display>
    xset dpms ### ### ###

Write yourself a crontab entry to call another script which runs through
and execs these files, at the appropriate time, su'd to the appropriate
user.

This should get around your authentication and display problems, and
will also not require you to have root-level processes running scripts
in user directories.

Frankly, I think the whole situation is overkill, but that's me...

   xset dpms 600 900 1200

<g>

On Mon, Feb 28, 2000 at 07:38:16PM -0600, Brad wrote:
> On Mon, Feb 28, 2000 at 09:41:50AM -0800, Carl Johnson wrote:
> > 
> > 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.
> 
> If your system uses the ~/.Xauthority file to hold the X access codes,
> then root can access the X session by simply setting XAUTHORITY to point
> to the .Xauthority file of the user running X. This works because root
> can access any file, no matter what the permissions.
> 
> For example, if user bob is running X and root wants access, this'll do
> it (for the bash shell, the syntax is different for others)
>   # export XAUTHORITY=~bob/.Xauthority DISPLAY=:0
> 
> 
> -- 
>   finger for GPG public key.



-- 
Karsten M. Self (kmself@ix.netcom.com)
    What part of "Gestalt" don't you understand?

SAS for Linux: http://www.netcom.com/~kmself/SAS/SAS4Linux.html
Mailing list:  "subscribe sas-linux" to mailto:majordomo@cranfield.ac.uk


Reply to: