Difference between revisions of "Fluxbox"

From ArchWiki
Jump to: navigation, search
m (fixes)
(The Slit)
 
(46 intermediate revisions by 18 users not shown)
Line 5: Line 5:
 
[[fr:Fluxbox]]
 
[[fr:Fluxbox]]
 
[[it:Fluxbox]]
 
[[it:Fluxbox]]
 +
[[ja:Fluxbox]]
 
[[ko:Fluxbox]]
 
[[ko:Fluxbox]]
 
[[pl:Fluxbox]]
 
[[pl:Fluxbox]]
Line 11: Line 12:
 
[[sr:Fluxbox]]
 
[[sr:Fluxbox]]
 
[[zh-TW:Fluxbox]]
 
[[zh-TW:Fluxbox]]
 
+
[[zh-CN:Fluxbox]]
Fluxbox is yet another window manager for X11. It is based on the (now abandoned) Blackbox 0.61.1 code, but with significant enhancements and continued development. Fluxbox is very light on resources and fast, yet provides interesting window management tools such as tabbing and grouping. Its configuration files are easy to understand and edit and there are hundreds of Fluxbox "styles" to make your desktop look great. Arch Linux with Fluxbox can turn an old Pentium 800 box with just 256MB of RAM into a very usable computer.
+
{{Style|Various issues, see [[Help:Style]]}}
 +
Fluxbox is a window manager for X11. It is based on the (now abandoned) Blackbox 0.61.1 code, but with significant enhancements and continued development. Fluxbox is very light on resources and fast, yet provides interesting window management tools such as tabbing and grouping. Its configuration files are easy to understand and edit with hundreds of Fluxbox "styles" to make your desktop look great. Arch Linux with Fluxbox can turn an old Pentium 800 box with just 256MB of RAM into a very usable computer.
  
 
== Installation ==
 
== Installation ==
  
[[pacman|Install]] {{Pkg|fluxbox}} from the [[official repositories]].
+
[[Install]] the {{Pkg|fluxbox}} package.
You must have [[Xorg]] as well.
+
  
 
== Starting Fluxbox ==
 
== Starting Fluxbox ==
  
=== Method 1: KDM/GDM/LightDM login managers ===
+
'''Graphical login'''
  
Users of [[KDM]], [[GDM]] or [[Lightdm]] should find a new Fluxbox entry added to their session menu automatically.  Simply choose the Fluxbox option from the session menu when logging in.
+
Just choose the ''fluxbox'' option from the session menu of your favourite [[display manager]].
  
=== Method 2: ~/.xinitrc ===
+
'''Manually'''
  
Edit {{ic|~/.xinitrc}} and add the following code:
+
Edit {{ic|~/.xinitrc}} and add the following line:
  
 
  exec startfluxbox
 
  exec startfluxbox
  
See [[xinitrc]] for details, such as preserving the logind (and/or consolekit) session.
+
See [[xinitrc]] for details, such as preserving the logind session.
  
 
== Configuration ==
 
== Configuration ==
Line 37: Line 38:
 
System-wide Fluxbox configuration files are in {{ic|/usr/share/fluxbox}} while user configuration files are in {{ic|~/.fluxbox}}. The user config files are:
 
System-wide Fluxbox configuration files are in {{ic|/usr/share/fluxbox}} while user configuration files are in {{ic|~/.fluxbox}}. The user config files are:
  
