Hiya, Just so you are aware, the DBus introspection support is still only in git master. While it will be part of the upcoming 1.0 release, it will still not be advertised as "stable" and will be subject to changes as new releases are made. For this reason, you should be aware that you may need to update code as we move forward. 'Twas brillig, and Zheng, Huan at 07/06/11 01:03 did gyre and gimble: > I want to use the server look up service of PulseAudio to find the > dbus-socket address, below is the **correct** python script, I copied > below just want to let you know what exactly I want ... > After system boot up, I can not access org.PulseAudio1 service, error > ?org.freedesktop./DBus/.Error.ServiceUnknown? is reported. > > This could be proved by using the following command: > > dbus-send --session --print-reply --reply-timeout=2000 > --type=method_call --dest=org.freedesktop.DBus /org/freedesktop/DBus > org.freedesktop.DBus.ListNames > > > > the output is > > method return sender=org.freedesktop.DBus -> dest=:1.0 reply_serial=2 > array [ > string "org.freedesktop.DBus" > string ":1.0" > ] > > Apparently, org.PulseAudio1 service is not available. Interesting. > Here comes the weird thing, if I kill pulseaudio and restart it. > org.PulseAudio1 service becomes available, and I could get address using > previous python script. > > The output is: > > method return sender=org.freedesktop.DBus -> dest=:1.2 reply_serial=2 > > array [ > string "org.freedesktop.DBus" > string "org.freedesktop.ReserveDevice1.Audio0" > string "org.pulseaudio.Server" > string "org.PulseAudio1" > string ":1.1" > string ":1.2" > ] > > > > FYI: > > 1, When system boot up, pulseaudio start up is invoked in XDG autostart > folder. > > 2, The log indicates ?D: main.c: Got org.PulseAudio1!? ?D: main.c: Got > org.pulseaudio.Server!?, which means, register_dbus_name(c, > DBUS_BUS_SESSION, "org.PulseAudio1") and register_dbus_name(c, > conf->system_instance ? DBUS_BUS_SYSTEM : DBUS_BUS_SESSION, > "org.pulseaudio.Server") all succeeded. > > 3, before pulseaudio start, dbus-daemon already started. There?s a > ?dbus-daemon --fork --session --print-pid 9 --print-address 11? running > in system which has a pid number less than pulseaudio Just because the pid number is less, it doesn't mean it was fully started and ready by the time PA tried to use it. That said, the fact that the above messages were printed in 2) above seem to suggest that things at least started up OK. > Question: the root cause on the surface is that if we start pulseaudio > after system fully boot up, then there?s no problem. But what?s the real > root cause? > > And normal user has no capability to restart pulse. I need to make this > service available when system boot up. > > If you reached here, thanks a lot for your patience, please give me some > hints. :) I'm not 100% sure as I'm not familiar with the DBus code. Hopefully Tanu can answer with more authority when he gets a moment. Cheers Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mageia Contributor [http://www.mageia.org/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/]