#914613 xdg-screensaver: Does nothing for many DEs (lxde, dde, enlightenment etc.)

#914613#5
Date:
2018-11-25 17:03:36 UTC
From:
To:
xdg-screensaver detects the running desktop environment and then runs
DE-specific commands to reset or turn on / off the screensaver.  If the
DE is not detected, it uses 'xset s' to control the X server screen
saver extension.

The problem is that xdg-screensaver can recognize more DEs than it has
the code to handle. The generic X server screensaver code is not called
at all when using, for example LXDE. The attached 'sh -x xdg-screensaver
reset' output shows what happens when 'xdg-screensaver reset' is run in
LXDE (nothing useful).

The attached patch makes the 'xset s' codepath the default. It is now
run if the DE is detected, but there is no specialized code to handle
its screensaver.

#914613#10
Date:
2018-11-27 07:46:36 UTC
From:
To:
Teemu Ikonen <tpikonen@gmail.com> wrote:

On further testing I noticed that this patch breaks programs
which expect 'xdg-screensaver lock' to succeed (for example
xfce4-power-manager complains about not able to lock screen on
suspend). This is because the 'screensaver_xserver' code in
xdg-screensaver does not support the lock subcommand.

The bug report itself is still valid though, LXDE users without a
screen saver other than the X server blanking would benefit from
having a working 'xdg-screensaver reset' command, which is used
by many media players to inhibit screen saving.

I found this bug when setting up xss-lock. I ended up writing a
patch to support it explicitly in xdg-screensaver, submitted to
upstream here:
https://bugs.freedesktop.org/show_bug.cgi?id=108865

Best,
Teemu