* '''init''' - the main Fluxbox resource configuration file. See [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file]
+
* ''init'' - the main Fluxbox resource configuration file. See [http://fluxbox-wiki.org/category/howtos/en/Editing_the_init_file.html  Editing the init file]
* '''menu''' - the Fluxbox menu config. See below and [http://fluxbox-wiki.org/index.php?title=Editing_the_menu Editing the menu file]
+
* ''menu'' - the Fluxbox menu config. See below and [http://fluxbox-wiki.org/category/howtos/en/Editing_the_menu.html Editing the menu file]
* '''keys''' - the Fluxbox keyboard shortcuts (hotkeys) file. See below and [http://fluxbox-wiki.org/index.php?title=Keyboard_shortcuts here]
+
* ''keys'' - the Fluxbox keyboard shortcuts (hotkeys) file. See below and [http://fluxbox-wiki.org/category/howtos/en/Keyboard_shortcuts.html here]
* '''startup''' - where to launch startup apps but see below for .xinitrc and also [http://fluxbox-wiki.org/index.php?title=Editing_the_startup_file here]
+
* ''startup'' - where to launch startup apps but see below for .xinitrc and also [http://fluxbox-wiki.org/category/howtos/en/Editing_the_startup_file.html here]
* '''overlay''' - a config file to override elements of styles. See [http://fluxbox-wiki.org/index.php?title=Style_overlay here].
+
* ''overlay'' - a config file to override elements of styles. See [http://fluxbox-wiki.org/category/howtos/en/Style_overlay.html here].
* '''apps''' - a config file for remembering the window configuration of specific apps. See [http://fluxbox-wiki.org/index.php?title=Editing_the_apps_file here]
+
* ''apps'' - a config file for remembering the window configuration of specific apps. See [http://fluxbox-wiki.org/category/howtos/en/Editing_the_apps_file.html here]
* '''windowmenu''' - a config file for altering the Window Menu itself: [http://fluxbox-wiki.org/index.php?title=Editing_the_windowmenu read this]
+
* ''windowmenu'' - a config file for altering the Window Menu itself: [http://fluxbox-wiki.org/category/howtos/en/Editing_the_windowmenu.html read this]
  
 
There are a couple of other less important config files in the directory. But the main ones to be concerned with are init, menu, keys and perhaps startup.
 
There are a couple of other less important config files in the directory. But the main ones to be concerned with are init, menu, keys and perhaps startup.
Line 50: Line 51:
  
 
When you first install Fluxbox a very basic applications menu will be created at {{ic|~/.fluxbox/menu}}. You access the menu via a right mouse button click on the desktop. As with other lightweight window managers Fluxbox does not automatically update its menu when you install new applications. It is therefore recommended that you install most of the apps you want on your system first and then re-generate or edit the menu. To enhance the menu and add/edit items there are basically four ways to do it:
 
When you first install Fluxbox a very basic applications menu will be created at {{ic|~/.fluxbox/menu}}. You access the menu via a right mouse button click on the desktop. As with other lightweight window managers Fluxbox does not automatically update its menu when you install new applications. It is therefore recommended that you install most of the apps you want on your system first and then re-generate or edit the menu. To enhance the menu and add/edit items there are basically four ways to do it:
 
+
 
 
==== fluxbox-generate_menu ====
 
==== fluxbox-generate_menu ====
  
Line 59: Line 60:
 
==== MenuMaker ====
 
==== MenuMaker ====
  
[http://menumaker.sourceforge.net 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.
+
[http://menumaker.sourceforge.net 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.
  
 
Install {{Pkg|menumaker}}, then you can generate a complete menu and overwrite the default one by running:
 
Install {{Pkg|menumaker}}, then you can generate a complete menu and overwrite the default one by running:
 
  $ mmaker -f FluxBox
 
  $ mmaker -f FluxBox
  
To see MenuMaker options:
+
You can avoid populating your menu with terminal based applications such as ''alsamixer'' by running the following switches with the mmaker command: {{ic|--no-legacy}} and {{ic|--no-debian}}. For example:
$ mmaker --help
+
  
==== Arch Linux Xdg menu ====
+
$ mmaker -f --no-legacy --no-debian FluxBox
  
Requires [[XdgMenu]]. Install {{Pkg|archlinux-xdg-menu}}.
+
To see more MenuMaker options:
 +
$ mmaker --help
  
Then, to create a Fluxbox menu:
+
==== Xdg-menu ====
$ xdg_menu --fullmenu --format fluxbox --root-menu /etc/xdg/menus/arch-applications.menu > ~/.fluxbox/menu
+
 
 +
You can also generate a menu using [[Xdg-menu]]. See the [[Xdg-menu#FluxBox]] section.
  
 
==== Manually create/edit the menu ====
 
==== Manually create/edit the menu ====
Line 88: Line 90:
 
  ...
 
  ...
 
  [end]
 
  [end]
When done editing save the file and exit. There is no need to restart Fluxbox. For more info read [http://fluxbox-wiki.org/index.php?title=Editing_the_menu editing the Fluxbox menu].
+
When you have finished editing, save the file and exit. There is no need to restart Fluxbox. For more info read [http://fluxbox-wiki.org/category/howtos/en/Editing_the_menu.html editing the Fluxbox menu].
  
 
=== Init ===
 
=== Init ===
  
The {{ic|~/.fluxbox/init}} file is Fluxbox's primary configuration resource file. You can change the basic functionality of Fluxbox, windows, toolbar, focus, etc. Some of these options are also available from the Fluxbox, Configuration Menu. For more detail read [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file].
+
The {{ic|~/.fluxbox/init}} file is Fluxbox's primary configuration resource file. You can change the basic functionality of Fluxbox, windows, toolbar, focus, etc. Some of these options are also available from the Fluxbox, Configuration Menu. For more detail read [http://fluxbox-wiki.org/category/howtos/en/Editing_the_init_file.html Editing the init file].
  
 
=== Hotkeys ===
 
=== Hotkeys ===
  
 
Fluxbox offers basic hotkeys functionality. The Fluxbox hotkey file is located at {{ic|~/.fluxbox/keys}}.
 
Fluxbox offers basic hotkeys functionality. The Fluxbox hotkey file is located at {{ic|~/.fluxbox/keys}}.
The Control key is represented by "Control". Mod1 corresponds to the Alt key and Mod4 corresponds to Meta (not a standard key but most users map Meta to the "Win" key). When installed and first run Fluxbox will provide you with a very usable, almost complete set of hotkeys. You should peruse and learn the {{ic|~/.fluxbox/keys}} file to enhance your Fluxbox experience.
+
The Control key is represented by "Control". {{ic|Mod1}} corresponds to the Alt key and {{ic|Mod4}} corresponds to Super (not a standard key but most users map Super to the "Win" key). You should peruse and learn the {{ic|~/.fluxbox/keys}} file to enhance your Fluxbox experience.
  
Example: here is a quick way to control the Master volume:
+
==== Sound ====
Control Mod1 Up :Exec amixer set Master,0 5%+ 
+
 
Control Mod1 Down :Exec amixer set Master,0 5%-
+
See [[Advanced Linux Sound Architecture#Keyboard volume control]] and [[PulseAudio#Keyboard volume control]].
  
 
=== Workspaces ===
 
=== Workspaces ===
Line 113: Line 115:
 
=== Wallpaper ===
 
=== Wallpaper ===
  
Setting the background in Fluxbox has historically been convoluted, especially where transparency was required. The Fluxbox wiki now has an entry for [http://fluxbox-wiki.org/index.php?title=Howto_set_the_background background setting], so please refer to that.  
+
Setting the background in Fluxbox has historically been convoluted, especially where transparency was required. The Fluxbox wiki now has an entry for [http://fluxbox-wiki.org/category/howtos/en/Howto_set_the_background.html background setting], so please refer to that.
  
The easiest way to do it with ArchLinux is to first of all check that you have a background setting application available:
+
Check that you have a background setting application available:
 
  $ fbsetbg -i
 
  $ fbsetbg -i
  
 
If not, install either feh, esetroot or wmsetbg using pacman. Then add this "fbsetbg" line to your {{ic|~/.xinitrc}} file, before the "exec" line, e.g.:
 
If not, install either feh, esetroot or wmsetbg using pacman. Then add this "fbsetbg" line to your {{ic|~/.xinitrc}} file, before the "exec" line, e.g.:
 
  fbsetbg /path/to/my/image.image
 
  fbsetbg /path/to/my/image.image
 +
 +
If this command returns a line like this:
 +
$ /usr/bin/fbsetbg: line 153: xmessage: command not found
 +
Then you need to install the package xorg-xmessage
  
 
==== Swapping multiple backgrounds easily ====
 
==== Swapping multiple backgrounds easily ====
Line 128: Line 134:
 
  [wallpapers] (/usr/share/fluxbox/backgrounds) {feh --bg-scale}
 
  [wallpapers] (/usr/share/fluxbox/backgrounds) {feh --bg-scale}
 
  [end]
 
  [end]
 +
 
Then put your background images into {{ic|~/.fluxbox/backgrounds}} or any other folder you specify, they will then appear in the same fashion as your styles.
 
Then put your background images into {{ic|~/.fluxbox/backgrounds}} or any other folder you specify, they will then appear in the same fashion as your styles.
  
The same applies to a dual screen wallpaper on a system without 'xinerama' (NVidia TwinView for example) :
+
The same applies to a dual screen wallpaper on a system without 'xinerama' (NVidia TwinView for example):
 
  [submenu] (Backgrounds)
 
  [submenu] (Backgrounds)
 
  [wallpapers] (/path/to/your/backgrounds) {feh --bg-scale --no-xinerama }
 
  [wallpapers] (/path/to/your/backgrounds) {feh --bg-scale --no-xinerama }
Line 149: Line 156:
 
'''3.''' or add (or modify) the following line to the file {{ic|~/.fluxbox/startup}}:
 
'''3.''' or add (or modify) the following line to the file {{ic|~/.fluxbox/startup}}:
 
  ~/.fehbg
 
  ~/.fehbg
 +
 +
==== Nitrogen ====
 +
 +
You can also use the [[Nitrogen]] background setter with Fluxbox. Run the following command in a terminal:
 +
 +
$ nitrogen
 +
 +
to display the graphical wallpaper selector. Add the directory that contains the picture file you wish to use, select the picture and apply it. You can also change options such as whether the wallpaper should be centered or zoomed.
 +
 +
To ensure that the wallpaper is started at login, add the following line to your {{ic|~/.fluxbox/startup}} file: {{ic|nitrogen --restore &}}
 +
 +
You may find that if you restart Fluxbox, the wallpaper set by the currently selected theme overwrites the wallpaper set by Nitrogen. To fix this, edit the {{ic|theme.cfg}} file of the theme you are using and comment out or delete the following options:
 +
 +
background:
 +
background.color:
 +
background.colorTo:
  
 
=== Theming ===
 
=== Theming ===
  
To install a Fluxbox theme extract the theme archive file to a styles directory. The default directories are:
+
To install a Fluxbox theme, extract the theme archive file to a styles directory. The default directories are:
 
* Global    - {{ic|/usr/share/fluxbox/styles}}
 
* Global    - {{ic|/usr/share/fluxbox/styles}}
 
* User only - {{ic|~/.fluxbox/styles}}
 
* User only - {{ic|~/.fluxbox/styles}}
  
The ArchLinux [[AUR]] currently contains a compilation of good looking Fluxbox themes called "fluxbox-styles". Get it [https://aur.archlinux.org/packages.php?ID=28743 here] and install this package for more themes than you could possibly use. When installed correctly they will appear in the Fluxbox, Styles section of your Fluxbox menu.
+
The ArchLinux [[AUR]] currently contains a compilation of good looking Fluxbox themes called "fluxmod-styles". Get it [https://aur.archlinux.org/packages/fluxmod-styles/ here]. When installed correctly they will appear in the Fluxbox -> Styles section of your Fluxbox menu.
  
To create your own Fluxbox styles read [[Fluxbox_Style_Guide]] and this [http://tenr.de/howto/style_fluxbox/style_fluxbox.html style guide].
+
To create your own Fluxbox styles read [http://fluxbox.org/help/man-fluxbox-style.php fluxbox-style(5)], [[Fluxbox/Style guide]] and this [http://tenr.de/howto/style_fluxbox/style_fluxbox.html style guide].
  
If you use mmaker -f FluxBox to create your menus, you will not see the styles menu selection after you install the styles. To correct this add the following to {{ic|~/.fluxbox/menu}} after the restart menu item:
+
If you use mmaker -f FluxBox to create your menus, you will not see the styles menu selection after you install the styles. To correct this add the following to {{ic|~/.fluxbox/menu}} after the restart menu item:
 
                 [submenu] (System Styles) {Choose a style...}
 
                 [submenu] (System Styles) {Choose a style...}
 
                       [stylesdir] (/usr/share/fluxbox/styles)
 
                       [stylesdir] (/usr/share/fluxbox/styles)
Line 170: Line 193:
 
=== The Slit ===
 
=== The Slit ===
  
Fluxbox, WindowMaker and a couple of other lightweight window managers have a "Slit". This is a dock for any application that can be 'dockable'. A docked application is anchored and appears on every workspace. It cannot be moved freely and is not influenced by any manipulation to windows. It is basically a small widget. Dock apps that are useful in such a situation tend to be clocks, system monitors, weather, etc. Visit [http://dockapps.windowmaker.org/ dockapps.windowmaker.org]
+
Fluxbox, WindowMaker and a couple of other lightweight window managers have a "Slit". This is a dock for any application that can be 'dockable'. A docked application is anchored and appears on every workspace. It cannot be moved freely and is not influenced by any manipulation to windows. It is basically a small widget. Dock apps that are useful in such a situation tend to be clocks, system monitors, weather, etc. Visit [http://www.dockapps.net/ dockapps.net]
  
=== Autostarting Applications ===
+
=== Autostart programs ===
  
The ArchLinux way to autostart apps is to put all code into {{ic|~/.xinitrc}}. Please read [[Xinitrc]]. However, Fluxbox provides functionality to autostart applications on its own. The {{ic|~/.fluxbox/startup}} file is a script for autostarting applications as well as starting Fluxbox itself. The # symbol denotes a comment.
+
Fluxbox provides functionality to autostart applications on its own. The {{ic|~/.fluxbox/startup}} file is a script for autostarting applications as well as starting Fluxbox itself. The {{ic|#}} symbol denotes a comment.
  
 
A sample file:
 
A sample file:
 
  fbsetbg -l # sets the last background set, very useful and recommended.
 
  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.  
+
  # 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.
 
  # Failure to provide them will cause Fluxbox not to start.
  idesk &  
+
  idesk &
 
  xterm &
 
  xterm &
 
  # exec is for starting Fluxbox itself, do not put an ampersand (&) after this or Fluxbox will exit immediately.
 
  # exec is for starting Fluxbox itself, do not put an ampersand (&) after this or Fluxbox will exit immediately.
Line 197: Line 220:
 
* Slit Menu: found as a sub-menu within the configuration menu.
 
* Slit Menu: found as a sub-menu within the configuration menu.
  
=== True transparency ===
+
=== Desktop effects ===
  
To enable true transparency in Fluxbox you need an X compositor such as [[Xcompmgr]].
+
To enable desktop effects such as true transparency or shadows in Fluxbox you need an X compositor such as [[Xcompmgr]] or [[Compton]].
  
 
=== Notifications ===
 
=== Notifications ===
  
To enable connection notifications on-screen for Fluxbox read [https://bbs.archlinux.org/viewtopic.php?id=138616 this Arch forum thread].
+
To enable notifications on-screen for Fluxbox, ensure that a notification server is installed. See the [[desktop notifications]] article.
  
=== After xorg.conf ===
+
=== Xorg configuration without a xorg.conf file ===
  
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.  
+
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 ====
+
==== Set the keyboard layout with Fluxbox ====
  
 
Just add the following line to {{ic|~/.fluxbox/startup}}:
 
Just add the following line to {{ic|~/.fluxbox/startup}}:
 
  setxkbmap us -variant intl & # to have a us keyboard with special characters enabled (like éóíáú)
 
  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 (ex.: 'us_intl', which works like the command above in some setups). See man setxkbmap for more options.
+
Instead of 'us' you can also pass your language code and remove the variant option (ex.: 'us_intl', which works like the command above in some setups). See ''setxkbmap'' manual page for more options.
  
 
To make a help function in your menu, just add in {{ic|~/.fluxbox/menu}}:
 
To make a help function in your menu, just add in {{ic|~/.fluxbox/menu}}:
Line 226: Line 249:
 
* [http://fluxbox.org/ Fluxbox Homepage]
 
* [http://fluxbox.org/ Fluxbox Homepage]
 
* [http://fluxbox-wiki.org/ Fluxbox wiki]
 
* [http://fluxbox-wiki.org/ Fluxbox wiki]
* [http://en.gentoo-wiki.com/wiki/Fluxbox Gentoo Wiki about Fluxbox]
+
* [http://wiki.gentoo.org/wiki/Fluxbox Gentoo Wiki about Fluxbox]
* [http://www.gentoo.org/doc/en/fluxbox-config.xml Gentoo Fluxbox documentation]
+
* [https://www.box-look.org/browse/cat/139/ord/latest/ Themes for Fluxbox]
* [http://box-look.org/ Themes for Fluxbox]
+
* [https://bbs.archlinux.org/viewtopic.php?id=77729 Narada's Fluxbox Guide]
* [[Fluxbox_Style_Guide|Fluxbox Style duide]]
+
* [https://bbs.archlinux.org/viewtopic.php?id=77729 Narada's Fluxbox duide]
+
 
* The Fluxbox man pages: fluxbox, fluxbox-menu, fluxbox-style, fluxbox-keys, fluxbox-apps, fluxbox-remote, fbsetroot, fbsetbg, fbrun, startfluxbox.
 
* The Fluxbox man pages: fluxbox, fluxbox-menu, fluxbox-style, fluxbox-keys, fluxbox-apps, fluxbox-remote, fbsetroot, fbsetbg, fbrun, startfluxbox.
 
* [https://bbs.archlinux.org/viewtopic.php?id=90260 Arch Linux Fluxbox screenshots]
 
* [https://bbs.archlinux.org/viewtopic.php?id=90260 Arch Linux Fluxbox screenshots]

Latest revision as of 05:27, 25 August 2016

Tango-edit-clear.pngThis article or section needs language, wiki syntax or style improvements.Tango-edit-clear.png

Reason: Various issues, see Help:Style (Discuss in Talk:Fluxbox#)

Fluxbox is a window manager for X11. It is based on the (now abandoned) Blackbox 0.61.1 code, but with significant enhancements and continued development. Fluxbox is very light on resources and fast, yet provides interesting window management tools such as tabbing and grouping. Its configuration files are easy to understand and edit with hundreds of Fluxbox "styles" to make your desktop look great. Arch Linux with Fluxbox can turn an old Pentium 800 box with just 256MB of RAM into a very usable computer.

Installation

Install the fluxbox package.

Starting Fluxbox

Graphical login

Just choose the fluxbox option from the session menu of your favourite display manager.

Manually

Edit ~/.xinitrc and add the following line:

exec startfluxbox

See xinitrc for details, such as preserving the logind session.

Configuration

System-wide Fluxbox configuration files are in /usr/share/fluxbox while user configuration files are in ~/.fluxbox. The user config files are:

  • init - the main Fluxbox resource configuration file. See Editing the init file
  • menu - the Fluxbox menu config. See below and Editing the menu file
  • keys - the Fluxbox keyboard shortcuts (hotkeys) file. See below and here
  • startup - where to launch startup apps but see below for .xinitrc and also here
  • overlay - a config file to override elements of styles. See here.
  • apps - a config file for remembering the window configuration of specific apps. See here
  • windowmenu - a config file for altering the Window Menu itself: read this

There are a couple of other less important config files in the directory. But the main ones to be concerned with are init, menu, keys and perhaps startup.

Menu management

When you first install Fluxbox a very basic applications menu will be created at ~/.fluxbox/menu. You access the menu via a right mouse button click on the desktop. As with other lightweight window managers Fluxbox does not automatically update its menu when you install new applications. It is therefore recommended that you install most of the apps you want on your system first and then re-generate or edit the menu. To enhance the menu and add/edit items there are basically four ways to do it:

fluxbox-generate_menu

There is a built-in command provided with Fluxbox:

$ fluxbox-generate_menu

This command will auto-generate a ~/.fluxbox/menu file based on your installed programs. However, the menu it generates will not be as comprehensive as that generated by MenuMaker.

MenuMaker

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.

Install menumaker, then you can generate a complete menu and overwrite the default one by running:

$ mmaker -f FluxBox

You can avoid populating your menu with terminal based applications such as alsamixer by running the following switches with the mmaker command: --no-legacy and --no-debian. For example:

$ mmaker -f --no-legacy --no-debian FluxBox

To see more MenuMaker options:

$ mmaker --help

Xdg-menu

You can also generate a menu using Xdg-menu. See the Xdg-menu#FluxBox section.

Manually create/edit the menu

Use your favourite text editor and edit the file: ~/.fluxbox/menu. The basic syntax for a menu item to appear is:

[exec] (name) {command} <path to icon>

...where "name" is the text you wish to appear for that menu item and "command" is the location of the binary, e.g.:

[exec] (Firefox Browser) {/usr/bin/firefox} <path to firefox icon>

Note that the "<path to icon>" is optional. If you want to create a submenu the syntax is:

[submenu] (Name)
...
...
[end]

When you have finished editing, save the file and exit. There is no need to restart Fluxbox. For more info read editing the Fluxbox menu.

Init

The ~/.fluxbox/init file is Fluxbox's primary configuration resource file. You can change the basic functionality of Fluxbox, windows, toolbar, focus, etc. Some of these options are also available from the Fluxbox, Configuration Menu. For more detail read Editing the init file.

Hotkeys

Fluxbox offers basic hotkeys functionality. The Fluxbox hotkey file is located at ~/.fluxbox/keys. The Control key is represented by "Control". Mod1 corresponds to the Alt key and Mod4 corresponds to Super (not a standard key but most users map Super to the "Win" key). You should peruse and learn the ~/.fluxbox/keys file to enhance your Fluxbox experience.

Sound

See Advanced Linux Sound Architecture#Keyboard volume control and PulseAudio#Keyboard volume control.

Workspaces

Fluxbox defaults to having four workspaces. These are accessible using Ctrl+F1-F4 shortcuts, or by using the left mouse button to click the arrows on the toolbar. You can also access workspaces via a middle mouse button click on desktop which pops up the Workspaces Menu.

Tabbing and grouping

With at least two windows visible on your desktop use ctrl +left click on the upper window tab of one window and drag it into the other open window. The two windows will now be grouped together with window tabs in the upper window tab bar. You may now perform a window operation that will affect the entire window "group". To reverse the tabbing use Ctrl+left click on a tab and drag it to an empty space on the desktop.

Wallpaper

Setting the background in Fluxbox has historically been convoluted, especially where transparency was required. The Fluxbox wiki now has an entry for background setting, so please refer to that.

Check that you have a background setting application available:

$ fbsetbg -i

If not, install either feh, esetroot or wmsetbg using pacman. Then add this "fbsetbg" line to your ~/.xinitrc file, before the "exec" line, e.g.:

fbsetbg /path/to/my/image.image

If this command returns a line like this:

$ /usr/bin/fbsetbg: line 153: xmessage: command not found

Then you need to install the package xorg-xmessage

Swapping multiple backgrounds easily

Place the following submenu in your Fluxbox menu:

[submenu] (Backgrounds)
[wallpapers] (~/.fluxbox/backgrounds) {feh --bg-scale}
[wallpapers] (/usr/share/fluxbox/backgrounds) {feh --bg-scale}
[end]

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.

The same applies to a dual screen wallpaper on a system without 'xinerama' (NVidia TwinView for example):

[submenu] (Backgrounds)
[wallpapers] (/path/to/your/backgrounds) {feh --bg-scale --no-xinerama }
[end]

Using feh with Fluxbox

Install feh.

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:

~/.fehbg

Nitrogen

You can also use the Nitrogen background setter with Fluxbox. Run the following command in a terminal:

$ nitrogen

to display the graphical wallpaper selector. Add the directory that contains the picture file you wish to use, select the picture and apply it. You can also change options such as whether the wallpaper should be centered or zoomed.

To ensure that the wallpaper is started at login, add the following line to your ~/.fluxbox/startup file: nitrogen --restore &

You may find that if you restart Fluxbox, the wallpaper set by the currently selected theme overwrites the wallpaper set by Nitrogen. To fix this, edit the theme.cfg file of the theme you are using and comment out or delete the following options:

background:
background.color:
background.colorTo:

Theming

To install a Fluxbox theme, extract the theme archive file to a styles directory. The default directories are:

  • Global - /usr/share/fluxbox/styles
  • User only - ~/.fluxbox/styles

The ArchLinux AUR currently contains a compilation of good looking Fluxbox themes called "fluxmod-styles". Get it here. When installed correctly they will appear in the Fluxbox -> Styles section of your Fluxbox menu.

To create your own Fluxbox styles read fluxbox-style(5), Fluxbox/Style guide and this style guide.

If you use mmaker -f FluxBox to create your menus, you will not see the styles menu selection after you install the styles. To correct this add the following to ~/.fluxbox/menu after the restart menu item:

               [submenu] (System Styles) {Choose a style...}
                     [stylesdir] (/usr/share/fluxbox/styles)
                       [end]
               [submenu] (User Styles) {Choose a style...}
                     [stylesdir] (~/.fluxbox/styles)
                       [end]

The Slit

Fluxbox, WindowMaker and a couple of other lightweight window managers have a "Slit". This is a dock for any application that can be 'dockable'. A docked application is anchored and appears on every workspace. It cannot be moved freely and is not influenced by any manipulation to windows. It is basically a small widget. Dock apps that are useful in such a situation tend to be clocks, system monitors, weather, etc. Visit dockapps.net

Autostart programs

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, do not 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

Other menus

In the "Menu Management" section (above) we were discussing the main "Applications" Menu, called the "Root" menu in Fluxbox lingo. Fluxbox also has other menus available to the user:

  • Workspaces Menu: middle click on desktop.
  • Configuration Menu: located within the "Fluxbox" section of the "Root" menu.
  • Window menu: right click on the titlebar of any window, or its bar if minimized. Can be edited. See fluxbox-menu man page.
  • Toolbar menu: right click on empty part of toolbar. Also found as a sub-menu within the Configuration Menu.
  • Slit Menu: found as a sub-menu within the configuration menu.

Desktop effects

To enable desktop effects such as true transparency or shadows in Fluxbox you need an X compositor such as Xcompmgr or Compton.

Notifications

To enable notifications on-screen for Fluxbox, ensure that a notification server is installed. See the desktop notifications article.

Xorg configuration without a xorg.conf file

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.

Set the keyboard layout with Fluxbox

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 (ex.: 'us_intl', which works like the command above in some setups). See setxkbmap manual page 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}
[end]

See also