! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
inhibit: xfce4-screensaver dbus object path wrong
Status:
RESOLVED: FIXED
Product:
Xfce4-power-manager
Component:
General

Comments

Description Michael Weiser 2020-01-10 14:17:51 CET
Inhibiting xfce4-power-manager (xfpm) via its dbus interface does not propagate to xfce4-screensaver (xfss) through their dbus interface. Debugging shows that this is because at startup, xfss's dbus interface can not be found and xfpm falls back to xscreensaver-command:

(xfce4-power-manager:1468484): GLib-GIO-CRITICAL **: 14:14:39.987: g_dbus_proxy_new_for_bus_sync: assertion 'g_variant_is_object_path (object_path)' failed
DBG[xfce-screensaver.c:271] xfce_screensaver_setup(): using command line screensaver interface
DBG[xfce-screensaver.c:149] xfce_screensaver_set_property(): saver->priv->heartbeat_command xscreensaver-command -deactivate
DBG[xfce-screensaver.c:156] xfce_screensaver_set_property(): saver->priv->lock_command xscreensaver-command -lock
DBG[xfce-screensaver.c:156] xfce_screensaver_set_property(): saver->priv->lock_command xfce4-screensaver-command --lock

The relevant code and necessary change is:

--- xfce4-power-manager-1.6.5/src/xfce-screensaver.c.orig       2020-01-10 13:52:59.562615853 +0100
+++ xfce4-power-manager-1.6.5/src/xfce-screensaver.c    2020-01-10 13:56:53.053352597 +0100
@@ -260,7 +260,7 @@
         saver->priv->screensaver_type = SCREENSAVER_TYPE_GNOME;
     } else if (screen_saver_proxy_setup (saver,
                                          "org.xfce.ScreenSaver",
-                                         "/org.xfce/ScreenSaver",
+                                         "/org/xfce/ScreenSaver",
                                          "org.xfce.ScreenSaver"))
     {
         DBG ("using Xfce screensaver daemon");

With this change applied, xfpm debug messages report:

DBG[xfce-screensaver.c:214] screen_saver_proxy_setup(): proxy owner: :1.919
DBG[xfce-screensaver.c:266] xfce_screensaver_setup(): using Xfce screensaver daemon
DBG[xfce-screensaver.c:149] xfce_screensaver_set_property(): saver->priv->heartbeat_command xscreensaver-command -deactivate
DBG[xfce-screensaver.c:156] xfce_screensaver_set_property(): saver->priv->lock_command xscreensaver-command -lock
DBG[xfce-screensaver.c:156] xfce_screensaver_set_property(): saver->priv->lock_command xfce4-screensaver-command --lock

and inhibitors are propagated as expected.
Comment 1 Git Bot editbugs 2020-01-11 01:00:21 CET
Simon Steinbeiss referenced this bugreport in commit 26d621a8d30c1c2d0fcf56fd89379ef8f9f8ada6

Fix inhibiting xfce4-screensaver (Bug #16364)

https://git.xfce.org/xfce/xfce4-power-manager/commit?id=26d621a8d30c1c2d0fcf56fd89379ef8f9f8ada6
Comment 2 Git Bot editbugs 2020-01-11 01:02:39 CET
Michael Weiser referenced this bugreport in commit 5fde4b2aac1beda23b1b6c391773a67515ca45eb

Fix inhibiting xfce4-screensaver (Bug #16364)

https://git.xfce.org/xfce/xfce4-power-manager/commit?id=5fde4b2aac1beda23b1b6c391773a67515ca45eb
Comment 3 Simon Steinbeiss editbugs 2020-01-11 01:03:13 CET
Thanks for the patch, applied to both the xfce 4.14 and the master branch.
Comment 4 Michael Weiser 2020-01-11 11:53:50 CET
I gave git master a quick test and as expected it now works as intended. Thanks!
Comment 5 Maurizio Galli 2020-03-10 06:06:28 CET
This fix had this unfortunate side effect: https://bugzilla.xfce.org/show_bug.cgi?id=16522

Bug #16364

Reported by:
Michael Weiser
Reported on: 2020-01-10
Last modified on: 2020-03-10

People

Assignee:
Simon Steinbeiss
CC List:
4 users

Version

Attachments

Additional information