wakepy
wakepy copied to clipboard
Non-DBUS based methods on GNOME
It would be nice to have non-DBus based on methods available on GNOME. This would make D-Bus (and the python package jeepney) an optional dependency on GNOME.
Task:
- Search for non-DBus based keep.running and keep.presenting methods on GNOME
- If there are any, implement those with the new API; using wakepy.core.Method
There are so many other tasks for the 0.8.0 release that I would not want to hold it because of this. This can be part of the next release, for example.
There is a command called gnome-session-inhibit
. See, for example: https://manpages.ubuntu.com/manpages/bionic/man1/gnome-session-inhibit.1.html
Notes:
- Someone has reported a bug on GNOME 46: https://bbs.archlinux.org/viewtopic.php?id=294232
- Probably part of the gnome-session package (https://gitlab.gnome.org/GNOME/gnome-session)
- This one does not require D-Bus communication (from the python process)
- Should take care that if python process crashes, there should be no
gnome-session-inhibit
processes left, but those should always be taken down with the main process. If that's not possible, this is probably not a good method. Perhaps, could try callinggnome-session-inhibit sleep 1
?