diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-02-05 20:34:11 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-02-05 20:44:49 +0100 |
commit | a4cd87e9dce6d38846f23d44df9e21f322f946df (patch) | |
tree | 9b5be9e173216b28e63150b1f89ceb18c308abe1 /src/login/logind-session.c | |
parent | 49ebd11fb0ea6af249990439bf0690641e8be559 (diff) |
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".
Diffstat (limited to 'src/login/logind-session.c')
-rw-r--r-- | src/login/logind-session.c | 5 |
1 files changed, 5 insertions, 0 deletions
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, |