death / dbus

A D-BUS client library for Common Lisp
BSD 2-Clause "Simplified" License
44 stars 29 forks source link

D-Bus Server Address macOS #24

Open jmercouris opened 5 years ago

jmercouris commented 5 years ago

When connecting the following is assumed:

(defun session-server-addresses ()
  "Return a list of server addresses for the current session."
  (when-let (string (getenv "DBUS_SESSION_BUS_ADDRESS"))
    (parse-server-addresses-string string)))

on macOS however, particularly D-Bus installed via MacPorts, that information is obtained in the following way:

export DBUS_SESSION_BUS_ADDRESS "unix:path=$DBUS_LAUNCHD_SESSION_BUS_SOCKET"

I therefore suggest to also check the DBUS_LAUNCHD_SESSION_BUS_SOCKET. Do you think this makes sense, or should be handled by the user?