Share xfce4-session and xfce4-power-manager code

Landry Breuil landry.breuil at gmail.com
Wed Feb 16 11:16:57 CET 2011


On Wed, Feb 16, 2011 at 9:59 AM, Ali Abdallah <aliov at xfce.org> wrote:
> On 02/16/2011 09:51 AM, Landry Breuil wrote:
>>
>> On Wed, Feb 16, 2011 at 9:10 AM, Nick Schermer<nickschermer at gmail.com>
>>  wrote:
>>>
>>> On Wed, Feb 16, 2011 at 8:11 AM, Ali Abdallah<aliov at xfce.org>  wrote:
>>>>
>>>> On 02/15/2011 04:04 PM, Nick Schermer wrote:
>>>>>
>>>>> So IMHO
>>>>> the best solution would be:
>>>>>
>>>>> xfce4-session:
>>>>> - 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).
>>>>
>>>> Fallback to sudo just for reboot/shutdown, no sudo suspend/hibernate
>>>> methods
>>>> are supported, do we plan to support these options via sudo ?
>>>
>>> No no suspend/hibernate; but the goal it that it will continue to work
>>> with openbsd and other systems that have no support for Xfpm (and can
>>> thus ship without it).
>>
>> I've considered implementing the missing suspend/hibernate
>> options for the sudo backend since a long time, that'll be the perfect
>> occasion.
>
> Is pm-utils available on openbsd and others ?

no, i'm pretty sure it is totally linux-only.

but we can easily amend things like it's done in xfsm-shutdown-helper :
http://git.xfce.org/xfce/xfce4-session/tree/xfsm-shutdown-helper/main.c#n61

i know upower backends have a special function to retrieve the
os-specific command
to exec when one wants to shutdown/suspend, see
http://cgit.freedesktop.org/upower/tree/src/freebsd/up-backend.c#n46 and
http://cgit.freedesktop.org/upower/tree/src/freebsd/up-backend.c#n311

Landry



More information about the Xfce4-dev mailing list