User Crontab is outside of GUI session

Bug #327190 reported by Martin Owens
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
cron (Ubuntu)
Invalid
Undecided
Unassigned

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.

Revision history for this message
C. Cooke (ccooke) wrote :

Hi,

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
Revision history for this message
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
Revision history for this message
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.

Revision history for this message
Christian Kastner (ckk) wrote :

cron jobs are started by the cron daemon which is completely unrelated to your GUI session, or any other session that might be active for the user.

As ccooke pointed out, if you want access to an unrelated session, you're going to have to do it manually.

Changed in cron (Ubuntu):
status: New → Opinion
status: Opinion → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.