summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2013-09-09 03:51:43 +0000
committerTarmac <>2013-09-09 03:51:43 +0000
commit0cee8ebd3d73f0e376fe861f8edde05ea923764e (patch)
tree37751824add83cc01495fab8bb2b3dfc67dfb2a7
parent024ce2ffac13b48ec2d65ecac991746653f441c2 (diff)
parent0eede968d6938a29e60a503c1fdfc1f3112e07ba (diff)
downloadlightdm-0cee8ebd3d73f0e376fe861f8edde05ea923764e.tar.gz
Set XDG_CURRENT_DESKTOP for login sessions. Fixes: https://bugs.launchpad.net/bugs/1221803.
Approved by Robert Ancell, PS Jenkins bot.
-rw-r--r--src/seat.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/seat.c b/src/seat.c
index 714fe099..42b8d6ab 100644
--- a/src/seat.c
+++ b/src/seat.c
@@ -929,7 +929,7 @@ static gboolean
greeter_start_session_cb (Greeter *greeter, SessionType type, const gchar *session_name, Seat *seat)
{
Session *session, *existing_session;
- const gchar *username, *language = NULL;
+ const gchar *username, *desktop_name, *language = NULL;
SessionConfig *session_config;
User *user;
gchar *sessions_dir = NULL;
@@ -1003,6 +1003,9 @@ greeter_start_session_cb (Greeter *greeter, SessionType type, const gchar *sessi
g_strfreev (argv);
session_set_env (session, "DESKTOP_SESSION", session_name);
session_set_env (session, "GDMSESSION", session_name);
+ desktop_name = session_config_get_desktop_name (session_config);
+ if (desktop_name)
+ session_set_env (session, "XDG_CURRENT_DESKTOP", desktop_name);
if (language && language[0] != '\0')
{
session_set_env (session, "LANG", language);