linuxmint / cinnamon-settings-daemon

The settings daemon for the Cinnamon desktop
GNU General Public License v2.0
58 stars 59 forks source link

[Question] Expanding the feature set of the csd-screensaver-proxy org.freedesktop.ScreenSaver interface #373

Open SebiderSushi opened 1 year ago

SebiderSushi commented 1 year ago
 * csd version 5.6.0-1
 * Distribution - Arch
 * Graphics hardware (from `glxinfo -B`): Mesa Intel(R) HD Graphics 3000 (SNB GT2) (0x126) / Version: 22.3.1
 * Graphics driver (from `sudo lshw -C display`): driver=i915
 * 64 bit

Issue I am using the cinnamon-screensaver outside of Cinnamon - in this case together with Xfce. It is possible to set a custom command line that is used to lock the screen in Xfce, however the xfce4-power-manager currently prefers a D-Bus interface over this and prioritises /org/freedesktop/ScreenSaver over most other interfaces if it's available. There is a patch that resolves this whithin the xfce4-power-manager by falling back to the user-set command line if the D-Bus command fails. The patch has been merged and released with xfce4-power-manager version 4.18.1 so i consider my use-case to be solved.

Yet, i was wondering: The csd-screensaver-proxy daemon provides the /org/freedesktop/ScreenSaver interface. To my understanding, it's possible to call the inhibit methods under this interface and the proxy will inform the cinnamon-screensaver accordingly. However, the Lock() or SetActive() methods are declared but not implemented and calls to them throw an error. The same behavior can be observed with GNOME's gsd-screensaver-proxy as well, while KDE Plasma supports locking the screen by calling org.freedesktop.ScreenSaver.Lock() and .SetActive() (source code and relevant message on their mailing list).
Are Cinnamon and GNOME strictly adhering to the existing specification? According to my research that would be just the idle-inhibit-spec.
Using the xscreensaver together with Xfce creates the same issue as well (or at least did so in the past). Here's a rundown of that discussion between Xfce and xscreensaver devs on the topic, covering the things i've laid out in this paragraph.

At a first glance, it seems to be quite useful to have this generic entry point which appears to be an unspecified but possible de-facto standard among Linux desktops. To my understanding, the underlying Lock() and SetActive() methods implemented under the DE-specific screensaver interfaces are already compatible across the board and all it would take to bridge the gap would be exposing these methods at the common /org/freedesktop/ScreenSaver interface path as well.

I am aware that using the cinnamon-screensaver independent of Cinnamon itself is not a supported use case. I am aware that just because KDE does it does not mean that anybody else has to.

Steps to reproduce

Expected behavior The csd-screensaver-proxy forwards the D-Bus call from org.freedesktop.ScreenSaver.Lock to org.cinnamon.ScreenSaver.Lock and the cinnamon-screensaver locks the screen.