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

main: Update D-Bus activation environment also on non-systemd systems #1038

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

vadorovsky
Copy link
Contributor

On systems without systemd, use zbus to update D-Bus activation environment with WAYLAND_DISPLAY and DISPLAY variables.

Fixes #1037

On systems without systemd, use zbus to update D-Bus activation
environment with `WAYLAND_DISPLAY` and `DISPLAY` variables.

Fixes pop-os#1037
if let state::BackendData::Kms(_) = &self.backend {
#[cfg(feature = "systemd")]
systemd::ready(&self.common);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking about replacing the systemd::ready entirely with dbus::ready, I think that should work as well. What's good about the dbus solution is not calling external binaries. For now I didn't remove systemd::ready in case you consider that too intrusive. I would love to hear your thoughts here.

What I can confirm is that this patch fixes flatpak Steam on my Gentoo+openrc installation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The systemd environment is still something separate from the dbus environment, the dbus-broker just happens to import it on systems with systemd.

Just updating the dbus activation environment would this break e.g. systemd user services. I think this is a sensible solution. If calling external binaries would really be a problem, we could also trigger the systemd interface via dbus, but given this is a one time startup thing, I wouldn't bother.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thanks!

Copy link
Member

@Drakulix Drakulix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

if let state::BackendData::Kms(_) = &self.backend {
#[cfg(feature = "systemd")]
systemd::ready(&self.common);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The systemd environment is still something separate from the dbus environment, the dbus-broker just happens to import it on systems with systemd.

Just updating the dbus activation environment would this break e.g. systemd user services. I think this is a sensible solution. If calling external binaries would really be a problem, we could also trigger the systemd interface via dbus, but given this is a one time startup thing, I wouldn't bother.

@Drakulix Drakulix merged commit 9b50d0f into pop-os:master Dec 9, 2024
1 check passed
@vadorovsky vadorovsky deleted the dbus-activation-without-systemd branch December 9, 2024 22:27
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

Successfully merging this pull request may close these issues.

DISPLAY is not provided to the D-Bus activation environment (without systemd)
2 participants