Beranda > Linux > Full Guide Using Fluxbox

Full Guide Using Fluxbox

Getting Started

Full Guide

Thanks to narada; he is the author of this guide. You can find it at: [1]

Starting Fluxbox

Method 1: KDM/GDM

Users of KDM or GDM will find a new fluxbox entry added to their session menu automatically. Simply choose the fluxbox option when logging in.

Method 2: ~/.xinitrc

Edit ~/.xinitrc and add the following code:

exec fluxbox

or if you would like to use the ‘startfluxbox’ file, add this line instead:

exec startfluxbox

startfluxbox is the recommended method, as this will also execute any programs defined in ~/.fluxbox/startup.

Note: There can only be one exec line in your ~/.xinitrc file.

If it crashes on startup, it may be a locale problem. Setting LC_ALL to the default “C” locale, may avoid this crash. 1.


Menu Management

Built-in method

Built-in command:

$ fluxbox-generate_menu

This command will generate a ~/.fluxbox/menu/ file based on your installed programs. There is also “helper / regenerate menu” in the fluxbox menu.


MenuMaker is a powerful tool that creates XML-based menus for a variety of Window Managers, including Fluxbox. MenuMaker will search your computer for executable programs and create a menu based on the results. It can be configured to exclude Legacy X, GNOME, KDE, or Xfce applications if desired.

MenuMaker is available in [community] via pacman:

# pacman -S menumaker

Once installed, you can generate a complete menu by running:

$ mmaker -v Fluxbox

To see a full list of options, run mmaker –help

Arch Linux Xdg menu

Requires Arch Linux xdg menu

$ xdg_menu --fullmenu --format fluxbox --root-menu /etc/xdg/menus/ >~/.fluxbox/menu

Tip: replace default xterm/urxvt:

$ sed -i 's/xterm/urxvt/g' ~/.fluxbox/menu

More info:

$ xdg_menu --help

See also: XdgMenu

Creating a custom menu with fluxconf

To start the menu section of fluxconf run:

$ fluxmenu

In the window you will see three columns: Type, Title, & Command/Comment.
Clicking on an entry in this will allow you to edit it.
Clicking on “Add sub” will add a submenu.
Clicking on “Add exec” will add a command.

The type column has several valid options:

  1. begin, required to start the menu file. The title option is the menu header.
  2. submenu, a “folder” inside the menu. Title is the name of the submenu.
  3. exec, a command line. Title is what is shown and Command/Comment is the command to be executed.
  4. separator, a divider in the menu. No arguments to this one.
  5. workspaces, a list of workspaces and what applications are running on each. Title is what will be shown to the user.
  6. stylesdir, a directory containing styles. Title is the path to the dir. Recommended that you put this into its own subdirectory as it can get quite large. directories to use: /usr/share/fluxbox/styles ~/.fluxbox/styles .
  7. config, a menu with many options for configuring behavior of fluxbox. Title is the name of the menu shown to the user.
  8. reconfig, reloads the config file. Title is the title shown to the user.
  9. restart, restarts fluxbox. Title is the title shown to the user.
  10. exit, exit fluxbox, will drop back to the desktop manager or exit X depending on the startup method you used. Title is the title shown to the user.

Remember to hit save before closing

Manually create/edit the menu

Use command:

$ nano ~/.fluxbox/menu

Then write lines in this style:

[exec] (name) {command}

If you want to make submenu write:

[submenu] (Name)

When done save and exit. There is no need to restart fluxbox.


Fluxbox offers basic hotkeys functionality. The fluxbox key file is located at:


Control key is represented by “Control”. Mod1 corresponds to Alt and Mod4 corresponds to Meta (not a standard key but many map meta to the win key)

Here is a quick way of controlling your Master volume, using CTRL-ALT+ Arrow up or down:

Control Mod1 Up :Exec amixer sset Master,0 5%+
Control Mod1 Down :Exec amixer sset Master,0 5%-

If you installed fluxconf, you may use its method of editing this in GUI with the command:

$ fluxkeys

The First text box is for a button and the second is for an action. Select execCommand to set a command and put the name of the command into the 3rd text box.

More functions of this can be used from the 2nd text box (A drop down menu is available)


Fluxbox defaults to having four workspaces. These are accessible using Alt+F1-F4 shortcuts, or the arrows on the toolbar next to where it says one.

