summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2013-10-03 21:08:49 +0200
committerStefano Karapetsas <[email protected]>2014-01-14 11:08:30 +0100
commit0ed38f18bb637d9a78fd4236b32f67a9b0e2b94d (patch)
tree9434f058366cf0590415995010d6c0923c4f3fd3
parente555ec732dc3ce7dfbd26b23eb22f9a1d1c4d2ca (diff)
downloadmate-screensaver-0ed38f18bb637d9a78fd4236b32f67a9b0e2b94d.tar.bz2
mate-screensaver-0ed38f18bb637d9a78fd4236b32f67a9b0e2b94d.tar.xz
Check for logind, not for systemd
-rw-r--r--configure.ac2
-rw-r--r--src/gs-listener-dbus.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 8ff7281..bf7901a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -921,7 +921,7 @@ AC_ARG_WITH(systemd,
[with_systemd=$withval], [with_systemd=auto])
PKG_CHECK_MODULES(SYSTEMD,
- [libsystemd-login libsystemd-daemon],
+ [libsystemd-login],
[have_systemd=yes], [have_systemd=no])
if test "x$with_systemd" = "xauto" ; then
diff --git a/src/gs-listener-dbus.c b/src/gs-listener-dbus.c
index e7b6c1d..dcccc33 100644
--- a/src/gs-listener-dbus.c
+++ b/src/gs-listener-dbus.c
@@ -25,6 +25,7 @@
#include <stdio.h>
#include <time.h>
#include <string.h>
+#include <unistd.h>
#include <glib/gi18n.h>
@@ -33,7 +34,6 @@
#include <dbus/dbus-glib-lowlevel.h>
#ifdef WITH_SYSTEMD
-#include <systemd/sd-daemon.h>
#include <systemd/sd-login.h>
#endif
@@ -2426,7 +2426,8 @@ gs_listener_init (GSListener *listener)
listener->priv = GS_LISTENER_GET_PRIVATE (listener);
#ifdef WITH_SYSTEMD
- listener->priv->have_systemd = sd_booted () > 0;
+ /* check if logind is running */
+ listener->priv->have_systemd = (access("/run/systemd/seats/", F_OK) >= 0);
#endif
gs_listener_dbus_init (listener);