From e81d2086c055c697e2f3138529deaba112281f93 Mon Sep 17 00:00:00 2001 From: Ryan Walklin Date: Thu, 25 Jun 2020 23:43:28 +1200 Subject: [PATCH] Also set XDG_SESSION_TYPE --- backend/session/logind.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/session/logind.c b/backend/session/logind.c index 317b179f9..4f03e523c 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; }