Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Dec 2016 03:22:21 +0100
From:      Bernt Hansson <bah@bananmonarki.se>
To:        David Christensen <dpchrist@holgerdanske.com>, freebsd-questions@freebsd.org
Subject:   Re: FreeBSD 11.0 i386, XDM 1.1.11_6, XFCE 4.12_1 -- How to enable GUI shutdown and restart?
Message-ID:  <2c0d9213-1adc-48b7-bdf6-a6b4a577d726@bananmonarki.se>
In-Reply-To: <e0b1bd9a-dbe0-31cb-ee70-0cfe87da694b@bananmonarki.se>
References:  <e721fc89-46b0-ea8c-9ed3-ad6c0df58c29@holgerdanske.com> <e0b1bd9a-dbe0-31cb-ee70-0cfe87da694b@bananmonarki.se>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2016-12-28 03:16, Bernt Hansson wrote:
> On 2016-12-27 05:02, David Christensen wrote:
>>
>> How do I enable GUI Shutdown and Restart capabilities in both XDM and 
>> XFCE?
> You need to write some policykit/consolekit rules, can't find them 
> now, and you ned HAL.

Ok. I found it.

To be able to shutdown or reboot your system, you'll have to add a .pkla file
in /usr/local/etc/polkit-1/localauthority/50-local.d directory. Which looks
like this (replace PUTYOURGROUPHERE by your group):

[Restart]
Identity=unix-group:PUTYOURGROUPHERE
Action=org.freedesktop.consolekit.system.restart
ResultAny=yes
ResultInactive=yes
ResultActive=yes

[Shutdown]
Identity=unix-group:PUTYOURGROUPHERE
Action=org.freedesktop.consolekit.system.stop
ResultAny=yes
ResultInactive=yes
ResultActive=yes

For those who have working suspend/resume:

[Suspend]
Identity=unix-group:PUTYOURGROUPHERE
Action=org.freedesktop.upower.suspend
ResultAny=yes
ResultInactive=yes
ResultActive=yes

Source:  https://forums.freebsd.org/threads/45643/





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2c0d9213-1adc-48b7-bdf6-a6b4a577d726>