[gdm/wip/xinit-hack: 2/5] session: don't set DISPLAY for sessions that bring their own



commit 3510435cf85fdc3b257c43b29f3db9a500b14474
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.

 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 eaba548..17ae3fc 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -2308,6 +2308,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,
@@ -2327,14 +2328,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]