FreeBSD 11.0 i386, XDM 1.1.11_6, XFCE 4.12_1 -- How to enable GUI shutdown and restart?
David Christensen
dpchrist at holgerdanske.com
Sat Dec 31 18:41:45 UTC 2016
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 at 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/
More information about the freebsd-questions
mailing list