Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
xfce4-session
xfce4-session
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 67
    • Issues 67
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Custom Issue Tracker
    • Custom Issue Tracker
  • Merge Requests 3
    • Merge Requests 3
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Xfce
  • xfce4-sessionxfce4-session
  • Issues
  • #71

Closed
Open
Opened 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
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: xfce/xfce4-session#71