User Crontab is outside of GUI session

Reported by Martin Owens on 2009-02-09
This bug affects 3 people
Affects Status Importance Assigned to Milestone
cron (Ubuntu)

Bug Description

When trying to execute programs that require variables from the GUI session. the crontab fails. It can no longer execute tasks which relate to editing gnome gconf or any other session settings.

I believe this is because the crontab is outside of the gnome session. There are two possible fixes, 1) Somehow allow the system cron to access session variables when users are logged in, 2) Create a special cron which runs when users log in.

C. Cooke (ccooke) wrote :


It is actually possible for programs run from cron to acquire settings from the GUI; it's just rather arcane and tricky to make it reliable. Making it automatic would be possible, but probably require some additional work.

If you just want something that will work *NOW*, you can find directions here: http://ubuntuforums.org/archive/index.php/t-105250.html - note that this will fail randomly if you have more than one user logged in (or in any case where you're the not the first person to log in).

Thank you for taking the time to make Ubuntu better. Since what you submitted is not really a bug, or a problem, but rather an idea to improve Ubuntu, you are invited to post your idea in Ubuntu Brainstorm at https://brainstorm.ubuntu.com/ where it can be discussed, voted by the community and reviewed by developers. Thanks for taking the time to share your opinion!

Changed in cron:
status: New → Invalid
Martin Owens (doctormo) wrote :

That's a toxic work around, this bug should stay open until the actual problem is properly fixed.

I disagree with your assessment that this problem is an idea, the inability to modify gconf via cron is a bug. It's never been a part of the design of cron to be denied access to vital user space configuration based on some misconstrued security model. This bug was inconceivable, not inappropriate.

Changed in cron:
status: Invalid → New
crysys (crysysone) wrote :

This is the same issue as +bug/94933 and +bug/113988 from 2007 only with an added ACL issue. I disagree that this is only a feature request, this behavior used to be made to work by forcing the setting of $DISPLAY and was broken again, this time by the X ACL(access control list). It can again be kludged to work by adding 'xhost +local:' to your ~/.xprofile but this just introduces another secuity hole.

So fixing a security upgrade that forces the punching of a security hole to regain cron function at the GUI is an idea? Sounds like a bug to me.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers