Closed acid-bong closed 1 year ago
Looks like a D-Bus connection issue since the mpd connection seems okay. Do your system have /run/user/$UID/bus
socket?
No, my dbus socket is /tmp/dbus-<alphanum>
, and I'm not starting my window manager (dwm) with dbus-launch
or dbus-run-session
, so that the $DBUS_SESSION_BUS_ADDRESS isn't in the environment.
Then that should be the root of the issue. The library this program's using (zbus) reads $DBUS_SESSION_BUS_ADDRESS
and fall backs to $XDG_RUNTIME_DIR/bus
if that doesn't exists. (See https://docs.rs/zbus/latest/zbus/enum.Address.html#method.session)
I guess I can add a feature to manually specify the bus address. What do you think?
Better not, since $DBUS_SESSION_BUS_ADDRESS
isn't always XDG_RUNTIME_DIR/bus
and (at least by running dbus-launch) it creates a socket in /tmp
. I think you should clarify in README that such a variable needs to be exposed.
Also I started my sx (using it instead of xinit) with dbus-launch --exit-with-session
, and the mpdris caught on well
True. I've added some doc about it (b97dc57) and improved the error reporting when session bus doesn't exist (b8f1f6c).
Running the app instantly gives an error:
Here's the output with verbosity level 1 and 2 (ignore the ANSI color codes around the first words)
Rust version: 1.67.1