godbus / dbus

Native Go bindings for D-Bus
BSD 2-Clause "Simplified" License
976 stars 225 forks source link

Use the default fallback path for the session bus #372

Open WhyNotHugo opened 1 year ago

WhyNotHugo commented 1 year ago

If DBUS_SESSION_BUS_ADDRESS is unset, then $XDG_RUNTIME_DIR/bus should be used.

This is currently a de-facto standard done by most libraries, but is being amended into the spec itself.

Additionally, the current fallback uses dbus-launch. This is not a good idea, since it will create a dedicated bus for this application which can't be discovered by any other application.