Bug 275348

Summary: Task Scheduler not working on local DISPLAY=:0
Product: [Applications] kcron Reporter: Jeffrey <eljefedelito>
Component: generalAssignee: Gary Meyer <gary>
Status: RESOLVED DUPLICATE    
Severity: wishlist CC: eljefedelito
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Debian unstable   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Jeffrey 2011-06-10 16:02:01 UTC
Version:           unspecified (using KDE 4.6.3) 
OS:                Linux

I've perfected a qdbus command which I want to run at 5pm daily; I can run it fine from the command line but when I put it into the Task Scheduler it doesn't do what I need (it doesn't appear to do anything successfully).

#Set Kopete offline at 5pm in case I forget
00 17 * * *      /usr/bin/qdbus org.kde.kopete /Kopete org.kde.Kopete.setOnlineStatus offline

Reproducible: Always

Steps to Reproduce:
Get a qdbus command or perhaps any other command-line command that would interact with a GUI app (including resetting my keyboard with "/usr/bin/setxkbmap -keycodes evdev").  Put the command into Task Scheduler (which puts this into my local crontab), and it doesn't do what I expected.

Actual Results:  
Nothing happens (well, nothing that I can see which would be a successful cron run, although I am sure something does happen somewhere).

Expected Results:  
I'd expect the qdbus command to run successfully and complete the task I've given it; if that requires Task Scheduler to set the DISPLAY variable or anything else  within this crontab entry, please do so.

Thanks for KDE!
Comment 1 Jeffrey 2011-06-16 15:52:14 UTC
This doesn't use DBUS but it too does not work from Cron, although it does work from CLI...

#!/bin/bash
DISPLAY=:0 /usr/bin/amarok -s
DISPLAY=:0 /usr/bin/amarok http://minnesota.publicradio.org/tools/play/streams/news.pls
exit
Comment 2 Christoph Feck 2015-05-16 23:06:50 UTC

*** This bug has been marked as a duplicate of bug 347179 ***