Bug 340002

Summary: kcron is not able to launch x applications
Product: [Applications] kcron Reporter: illumilore <illumilore>
Component: generalAssignee: Gary Meyer <gary>
Status: RESOLVED FIXED    
Severity: normal CC: cfeck
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description illumilore 2014-10-15 18:43:39 UTC
When trying to use kcron to launch x-applications like zenity, it never works, instead errors occur:
Unable to init server: Could not connect: Connection refused
(zenity:5954): Gtk-WARNING **: cannot open display: 

That happens even with exporting the display environment.
Instead, kcron should have an option for x applications like gnome-schedule does.

Reproducible: Always
Comment 1 Christoph Feck 2014-10-16 22:07:31 UTC
Is this different from bug 292526?
Comment 2 Christoph Feck 2014-11-01 20:47:21 UTC
Also check if you need to use xhost to give permissions to connect to the X server, see http://ubuntuforums.org/archive/index.php/t-105250.html and https://wiki.archlinux.org/index.php/Cron#Running_X.org_server-based_applications
Comment 3 Christoph Feck 2014-11-16 16:30:19 UTC
If you can provide the information requested in comment #2, please add it.
Comment 4 illumilore 2014-11-16 19:03:23 UTC
Previously, I had used gnome-schedule instead, since that has a user friendly option for X related commands that would then just use a python wrapper to launch it. It would be nice for kcron to allow for that "uses X" toggle for better user friendliness. 

Anyway, the issue seems fixed in opensuse 13.2, as "env DISPLAY=:0 zenity --info" is now working for me.