aboutsummaryrefslogtreecommitdiff
path: root/backend/session/logind.c
diff options
context:
space:
mode:
authorRyan Walklin <ryan@testtoast.com>2020-06-25 23:43:28 +1200
committerSimon Ser <contact@emersion.fr>2020-08-07 19:15:25 +0200
commite81d2086c055c697e2f3138529deaba112281f93 (patch)
tree71e1163b2ee626b10f4364ab4b4c2af3c8b8ec8f /backend/session/logind.c
parentf0d03fb8921b79c776d0fe9abedced78302c3c06 (diff)
Also set XDG_SESSION_TYPE
Diffstat (limited to 'backend/session/logind.c')
-rw-r--r--backend/session/logind.c8
1 files changed, 7 insertions, 1 deletions
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;
}