Date: Sat, 31 Dec 2016 10:41:42 -0800 From: David Christensen <dpchrist@holgerdanske.com> To: 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: <a0e0390a-55e2-9ad0-3e74-26f25ae5309f@holgerdanske.com> In-Reply-To: <20161231163107.64b0582d.freebsd@edvax.de> References: <e721fc89-46b0-ea8c-9ed3-ad6c0df58c29@holgerdanske.com> <e0b1bd9a-dbe0-31cb-ee70-0cfe87da694b@bananmonarki.se> <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> <e4100f12-b37d-3e0b-2d5e-5cb65f5c49a5@bananmonarki.se> <20161230154841.7d2561e2.freebsd@edvax.de> <bca9e1b0-f298-e5da-d583-134ad0bd18b7@holgerdanske.com> <20161231163107.64b0582d.freebsd@edvax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
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/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a0e0390a-55e2-9ad0-3e74-26f25ae5309f>