If I compile and install a program that installs a .service file so that it can be autostarted by dbus, it is not included in the result of a subsequent call to org.freedesktop.DBus.ListActivatableNames until I either call org.freedesktop.DBus.ReloadConfig or restart the dbus daemon.
What platform are you on and did you enable dnotify, inotify or kqueue for monitoring directory changes?
Or rather does your platform compile d-bus with one of those features enabled?
I'm running Debian Linux unstable (on AMD64 platform), using stock distribution packages. From looking at the buildd logs, it looks like the package is build with the following ./configure flags: /build/buildd/dbus-1.2.16/./configure --build=x86_64-linux-gnu --prefix=/usr --includedir="\${prefix}/include" --mandir="\${prefix}/share/man" --infodir="\${prefix}/share/info" --sysconfdir=/etc --localstatedir=/var --libexecdir="\${prefix}/lib/dbus-1.0" --disable-maintainer-mode --disable-dependency-tracking --srcdir=. --enable-xml-docs --enable-doxygen-docs If there's any more information I can provide, please let me know.
Debian appears to run ./configure with no special arguments (regarding inotify etc. at least), which in practice results in inotify being chosen on Linux: e.g. <https://buildd.debian.org/fetch.cgi?&pkg=dbus&ver=1.2.16-2&arch=amd64&stamp=1247704719&file=log>, <https://buildd.debian.org/fetch.cgi?&pkg=dbus&ver=1.2.1-3&arch=i386&stamp=1217461701&file=log> (reached from <https://buildd.debian.org/pkg.cgi?pkg=dbus>)
Yes, this is a bug it appears; we need to call get_servicedirs in bus.c and add them to the monitored directories.
Created attachment 33400 [details] [review] monitor service directories for changes Tested manually; adding infrastructure to this kind of thing to the test suite would be useful but a little nontrivial.
Comment on attachment 33400 [details] [review] monitor service directories for changes This looks fine to me! (Modulo inotify_add_watch() not being documented to raise ENOENT if the target doesn't exist, but I'm quite happy to believe that it does.)
Already fixed: Colin seems to have committed this before 1.2.22.
*** Bug 23921 has been marked as a duplicate of this bug. ***
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.