wakepy
wakepy copied to clipboard
Add support for Xfce
Different methods on xfce:
org.Xfce.Session.Manager.Inhibit
- Introduced in xfce-session/#22 (in particular, the commit 895a580d). Merged into xfce-session in commit aa586e05 (April 13th, 2023). It is not part of the xfce-4.18 branch, but it is part of the xfce-session-4.19.0 tag.
- Since Xfce releases every odd number (..., 4.14, 4.16, 4.18, 4.20, ...) as binary releases (changelog here), the org.Xfce.Session.Manager.Inhibit will only be part of the 4.19 "development" (source) release, and then finally in the Xfce 4.20, which is probably out in late 2024 or early 2025 (ref). See also: Schedule for and Status of the Xfce 4.20 Development Cycle.
- D-Bus path:
/org/xfce/SessionManager
- D-Bus interface:
org.xfce.Session.Manager
- Method:
Inhibit
, with parameters app_id (str), toplevel_xid (int), reason (str), flags (int) and return value inhibit_cookie (int)
org.freedesktop.PowerManagement.Inhibit
- Obsolete spec, but still used: https://wakepy.readthedocs.io/stable/methods-reference.html#org-freedesktop-powermanagement
- There's a bug in XFCE.
org.freedesktop.PowerManagement.Inhibit
inhibits also screensaver: https://gitlab.xfce.org/xfce/xfce4-power-manager/-/issues/65 - This is present on Xfce 4.18 session bus. Tested and this prevents idle; it implements keep.presenting mode.
- D-Bus name
org.freedesktop.PowerManagement
(on Session bus) - D-Bus path:
/org/freedesktop/PowerManagement/Inhibit
- D-Bus interface:
org.freedesktop.PowerManagement.Inhibit
- Method:
Inhibit
, with parameters application_name (str) and reason (str) and return value inhibit_cookie (int). Note that since this does not have input parameter "flags", you may not control what this inhibits, and there are two kinds of behaviors found in the wild (keep.running (=the correct one?) and keep.presenting).
org.freedesktop.login1.Manager.Inhibit
- This is present on Xfce 4.18 system bus
- D-Bus name:
org.freedesktop.login1
- D-Bus path:
/org/freedesktop/login1
- D-Bus interface:
org.freedesktop.login1.Manager
- Method:
Inhibit
, with parameters what (str) who (str) why (str) mode (str) and return value file_descriptor (File Descriptor).
org.xfce.PowerManager
- Mentioned on xfce4-power-manager roadmap for Xfce 4.10
- Likely to just be a proxy or alias for org.freedesktop.PowerManagement.Inhibit
- This is present on Xfce 4.18 session bus. Tested and this prevents idle; it implements keep.presenting mode.
- D-Bus name:
org.xfce.PowerManager
- D-Bus path:
/org/freedesktop/PowerManagement/Inhibit
- D-Bus interface:
org.freedesktop.PowerManagement.Inhibit
- Method:
Inhibit
, with parameters application_name (str) and reason (str) and return value inhibit_cookie (int).
Notes
- See discussion in: https://gitlab.xfce.org/xfce/xfce4-session/-/issues/71