[gnome-session] Set XDG_CURRENT_DESKTOP if unset



commit 1db085ce7e5197b28ab24a3ec54d888efe98fcb4
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Mon May 19 13:01:12 2014 -0400

    Set XDG_CURRENT_DESKTOP if unset
    
    From 3.14 GDM sets XDG_CURRENT_DESKTOP. For compatibility with
    older versions of GDM,  other display managers, and startx,
    set a fallback value if we don't find it set.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=729575

 gnome-session/main.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/gnome-session/main.c b/gnome-session/main.c
index 1625b32..fce5e86 100644
--- a/gnome-session/main.c
+++ b/gnome-session/main.c
@@ -385,6 +385,13 @@ main (int argc, char **argv)
         gdm_log_init ();
         gdm_log_set_debug (debug);
 
+        /* From 3.14 GDM sets XDG_CURRENT_DESKTOP. For compatibility with
+         * older versions of GDM,  other display managers, and startx,
+         * set a fallback value if we don't find it set.
+         */
+        if (g_getenv ("XDG_CURRENT_DESKTOP") == NULL)
+            gsm_util_setenv ("XDG_CURRENT_DESKTOP", "GNOME");
+
         /* Some third-party programs rely on GNOME_DESKTOP_SESSION_ID to
          * detect if GNOME is running. We keep this for compatibility reasons.
          */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]