DCOP calls and cron
Tez
binary_y2k2 at blueyonder.co.uk
Tue Feb 20 15:22:01 UTC 2007
Daniel Pittman wrote:
> 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
> user.
>
> 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.
>
> Regards,
> Daniel
>
Sorry, I did assume that you were using the system crontab,
but then you know what they say about assuming :)
Tez
More information about the kubuntu-users
mailing list