emersion / basu

The sd-bus library, extracted from systemd
59 stars 8 forks source link

dbus system bus default address might differ from currently hardcoded path #30

Closed TimB87 closed 3 years ago

TimB87 commented 3 years ago

Hi Simon,

this is based upon our chat earlier today.

Basically, my problem was that I was unable to get basu to run on my system CRUX 3.6. The error was:

<27>(../basu-6b339972e848975aa0ef9caf0e65266f902823a5/src/busctl/busctl.c:138) Failed to connect to bus: No such file or directory

This seems to be because basu has a hardcoded path for the system socket (output generated by strace):

connect(3, {sa_family=AF_UNIX, sun_path="/run/dbus/system_bus_socket"}, 30) = -1 ENOENT (No such file or directory)

It's hardcoded here and for testing here

Problem seems to be that CRUX compiles dbus to use the "deprecated" /var path (see here), while dbus uses some logic to generate it's default config, see here.

I tested changing the path locally in a git checkout and it worked just fine after that :)