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

Re: crontab + "xset dpms"



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.

Attachment: pgpjNSwWMV8iY.pgp
Description: PGP signature


Reply to: