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



commit f3840b42f4dc0f0783ad3697c7d53064067b4424
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 4d7ecc9..c300168 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -2316,6 +2316,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,
@@ -2335,14 +2336,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]