From owner-freebsd-questions@freebsd.org Sat Dec 31 18:41:45 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 C77E2C9933B for ; Sat, 31 Dec 2016 18:41:45 +0000 (UTC) (envelope-from dpchrist@holgerdanske.com) Received: from holgerdanske.com (holgerdanske.com [IPv6:2001:470:0:19b::b869:801b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.he.net", Issuer "GeoTrust SSL CA - G4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B46C11353 for ; Sat, 31 Dec 2016 18:41:45 +0000 (UTC) (envelope-from dpchrist@holgerdanske.com) Received: from ::ffff:99.100.19.101 ([99.100.19.101]) by holgerdanske.com with ESMTPSA (AES128-SHA:SSLv3:Kx=RSA:Au=RSA:Enc=AES(128):Mac=SHA1) (SMTP-AUTH username dpchrist@holgerdanske.com, mechanism PLAIN) for ; Sat, 31 Dec 2016 10:41:42 -0800 Subject: Re: FreeBSD 11.0 i386, XDM 1.1.11_6, XFCE 4.12_1 -- How to enable GUI shutdown and restart? To: freebsd-questions@freebsd.org References: <2c0d9213-1adc-48b7-bdf6-a6b4a577d726@bananmonarki.se> <622bd615-48b9-031a-65d8-3c7daf663cb9@holgerdanske.com> <09d1385a-6356-b732-ddd4-ebd678c25419@bananmonarki.se> <507828f7-6621-15f8-f55d-0ad172857fc1@holgerdanske.com> <20161230154841.7d2561e2.freebsd@edvax.de> <20161231163107.64b0582d.freebsd@edvax.de> From: David Christensen Message-ID: Date: Sat, 31 Dec 2016 10:41:42 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.5.1 MIME-Version: 1.0 In-Reply-To: <20161231163107.64b0582d.freebsd@edvax.de> 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: Sat, 31 Dec 2016 18:41:45 -0000 On 12/31/16 07:31, Polytropon wrote: > On Fri, 30 Dec 2016 22:05:52 -0800, David Christensen wrote: >> On 12/30/16 06:48, Polytropon wrote: >>> then add a menu entry >>> for "System Shutdown" (shutdown -p now) and "System Reboot" >>> (shutdown -r now); >> >> How? > > There is some XML file you can edit, and I assume that there > is some kind of "menu editor" (similar to what Gnome inclused) > where you can manually specify a program that will then be > indluced in the menu - or on one of the bars. > > This has been super-easy in XFCE 3, "Add icon". :-( > > For comparison: I use the same approach in WindowMaker: There > is a submenu I called "Functions" where I never chose anything > from, but have key combinations assigned. It contains an entry > named "System shutdown" with the key combination Control+Mod1+F27 > which is Ctrl+Alt+Moon on my Sun type 7 USB keyboard. It simply > executes the following command: > > xterm -class SHUTDOWN -fg black -bg red -e "shutdown -p now ; read DUMMY" > > With the membership in the required groups, this is permitted > from my user account. Yeah, I thought about that (and I should have been able to figure it out myself). But, it's a hack. Xfce already has the features I want and I know they work on Debian Wheezy. It is disappointing that such basic functionality does not work on FreeBSD. > It looks so simple and easy, why shouldn't it be possible to > implement something similar with a state-of-the-art desktop > environment? I assume DBus, hald, policykit, consolekit, etc., facilitate functionality far beyond what a simple desktop-shortcut-invoking-a-suid-script model allows. The consistency hobgoblin probably ate shutdown and restart along the way. The price is that I now have to figure out one or more of the above to get shutdown and restart working as implemented. >> How do I start policykit, consolekit, and hal? > > PolicyKit is started by Xfce (the --with-ck-launch options will > enable it), and HAL is started by adding > > hald_enable="YES" > > to /etc/rc.conf. man 5 rc.conf leads me to believe that there is no hald_enable option: 2016-12-31 09:56:43 toor@t7400 ~ # grep hald /etc/defaults/rc.conf /etc/rc.conf.local /etc/rc.conf grep: /etc/rc.conf.local: No such file or directory man 8 hald says that hald is connected to dbus. (It also gives example incantations for Fedora, which leads me to believe that the man page may not be correct for FreeBSD.) If hald manages all the hardware devices for FreeBSD, I don't see how it could not be running; but ps said otherwise. I don't understand. What is the canonical method to determine if hald is operating on a FreeBSD 11 system? (Or, ready to operate when needed?) >> startxfce4 does not appear to have a man page or provide command-line >> help (?). > > Modern X programs do not have manpages. They _sometimes_ have > documentation scattered across the web, in project pages, > Github notes, wikis, user pages, and discussion forums. ;-) > > > >> Where are startxfce4 options documented? > > Honestly? I have no idea. I got the --with-ck-launch simply > by web search... After 20+ years of beating my head against Linux and *BSD, I'm starting to think FOSS projects will never produce programming systems products [1]. Given [2], [3], [4], [5], etc., FreeBSD seems to be trying harder than most, but XDM and Xfce are separate projects. Perhaps I should post on the Xfce list? https://mail.xfce.org/mailman/listinfo/xfce That said, are Gnome or KDE better integrated on FreeBSD? And, is there a X desktop manager port/ package on FreeBSD 11 with shutdown and restart? David [1] https://www.pearsonhighered.com/program/Brooks-Mythical-Man-Month-The-Essays-on-Software-Engineering-Anniversary-Edition-2nd-Edition/PGM172844.html [2] https://www.pearsonhighered.com/program/Mc-Kusick-Design-and-Implementation-of-the-Free-BSD-Operating-System-The-2nd-Edition/PGM224032.html [3] https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ [4] https://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/ [5] https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/