Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for org.freedesktop.ScreenSaver #164

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ambadoom
Copy link

I've patched in support for the org.freedesktop.ScreenSaver interface for my own use.

Not sure if yet another way of inhibiting idle is in-scope here but thought I'd create a PR just in case.

The feature is locked behind a -s flag as it requires claiming ownership of the D-Bus name.

Currently this requires building with systemd or elogind support, although in theory all it needs is access to D-Bus.

I haven't tested this building with elogind but don't think there is any reason to expect it to work differently to systemd here.

(As a side note, I also have a patch that detects if stderr is the systemd journal and if so omits timestamps and emits log-level markers. Let me know if there is any interest)

@Ciubix8513
Copy link

This doesn't seem to work with vlc, tho it does work with playing videos on youtube (using firefox). And it doesn't look to be a vlc issue, code on their side looks correct.

@ambadoom
Copy link
Author

This doesn't seem to work with vlc

Looks like vlc is trying to call Inhibit on "/ScreenSaver" rather than "/org/freedesktop/ScreenSaver". I had previously assumed binding to the latter would be enough.

From a quick search I can't find documented anywhere what paths we should be using but gnome seems to use those two paths[0] so that seems like a good bet.

I'll come up with a patch to add "/ScreenSaver".

[0] : https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/blob/master/plugins/screensaver-proxy/gsd-screensaver-proxy-manager.c

Some programs such as vlc look to /ScreenSaver rather than
/org/freedesktop/ScreenSaver for their inhibiting. This brings us in
line with what gnome does.
@ambadoom
Copy link
Author

Added /ScreenSaver. I've tested it working with vlc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants