DCOP calls and cron

Daniel Pittman daniel at rimspace.net
Sun Feb 18 23:41:09 UTC 2007

Tez <binary_y2k2 at blueyonder.co.uk> writes:
> Thomas Olsen wrote:
>> I have made a small script - basically a one-liner - to fetch the
>> daily Doonesbury strip and set it as my desktop background.  When I
>> run it from the cli it works ok but when it is run from a cron job it
>> doesn't change the background.


> Because the script is run as root (default for cron) 

No, it isn't.  Cron runs scripts as the appropriate user -- root, tol,
whoever.  It does not "default" to "run as root."

If this script was in the global crontab area (/etc/cron.*;
/etc/crontab) it would run as one of root or the appropriately defined

If, as normal, the original poster had edited his crontab with 
'crontab -e' this would run under his user identity.

I have no idea how you came to the conclusion that cron defaults to
running anything as root; it simply isn't even vaguely true.

Digital Infrastructure Solutions -- making IT simple, stable and secure
Phone: 0401 155 707        email: contact at digital-infrastructure.com.au

More information about the kubuntu-users mailing list