[gdm] server: get X tty from consolekit if not with with systemd



commit ac435f3d46dcc799a3ce16438e664d89278597a6
Author: Ray Strode <rstrode redhat com>
Date:   Mon Mar 19 17:54:21 2012 -0400

    server: get X tty from consolekit if not with with systemd
    
    commit 932c65c66d2 changed the code to return NULL for the X
    tty when building with systemd.  This is because systemd
    does tty handling on its own.
    
    It's not sufficient to be built with support for systemd, though,
    we also need to have booted with systemd.
    
    Found by ioni.

 daemon/gdm-server.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/daemon/gdm-server.c b/daemon/gdm-server.c
index 6d2d6cd..4bbc3cc 100644
--- a/daemon/gdm-server.c
+++ b/daemon/gdm-server.c
@@ -166,8 +166,10 @@ char *
 gdm_server_get_display_device (GdmServer *server)
 {
 #ifdef WITH_SYSTEMD
-        /* systemd finds the display device out on its own based on the display */
-        return NULL;
+        if (sd_booted () > 0) {
+                /* systemd finds the display device out on its own based on the display */
+                return NULL;
+        }
 #endif
 
 #ifndef WITH_CONSOLE_KIT



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