[gdm] session: don't set DISPLAY for sessions that bring their own



commit ce40d34d71beb5e946b5f424cd53a181ff831c59
Author: Ray Strode <rstrode redhat com>
Date:   Mon Apr 7 14:22:10 2014 -0400

    session: don't set DISPLAY for sessions that bring their own
    
    We only want to set DISPLAY if the user session is sharing the display
    with the login screen.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=728204

 daemon/gdm-session.c |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index 805072b..50014c0 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -2319,6 +2319,7 @@ set_up_session_language (GdmSession *self)
 static void
 set_up_session_environment (GdmSession *self)
 {
+        GdmSessionDisplayMode display_mode;
         gchar *desktop_names;
 
         gdm_session_set_environment_variable (self,
@@ -2338,14 +2339,17 @@ set_up_session_environment (GdmSession *self)
 
         set_up_session_language (self);
 
-        gdm_session_set_environment_variable (self,
-                                              "DISPLAY",
-                                              self->priv->display_name);
-
-        if (self->priv->user_x11_authority_file != NULL) {
+        display_mode = gdm_session_get_display_mode (self);
+        if (display_mode == GDM_SESSION_DISPLAY_MODE_REUSE_VT) {
                 gdm_session_set_environment_variable (self,
-                                                      "XAUTHORITY",
-                                                      self->priv->user_x11_authority_file);
+                                                      "DISPLAY",
+                                                      self->priv->display_name);
+
+                if (self->priv->user_x11_authority_file != NULL) {
+                        gdm_session_set_environment_variable (self,
+                                                              "XAUTHORITY",
+                                                              self->priv->user_x11_authority_file);
+                }
         }
 
         if (g_getenv ("WINDOWPATH") != NULL) {


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