wakepy icon indicating copy to clipboard operation
wakepy copied to clipboard

Non-DBUS based methods on GNOME

Open fohrloop opened this issue 1 year ago • 3 comments

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

fohrloop avatar Oct 26 '23 21:10 fohrloop

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.

fohrloop avatar Jan 16 '24 20:01 fohrloop

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 calling gnome-session-inhibit sleep 1 ?

fohrloop avatar May 28 '24 14:05 fohrloop