On 8/22/14 12:41 PM, Marko Käning wrote: > Hi guys, > > how can I determine the dbus address of the session dbus started by launchd? > > The environment contains only DBUS_LAUNCHD_SESSION_BUS_SOCKET: > — > DBUS_LAUNCHD_SESSION_BUS_SOCKET=/tmp/launch-adIO4f/unix_domain_listener > > — > > So, the question is, can I query the session dbus somehow in order to obtain > the dbus address which I could then use to set DBUS_SESSION_BUS_ADDRESS in > my environment? Marko,
You can form the DBUS_SESSION_BUS_ADDRESS as follows: export DBUS_SESSION_BUS_ADDRESS='unix:path='$DBUS_LAUNCHD_SESSION_BUS_SOCKET or, in your case, unix:path=/tmp/launch-adIO4f/unix_domain_listener The usual way to get the session bus address programatically is to the GDBus API provided by GIO in glib2. In MacPorts, this has been patched to work as I have described. See the definition of get_session_address_macports_specific (GError **error) in files/patch-get-launchd-dbus-session-address.diff. Dave _______________________________________________ macports-dev mailing list [email protected] https://lists.macosforge.org/mailman/listinfo/macports-dev
