From owner-freebsd-questions@freebsd.org Wed Dec 28 02:22:25 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B99E4C91A50 for ; Wed, 28 Dec 2016 02:22:25 +0000 (UTC) (envelope-from bah@bananmonarki.se) Received: from feeder.usenet4all.se (1-1-1-38a.far.sth.bostream.se [82.182.32.53]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43AFA1967 for ; Wed, 28 Dec 2016 02:22:24 +0000 (UTC) (envelope-from bah@bananmonarki.se) Received: from testbox.news4all.se (testbox.usenet4all.se [10.0.0.3]) by feeder.usenet4all.se (8.13.1/8.13.1) with ESMTP id uBS2MLnS013707; Wed, 28 Dec 2016 03:22:21 +0100 (CET) (envelope-from bah@bananmonarki.se) Subject: Re: FreeBSD 11.0 i386, XDM 1.1.11_6, XFCE 4.12_1 -- How to enable GUI shutdown and restart? To: David Christensen , freebsd-questions@freebsd.org References: From: Bernt Hansson Message-ID: <2c0d9213-1adc-48b7-bdf6-a6b4a577d726@bananmonarki.se> Date: Wed, 28 Dec 2016 03:22:21 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Dec 2016 02:22:25 -0000 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/