D-Bus is killing me

Kalle Vahlman kalle.vahlman at gmail.com
Sun Dec 17 10:32:33 PST 2006


2006/12/17, Mystilleef <mystilleef at gmail.com>:
> 2). Doesn't like Root and I don't know why.
>
> My application won't run as root because of D-Bus. I get this cryptic
> error message everytime I attempt to run it as root:
> ------------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/usr/bin/scribes", line 40, in ?
>     main(argv[1:])
>   File "/usr/lib/python2.4/site-packages/SCRIBES/dbusmain.py", line 53, in main
>     from info import dbus_iface
>   File "/usr/lib/python2.4/site-packages/SCRIBES/info.py", line 32, in ?
>     session_bus = SessionBus()
>   File "//usr/lib/python2.4/site-packages/dbus/_dbus.py", line 266, in __new__
>     return Bus.__new__(cls, Bus.TYPE_SESSION, use_default_mainloop, private)
>   File "//usr/lib/python2.4/site-packages/dbus/_dbus.py", line 99, in __new__
>     bus._connection = dbus_bindings.bus_get(bus_type, private)
>   File "dbus_bindings.pyx", line 1692, in dbus_bindings.bus_get
> dbus_bindings.DBusException: Did not receive a reply. Possible causes
> include: the remote application did not send a reply, the message bus
> security policy blocked the reply, the reply timeout expired, or the
> network connection was broken.
> ------------------------------------------------------------------------
> Can someone enlighten this n00b as to what that means, or what I'm
> doing wrong?

My bet would be that root doesn't have a session bus a) running b)
address exported to the environment. If those are not the issue, then
I have no idea.

> 3). D-Bus Isn't re-entrant.
>
> Because D-Bus isn't re-entrant, I have to split my application into
> a client-server model. The server exposes public methods and signals,
> while the client calls them. This means my application has to maintain
> two processes.

Is there a particular reason you need to use D-Bus for the internal
API? Given all the pain it causes, implementing an internal API that
both the public D-Bus interface and the client functionality uses
sounds like a good idea (but then again, I only saw the difficulties
in this message, not the goals...).

-- 
Kalle Vahlman, zuh at iki.fi
Powered by http://movial.fi
Interesting stuff at http://syslog.movial.fi


More information about the dbus mailing list