Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • xfce4-session xfce4-session
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare
  • Issues 87
    • Issues 87
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • XfceXfce
  • xfce4-sessionxfce4-session
  • Issues
  • #71
Closed
Open
Issue created Sep 06, 2020 by Arnaud R@arnaudr

Inhibit suspend from GtkApplication

In a radio player application, I want to prevent the system from suspending while a radio is playing.

For that I use gtk_application_inhibit. It works well on GNOME, but on XFCE I get this GTK warning:

(goodvibes:12772): Gtk-WARNING **: 10:23:57.000: Calling org.xfce.Session.Manager.Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such method “Inhibit”

Interestingly, there was an issue opened in GTK in order to support the XFCE session manager, a long time ago, and support was merged back in June 2016:

  • https://bugzilla.gnome.org/show_bug.cgi?id=693203
  • https://gitlab.gnome.org/GNOME/gtk/-/commit/3c7cd7ac23408195dc99642f4c0ef41f466541f9

After this commit, gtk_application_inhibit () attempts to call the D-Bus method org.xfce.SessionManager /org/xfce/SessionManager org.xfce.Session.Manager.Inhibit(). However this method does not exist!

So I was wondering if it's a known issue, or am I missing something?

If there's no method org.xfce.Session.Manager.Inhibit, then what is the right way for an application to inhibit suspend on XFCE?

Is it through the D-Bus service org.freedesktop.PowerManagement /org/freedesktop/PowerManagement/Inhibit org.freedesktop.PowerManagement.Inhibit.Inhibit()? Or org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.Inhibit() on the system bus? Or something else?

Thanks!

Assignee
Assign to
Time tracking