Dear list,
Back in 2006, someone wrote the following:
-------------------------------------------------------------------------------------

        * From: Dennis Jacobfeuerborn <d jacobfeuerborn conversis de>
        * To: Development discussions related to Fedora Core <fedora-devel-list 
redhat com>
        * Subject: cron/dbus problem?
        * Date: Mon, 13 Feb 2006 15:13:25 +0100Given the (puzzling) absence of 
an alarm/reminder applet for the gnome panel I tried (ab)using Tomboy for this 
purpose but hit a problem involving Cron and DBus. When I call "tomboy 
--open-note Alarm" the respective notes pops up but when I put the same command 
in the crontab I get this: Unhandled Exception: DBus.DBusException: Unable to 
determine the address of the message bus 
in <0x0009f> DBus.Bus:GetBus (BusType busType)
in <0x00009> DBus.Bus:GetSessionBus ()
in <0x00022> Tomboy.TomboyCommandLine:Execute ()
in <0x00061> Tomboy.Tomboy:Main (System.String[] args)

Does anyone have an idea why the session bus seems to be available from a 
regular shell but not from cron? 
Regards,
  Dennis

--------------------------------------------------------------------------------------

Don't know whether this is of use to anyone faced with the same problem, or to 
help with wider development, but I solved the problem by using the following
 line in a crontab:
* * * * * export DBUS_SESSION_BUS_ADDRESS=`cat "/proc/$(expr substr $(ps -C 
tomboy -o pid=) 1 5)/environ" | tr '\0' '\n' | grep DBUS | cut -d '=' -f2-`; 
tomboy (options)

Sorry if this has all been sorted out by now, but didn't know where to post.

Steve

Send instant messages to your online friends http://uk.messenger.yahoo.com 
-- 
fedora-devel-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/fedora-devel-list

Reply via email to