Right clicking on desktop and going to your Workspaces menu (menumaker users: FluxBox>Workspaces, fluxconf users: the workspaces title) will let you interact with the workspaces.

Workspaces Menu:

Icons - shows minimized applications
Workspaces names (default: one,two,three,four) - Shows all the applications on that desktop
New Workspace - Adds a workspace
Edit Current workspace name - lets you title your workspace whatever you want. Will show up on the left side of the toolbar
Remove Last - Removes the last workspace on the list, dumps all of the applications running on that desktop into the one before it


Setting the background requires a background setter. you will need to install one of these packages:

  • eterm
  • feh (lacks menu transparency).

There are others but these are the most recommended two, to see others check out the fbsetbg documentation in the “Additional Links section” To set the background:

$ fbsetbg /path/to/background.image

You can also add (or modify) the following line to the file ~/.fluxbox/init to something like this:

session.screen0.rootCommand:	fbsetbg /path/to/wallpaper

Or simply:

session.screen0.rootCommand:	fbsetbg -l

Additional notes for people who like to change wallpaper a lot

Place the following submenu in your fluxbox menu

[submenu] (Backgrounds)
[wallpapers] (~/.fluxbox/backgrounds)
[wallpapers] (/usr/share/fluxbox/backgrounds)

Then put your background images into ~/.fluxbox/backgrounds or any other folder you specify, they will then appear in the same fashion as your styles.\


Install feh with:

# pacman -S feh

You may add a quick submenu to your ~/.fluxbox/menu file which will allow you to change backgrounds on-the-fly:

[submenu] (Wallpaper)
[wallpapers] (/path/to/your/wallpapers) {feh --bg-scale}

To make sure fluxbox will load feh background next time start:

1. Make .fehbg executable:

$ chmod 770 ~/.fehbg

2. Then add (or modify) the following line to the file ~/.fluxbox/init:

session.screen0.rootCommand:	~/.fehbg

3. or add (or modify) the following line to the file ~/.fluxbox/startup:



To install a theme extract the archive to a stylesdir the default ones are:

  • global – /usr/share/fluxbox/styles
  • user only – ~/.fluxbox/styles

Links to some theme sites are provided below.

Autostarting Applications

xinitrc users should put all code into ~/.xinitrc. However, fluxbox provides functionality to autostart applications on its own.

The ~/.fluxbox/startup file is a script for autostarting applications as well as starting fluxbox itself. The # symbol denotes a comment.

A sample file:

fbsetbg -l # sets the last background set, very useful and recommended.
# In the below commands the ampersand symbol (&) is required on all applications that do not terminate immediately.
# failure to provide them will cause fluxbox not to start.
idesk &
xterm &
# exec is for starting fluxbox itself, don't put an ampersand (&) after this or fluxbox will exit immediately
exec /usr/bin/fluxbox
# or if you want to keep a log, uncomment the below command and comment out the above command:
# exec /usr/bin/fluxbox -log ~/.fluxbox/log

A life after xorg.conf

Xorg no longer requires an xorg.conf file. Traditionally this is where you would change your keyboard settings and powersave settings. Luckily there are elegant solutions not using xorg.conf.

Setting your keyboard right

Just add the following line to ~/.fluxbox/startup:

setxkbmap us -variant intl & # to have a us keyboard with special characters enabled (like éóíáú)

Instead of ‘us’ you can also pass your language code and remove the variant option. See man setxkbmap for more options.

To make a help function in your menu, just add in ~/.fluxbox/menu:

[submenu] (Keyboard)
      [exec] (normal) {setxkbmap us}
      [exec] (international) {setxkbmap us -variant intl}

Disable Powersave

Do you recognize the problem while watching a movie that the screen goes blank? Congratulations, Xorg just detected that you were doing nothing :). If you don’t need these movement exercises, you can disable this feature altogether. You’ll just have to remember to manually turn off your monitor if you’re not using it.

Just add the following line at the start of ~/.fluxbox/startup:

xset s off -dpms &

Additional Resources

  1. Belum ada komentar.
  1. No trackbacks yet.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:


You are commenting using your account. Logout /  Ubah )

Foto Google+

You are commenting using your Google+ account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )


Connecting to %s

%d blogger menyukai ini: