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.

Advertisements

One Response to HOWTO: Shutting down Arch Linux with Fluxbox

  1. Llanto_Subterraneo says:

    Thank u

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: