Share xfce4-session and xfce4-power-manager code

Nick Schermer nickschermer at
Tue Feb 15 16:04:00 CET 2011

On Tue, Feb 15, 2011 at 3:25 PM, Ali Abdallah <aliov at> wrote:
> Hello,
> 1) org.freedesktop.PowerManagement is no longer mantained as a spec, it is
> removed from gpm, so using xfpm for these operation will force people to use
> xfpm always with Xfce... I still have the implementation for the moment but
> i'll remove the code in the future.


> 2) Personally i have no problem at all in having xfpm depending on
> xfce4-session, but lot of people uses xfpm with other desktops, we should
> think about those also.

Yeah that is not a real option, but I thought I'd mention it.

> 3) I remember I already had this discussion with Brian, i think we end up in
> thinking about on small service+library that can be used from xfpm and the
> session, this means increasing the number of core modules.

I doubt that's a good idea. Xfpm is not that big and it might bring
good stuff to normal desktops as well (dpms, power buttons). So IMHO
the best solution would be:

- Use org.xfce.Power.Manager
- Fallback to sudo if service failed (no permission) or is not
available (openbsd and people who haven't installed Xfpm).

- Xfpm needs to extend org.xfce.Power.Manager with some of the methods
from org.freedesktop.PowerManagement (with error replies, so we can
give good feedback if also sudo failed, somthing that is lacking atm).
- It should be a dbus-service as well, this way it never fails (from
xfce4-session's point of view).

In case we rely more on Xfpm it should also be improved in a couple of
other areas I think:
  - Possibly also quit if it has nothing to do.
  - Consider using more library api (libupower, polkit); probably
easier to maintain in the future, not to mention easier to understand.


More information about the Xfce4-dev mailing list