From 857317d50d7d44f505a58462a6a5e7ab27d2b0f8 Mon Sep 17 00:00:00 2001 From: Michael Weiser Date: Wed, 8 Jan 2020 23:11:29 +0100 Subject: [PATCH] Fix inhibitor proxying When inhibiting the screensaver using e.g. xfce4-screensaver-command -q, xfce4-screensaver would report an error: org.freedesktop.DBus.Error.ServiceUnknown raised: The name org.freedesktop.login1 was not provided by any .service files Consequently, no inhibitor was added to logind. This was due to the fact that the wrong connection was used for the dbus message and thus logind expected on the session bus. Switching to the system connection to correctly relay the inhibitor to logind. --- src/gs-listener-dbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gs-listener-dbus.c b/src/gs-listener-dbus.c index c501015..babd32e 100644 --- a/src/gs-listener-dbus.c +++ b/src/gs-listener-dbus.c @@ -525,7 +525,7 @@ add_session_inhibit (GSListener *listener, dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &mode); /* FIXME: use async? */ - reply = dbus_connection_send_with_reply_and_block (listener->priv->connection, + reply = dbus_connection_send_with_reply_and_block (listener->priv->system_connection, message, -1, &error); -- 2.24.1