Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle missing DBUS_SESSION_BUS_ADDRESS #45

Closed
rnhmjoj opened this issue Mar 26, 2020 · 7 comments
Closed

Handle missing DBUS_SESSION_BUS_ADDRESS #45

rnhmjoj opened this issue Mar 26, 2020 · 7 comments

Comments

@rnhmjoj
Copy link

rnhmjoj commented Mar 26, 2020

It appears systemd and dbus are moving away from setting DBUS_SESSION_BUS_ADDRESS by default. It was actually removed for some time but it had to be reintroduced because many software still rely on it.

Could you handle the case when it's not set?

@rblaze
Copy link
Owner

rblaze commented Mar 26, 2020

What's the best way to test this?

@rblaze
Copy link
Owner

rblaze commented Mar 26, 2020

Disregard this, I understand the issue now.

connectSession will fail without this env variable. connectSystem will fallback to unix:path=/var/run/dbus/system_bus_socket.

@rblaze
Copy link
Owner

rblaze commented Mar 26, 2020

It's up to app developers to handle errors, use dbus-launch or connect to a specific address using connect function. Nothing that library should do by itself.

@rblaze rblaze closed this as completed Mar 26, 2020
@rnhmjoj
Copy link
Author

rnhmjoj commented Mar 26, 2020

It's up to app developers to handle errors

But should connectSession throw an error here? I think it should try connecting to the default socket XDG_RUNTIME_DIR/bus before giving up.

@rblaze
Copy link
Owner

rblaze commented Mar 26, 2020

Good point, I'll add a fallback.

@rblaze rblaze reopened this Mar 26, 2020
@rblaze
Copy link
Owner

rblaze commented Mar 29, 2020

Fixed in 8098692, dbus-1.2.13 published

@rblaze rblaze closed this as completed Mar 29, 2020
@rnhmjoj
Copy link
Author

rnhmjoj commented Mar 29, 2020

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants