3

Is there a convenient or canonical way to find the address of every session bus currently running?

3

Technically there isn't a reliable/official way to know whether a socket address corresponds to a DBUS session bus or not because the naming scheme for DBUS session bus addresses is private to the implementation: you're only supposed to launch dbus-daemon and opaquely use the address it chooses for itself. However, I can observe on my system that dbus-daemon appears to always use bus addresses of the same form. So something like this should do it:

netstat -an | grep @/tmp/dbus- | awk '{ print $NF }' | sort | uniq

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.