Xfce Python Dbus
<p>I run Xfce (Arch Linux) and I'm trying to control the power manager. I already declared the power manager but what are the methods to hibernate it and control it? Here's my code so far:</p>

<pre><code>from pydbus import SessionBus
bus = SessionBus
power = bus.get('org.xfce.PowerManager',           '/org/xfce/PowerManager')
power.hibernate
</code></pre>

<p>And it's not working. I've tried googling it, looking at docs, and guessing every method I could think of.</p>

<p>As Dartmouth mentioned, you need to find xfce4-power-manager's exposed methods. For that <a href="https://wiki.gnome.org/Apps/DFeet" rel="nofollow">DFeet</a> (a D-Bus debugger) will help you:</p>

<p><a href="http://i.stack.imgur.com/UIOz6.png" rel="nofollow"><img src="http://i.stack.imgur.com/UIOz6.png" alt="enter image description here"></a></p>

<p>Then you can call the method (via terminal):</p>

<pre><code>dbus-send --session --print-reply \
--dest=org.freedesktop.PowerManagement \
/org/freedesktop/PowerManagement \
org.freedesktop.PowerManagement.Hibernate
</code></pre>

python dbus