diff --git a/backend/session/logind.c b/backend/session/logind.c index 317b179f..4f03e523 100644 --- a/backend/session/logind.c +++ b/backend/session/logind.c @@ -250,12 +250,18 @@ static bool set_type(struct logind_session *session) { session->path, "org.freedesktop.login1.Session", "SetType", &error, &msg, "s", "wayland"); if (ret < 0) { - wlr_log(WLR_ERROR, "Failed to set session type for session: %s", + wlr_log(WLR_ERROR, "Failed to set logind session type for session: %s", error.message); } sd_bus_error_free(&error); sd_bus_message_unref(msg); + + ret = setenv("XDG_SESSION_TYPE", "wayland", 1); + if (ret < 0) { + wlr_log(WLR_ERROR, "Failed to set XDG_SESSION_TYPE for session"); + } + return ret >= 0; }