summaryrefslogtreecommitdiff
path: root/daemon/gdm-server.c
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2012-03-19 17:54:21 -0400
committerRay Strode <rstrode@redhat.com>2012-03-19 17:54:21 -0400
commitac435f3d46dcc799a3ce16438e664d89278597a6 (patch)
treecaba5ff777d58e45be2275282e83cde764abdfc9 /daemon/gdm-server.c
parent4a6882eee5d53f52dcbcba7294e86db8ba080f69 (diff)
downloadgdm-ac435f3d46dcc799a3ce16438e664d89278597a6.tar.gz
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.
Diffstat (limited to 'daemon/gdm-server.c')
-rw-r--r--daemon/gdm-server.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/daemon/gdm-server.c b/daemon/gdm-server.c
index 6d2d6cd5..4bbc3cce 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