#774668 xscreensaver: check libxss-dev:XScreenSaverQueryInfo() during idle loop

Package:
xscreensaver
Source:
xscreensaver
Description:
Screensaver daemon and frontend for X11
Submitter:
Clint Adams
Date:
2022-06-26 18:39:07 UTC
Severity:
wishlist
#774668#5
Date:
2015-01-05 21:43:59 UTC
From:
To:
It would be nice if, on systems that support it, xscreensaver could
check XScreenSaverQueryInfo() and avoid blanking/locking accordingly.

This would allow me to stop using
    mpv --heartbeat-cmd="xscreensaver-command -deactivate"
which is ugly.

#774668#10
Date:
2015-01-05 21:51:14 UTC
From:
To:
xscreensaver does not use the MIT SCREEN-SAVER server extension because it is a flaky, unreliable piece of shit that tends to cause the sever to crash.

Does it work? Yes? Then it's not ugly.

#774668#15
Date:
2015-01-06 14:13:50 UTC
From:
To:
Good to know.  What about a conditional on DPMS state (and then not
ever setting it)?

Calling system() every 30 seconds as a substitute for a single-bit
toggle is fuckin' ugly.

#774668#20
Date:
2022-06-26 14:20:51 UTC
From:
To:
Jamie Zawinski <jwz@jwz.org>:

Is it still the case after 7 years?

Also, the workaround given by the submitter no longer works, I use this
instead:

$ cat ~/.config/mpv/scripts/screensaver.lua
local function deactivate_screensaver()
    mp.command_native({name={'subprocess'},
args={'xscreensaver-command', '--deactivate'}})
end

local timer = mp.add_periodic_timer(30, deactivate_screensaver)

local function on_pause_change(name, value)
    if value then
        timer:kill()
    else
        timer:resume()
    end
end

mp.observe_property('pause', 'bool', on_pause_change)
$

#774668#25
Date:
2022-06-26 18:26:06 UTC
From:
To:
I suppose somewhere in the multiverse there is a world where the MIT-SCREEN-SAVER extension is under active development. In our universe, that code almost certainly hasn't been touched since the 90s.

XScreenSaver does not and will not use that server extension.

Install XScreenSaver 6.04 and then "man xscreensaver-systemd".