summaryrefslogtreecommitdiff
path: root/src/login/loginctl.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-02-05 20:34:11 +0100
committerLennart Poettering <lennart@poettering.net>2014-02-05 20:44:49 +0100
commita4cd87e9dce6d38846f23d44df9e21f322f946df (patch)
tree9b5be9e173216b28e63150b1f89ceb18c308abe1 /src/login/loginctl.c
parent49ebd11fb0ea6af249990439bf0690641e8be559 (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/loginctl.c')
-rw-r--r--src/login/loginctl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/login/loginctl.c b/src/login/loginctl.c
index 6900253b0d..ebe9c1f16c 100644
--- a/src/login/loginctl.c
+++ b/src/login/loginctl.c
@@ -271,6 +271,7 @@ typedef struct SessionStatusInfo {
const char *class;
const char *state;
const char *scope;
+ const char *desktop;
} SessionStatusInfo;
typedef struct UserStatusInfo {
@@ -363,6 +364,7 @@ static int print_session_status_info(sd_bus *bus, const char *path, bool *new_li
{ "RemoteHost", "s", NULL, offsetof(SessionStatusInfo, remote_host) },
{ "RemoteUser", "s", NULL, offsetof(SessionStatusInfo, remote_user) },
{ "Service", "s", NULL, offsetof(SessionStatusInfo, service) },
+ { "Desktop", "s", NULL, offsetof(SessionStatusInfo, desktop) },
{ "Type", "s", NULL, offsetof(SessionStatusInfo, type) },
{ "Class", "s", NULL, offsetof(SessionStatusInfo, class) },
{ "Scope", "s", NULL, offsetof(SessionStatusInfo, scope) },
@@ -462,6 +464,9 @@ static int print_session_status_info(sd_bus *bus, const char *path, bool *new_li
} else if (i.class)
printf("\t Class: %s\n", i.class);
+ if (!isempty(i.desktop))
+ printf("\t Desktop: %s\n", i.desktop);
+
if (i.state)
printf("\t State: %s\n", i.state);