From a4cd87e9dce6d38846f23d44df9e21f322f946df Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 5 Feb 2014 20:34:11 +0100 Subject: man: introduce new "Desktop" property for sessions This is initialized from XDG_SESSION_DESKTOP and is useful for GNOME to recognize its own sessions. It's supposed to be set to a short string identifying the session, such as "kde" or "gnome". --- src/login/logind-session.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/login/logind-session.c') diff --git a/src/login/logind-session.c b/src/login/logind-session.c index 4f3259ca7c..ca2e48570c 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -143,6 +143,7 @@ void session_free(Session *s) { free(s->remote_host); free(s->remote_user); free(s->service); + free(s->desktop); hashmap_remove(s->manager->sessions, s->id); @@ -229,6 +230,9 @@ int session_save(Session *s) { if (s->service) fprintf(f, "SERVICE=%s\n", s->service); + if (s->desktop) + fprintf(f, "DESKTOP=%s\n", s->desktop); + if (s->seat && seat_has_vts(s->seat)) fprintf(f, "VTNR=%u\n", s->vtnr); @@ -294,6 +298,7 @@ int session_load(Session *s) { "REMOTE_HOST", &s->remote_host, "REMOTE_USER", &s->remote_user, "SERVICE", &s->service, + "DESKTOP", &s->desktop, "VTNR", &vtnr, "POS", &pos, "LEADER", &leader, -- cgit v1.2.3-54-g00ecf