cron/dbus problem?

Jeffrey C. Ollie jeff at ocjtech.us
Mon Feb 13 16:58:32 UTC 2006


On Mon, 2006-02-13 at 16:08 +0100, Dennis Jacobfeuerborn wrote:
> Jeffrey C. Ollie wrote:
> > On Mon, 2006-02-13 at 15:13 +0100, Dennis Jacobfeuerborn wrote:
> >> Does anyone have an idea why the session bus seems to be available from a 
> >> regular shell but not from cron?
> > 
> > Because the environment variable "DBUS_SESSION_BUS_ADDRESS" is set in a
> > regular shell, but not from cron.
> 
> Shouldn't this be considered a bug?

I don't think so.  The session bus is meant to be used by programs
started from the current console session.  Programs started from cron
aren't part of the current console session.  In fact, there may not even
*be* a session when cron runs your program.

>  What I was trying to do doesn't seem 
> like a weird use case so I believe it should be possible to use DBus from 
> cron like that.

I think that the developers have indicated that the solution is to
create some sort of proxy.  I haven't done any developing with DBus but
I would think that it would be relatively easy to write a little process
that listens to both the system bus and the session bus and proxies
messages between them.  Depending on the messages you want to send
SELinux might get in your way, but that's not an insurmountable problem.

Jeff

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/fedora-devel-list/attachments/20060213/98eadb4f/attachment.sig>


More information about the fedora-devel-list mailing list