HOWTO: Shutting down Arch Linux with Fluxbox

Fluxbox has no shutdown button. This is probably fine on a big multi-user system, but as I allready have physical access to the power switches anyway, it seems rather silly not to be able to shut down my own computer the normal way too. But for that we need “sudo”

Install it like this:
# pacman -Sy sudo

Then execute “visudo” as root (note: “visudo” works the same way as the “vi” editor) and add the following at the bottom (if you are member of the “wheel” group):
%wheel ALL=(root) NOPASSWD: /sbin/shutdown
%wheel ALL=(root) NOPASSWD: /sbin/halt
%wheel ALL=(root) NOPASSWD: /sbin/reboot

This will enable you to shutdown and reboot without being prompted for your password, like this for example:
$ sudo reboot

Now open up ~.fluxbox/menu in your favorite editor and add the following somewere near the “exit” tag:
[exec] (Reboot) {sudo reboot}
[exec] (Shutdown) {sudo halt}

And that should do it. If you use iDesk you can also create a shutdown icon using the same sudo command.

One Response to “HOWTO: Shutting down Arch Linux with Fluxbox”

  1. Llanto_Subterraneo Says:

    Thank u

Leave a Reply