Goal: Explaining how to log out from openbox using menu.
Table of Content
1: Basic
Using systemd exit is as easy as:
And the respective openbox menu would be menu.systemd.xml
.
I have test this in my Fedora, openSUSE and Debian.
This could be like this in other system (such as openrc).
But may vary depend on your setup.
It needs workaround to setup this in openbox menu.
Main Menu
And in mainmenu add this.
The result is as simply as this one.
2: Forcing Password
The issue with systemctl is, any user can shutdown.
There are some workaround,
such as using gksu
or sudo
.
Just edit your xml menu config.
Using gksu
Now your menu could be
Using urxvt sudo
Using xterm sudo
Setting up sudoers
In order this sudo
to work you,
first you must setup /etc/sudoers
.
Or setup wheel
group.
Or in openSUSE, there is something like this:
3: Forcing No Password
Now consider to see non-systemd again.
The respective openbox menu would be menu.openrc.xml
.
And set in /etc/sudoers
,
to make it behaves like systemctl.
Use no password.
I have test this in my Gentoo.
4: Custom Dialog
There is, however, this old good trick from urukrama,
using gxmessage. gxmessage is not very common, and not available in all distro.
Let me rewrite the good script for a modern days systemd style.
Or the ugly one.
What’s Next
We are almost finished with openbox configuration.
Consider continue reading [ Openbox: Exit ].