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

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

Fixes #1037
This commit is contained in:
Michal Rostecki 2024-12-08 14:40:52 +01:00 committed by Victoria Brekenfeld
parent 7829e7696d
commit 9b50d0f506
2 changed files with 29 additions and 2 deletions

View file

@ -45,9 +45,13 @@ impl State {
// into systemd and the session?
self.ready.call_once(|| {
// potentially tell systemd we are setup now
#[cfg(feature = "systemd")]
if let state::BackendData::Kms(_) = &self.backend {
#[cfg(feature = "systemd")]
systemd::ready(&self.common);
#[cfg(not(feature = "systemd"))]
if let Err(err) = dbus::ready(&self.common) {
error!(?err, "Failed to update the D-Bus activation environment");
}
}
// potentially tell the session we are setup now