[avahi] Avahi object path in d-bus

Morten Telling Nielsen motenidk at gmail.com
Thu Oct 8 07:53:46 PDT 2009


Hi

I need to connect to Avahi from php via d-bus.
I get the message:

Warning: dbusconnection::sendwithreplyandblock():
dbus_connection_send_with_reply_and_block() failed (Launch helper exited
with unknown return code 255) in
....

When executing:

$m = new DBusMessage(DBUS_MESSAGE_TYPE_METHOD_CALL);
$m->setDestination("org.freedesktop.Avahi");
$m->setPath("/org/freedesktop/Avahi");
$m->setInterface("org.freedesktop.Avahi.Server");
$m->setMember("GetHostName");
$m->setAutoStart(true);

$r = $dbus->sendWithReplyAndBlock($m,3);

What is the correct object path Avahi(Server) is registered under, I get
the same error with different pathes
including /org/freedesktop/Avahi/Server .
I set the property 'enable-dbus=yes' in avahi-daemon.conf, and I have
created a .service file
/usr/share/dbus-1/services/org.freedesktop.Avahi.service
contaning:

[D-BUS Service]
Name=org.freedesktop.Avahi
Exec=/usr/sbin/avahi-daemon
User=root

It solved the problem of destination, but maybe the problem is there?

Hopefully thanks from Morten Telling Nielsen.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/avahi/attachments/20091008/92f91413/attachment.htm 


More information about the avahi mailing list