I have the following two lines in my crontab:
0 5 * * 1-5 DISPLAY=:0 amarok -p
45 6 * * 1-5 DISPLAY=:0 qdbus org.ktorrent.ktorrent /core org.ktorrent.core.setSuspended false > /dev/null
Both commands work when I enter them in the terminal (with the "DISPLAY=:0" part removed). None or the commands work from crontab. The first one (amarok) gives the following mailed to me:
unnamed app(9705): KUniqueApplication: Cannot find the D-Bus session server: "/bin/dbus-launch terminated abnormally with the following error: No protocol specified
Autolaunch error: X11 initialization failed.
"
unnamed app(9685): KUniqueApplication: Pipe closed unexpectedly.
The second one (ktorrent) gives this:
Could not connect to D-Bus server: org.freedesktop.DBus.Error.Spawn.ExecFailed: /bin/dbus-launch terminated abnormally with the following error: No protocol specified
Autolaunch error: X11 initialization failed.
Quote:
0 5 * * 1-5 DISPLAY=:0 amarok -p
45 6 * * 1-5 DISPLAY=:0 qdbus org.ktorrent.ktorrent /core org.ktorrent.core.setSuspended false > /dev/null
Quote:
unnamed app(9705): KUniqueApplication: Cannot find the D-Bus session server: "/bin/dbus-launch terminated abnormally with the following error: No protocol specified
Autolaunch error: X11 initialization failed.
"
unnamed app(9685): KUniqueApplication: Pipe closed unexpectedly.
Quote:
Could not connect to D-Bus server: org.freedesktop.DBus.Error.Spawn.ExecFailed: /bin/dbus-launch terminated abnormally with the following error: No protocol specified
Autolaunch error: X11 initialization failed.