A small, yet slick desktop that, when combined with Rox, provides a powerful alternative to KDE or GNOME. [This article initially appeared in TUX, issue 12.]
by John Knight
Here's a desktop that happens to be a favorite of mine, and a favorite of readers too, Fluxbox. Aesthetically pleasing, minimalist, slick, simple, elegant and lean, Fluxbox is easily one of the best lightweight desktops available. Fluxbox is based around the coding, look and feel of Blackbox, a much-revered desktop of the past, but Fluxbox picks up where Blackbox left off. Adding usability enhancements, entirely new features and updating to newer standards, Fluxbox takes Blackbox into the 21st century.
The Fluxbox interface is simple, and the first time you boot in to the main screen, you won't be intimidated. You'll be greeted with a blank desktop, usually sporting a tasteful color scheme, with a non-invasive taskbar at the bottom. Is that it? Nope. Right-click on the desktop, and a menu appears. Middle-click, and a different menu appears. And that's pretty much it, sort of. The GUI provides all the features you could want, but they've been neatly organized so there's no clutter. Let's explore each feature in detail.
Going from left to right, first we have the workspace name. Second are two arrows, which are for switching between workspaces. Third, in the center of the bar, is each window's button, and (assuming you have windows open) clicking them switches between the windows, like most desktops. Fourth, are two more buttons, which switch between any open windows. And, finally, there's the clock.
Right-clicking on the desktop opens the Fluxbox menu. Unlike many other desktops, if you move the mouse away from the menu, the menu doesn't disappear (which avoids the hassle of having to go through the menu again if you miss the target the first time). To make the menu disappear, simply left-click on the desktop. If you middle-click on the desktop, the Workspaces menu appears, which we discuss more later.
Going back to the Fluxbox menu, if you're lucky, there will be a menu containing most of your installed applications, system-wide (this is called Apps in my distribution, but it may be called something different in yours). From here, you should be able to fire up any application that you can under KDE or GNOME. If you look down the list, you'll see that the Workspaces menu is also in the Fluxbox menu.
At the top right of a window's titlebar are the three familiar buttons: Minimize (or Iconify), Maximize and Close. At the left of the titlebar is the Sticky button, used to make a window persist on every workspace. However, resizing windows isn't as intuitive as with other window managers; you can't simply grab any part of a window's border and pull it the way you want to go. To resize, look in the bottom left and right corners of the current window, and you'll see a small button in each corner. Click one of the buttons and drag to resize.
Middle-clicking on the desktop brings up the previously mentioned Workspaces menu. The menu contains the following items:
- New Workspace: adds another workspace to the ones you already have.
- Remove Last: gets rid of the last workspace on the list. li>Workspace x: a submenu (x is the number of the workspace being used at the time), it allows you to view all of the open windows in that particular workspace and switch to them. With each window entry comes its own submenu, letting you minimize or close the window, send it to another workspace and so on.
- Icons: gives you a listing of the minimized windows across all workspaces and allows you to restore them.
Switching between workspaces is an easy process. The two buttons on the left of the toolbar (next to the workspace name) move forward and backward through workspaces. If you have a mouse-wheel, flicking up and down over empty space on the desktop also changes between workspaces. If you want to rename the current workspace, simply click on the workspace name on the left of the toolbar, and a small menu appears. Choose the top option called Edit current workspace name, and a small dialog box appears. Enter the new name, press Enter and you're set. Desktop warping also is enabled by default. When you drag a window to the edge of a workspace and keep going, Fluxbox automatically warps to the next workspace and places the window there.
What is this Slit thing anyway? Many people think the Slit is the toolbar on the bottom, but they are mistaken. The Slit is a place for certain dock windows to reside. WindowMaker users will be familiar with docking windows, but KDE and GNOME users will recognize these as the icons that appear on the taskbar when you run something like KMix, XMMS, amaroK and so forth. The Slit usually resides on the toolbar, but you can configure it to sit somewhere else. Like the Toolbar, the Slit can be configured from within the Fluxbox menu--simply browse through Configuration --> Slit.
There are three main configuration utilities, and they all reside in the
Fluxconf Launcher. To run the Fluxconf Launcher, either find it somewhere
in your menu, or run the command. In my menu (Libranet 3.0), it's under
Apps --> Tools --> fluxconf. If you can't find it, try running it from
a terminal, usually available under XShells in the Fluxbox menu. Simply
fluxbare, and you should be fine. The command
fluxbare provides a tiny toolbar allowing you to launch the different
parts of the Fluxconf package. If it isn't there, you can run each
utility individually with the commands
Here you can change things like the number of workspaces, whether or not
to autohide the Slit, how wide the toolbar is and so on. We don't have
space to go into all the available options, but try experimenting for
yourself. One of the first things you should do is change the Key file
location and Menu file location to
~/.fluxbox/fluxbox-menu. If they are set
to something like /etc/... or /usr/..., you won't be able to save any
modifications you make, unless you're root. Once you are finished,
click Save and Let Fluxbox change the conf at the bottom. You have to
restart Fluxbox for the changes to work. Simply choose Restart, which
is second from the bottom on the Fluxbox menu.
As the title suggests, this defines shortcut keys in Fluxbox. To define a shortcut, browse through the predefined shortcuts on the left, and choose the action you want from the drop-down menu toward the right. And, in case you're wondering, the Mod keys are Alt (don't ask me why).
The fluxmenu application allows you add or remove entries on the main Fluxbox menu. The first thing you should do is resize the window so that the third column, Command/Comment, is visible. The Save button explains itself, but the others are more cryptic. As you should see when scrolling through the list, the menu is made up of submenus and execs.
A submenu is a menu within the main menu. An exec is the actual program you want to run, and these are the entries within the menus. To make a new submenu, perform the following steps:
- Click Add sub.
- Click on the empty title field on its right, and enter the name you want.
To make a new exec, perform the following steps:
- Click on the submenu under which you want it to be located.
- Click the Add exec button.
- Give the new entry a name in the Title field.
- Enter the program's command in the field on the right.
What about the Add clever button? Well, if you have an exec selected, it'll make a new exec. If you have a submenu selected, it'll make a new submenu. If you don't like an entry's position on the list, click and drag it up or down to wherever you want it. Once you're finished, don't forget to click Save before you quit.
For a desktop file manager and icons, the best choice is Rox. Like the window managers covered in previous issues of TUX, however, you have to dive into a hidden directory to make it work (see the Viewing Hidden Directories sidebar).
- Look under (your home)/.Fluxbox, and open the file startup.
Add a new line at the end of the section where it says "#
Applications you want to run with Fluxbox", and type
rox -pinboard=Default &. Make sure there's no # at the start of your new line.
- Save the file, and restart Fluxbox.
Under my distribution, GNOME's login manager gets in the way, and the above steps don't work properly. For a workaround, I simply add Rox to my Fluxbox menu using the same command and activate the Rox Pinboard through the menu. This can be annoying, but at least you always have the choice of running a normal Fluxbox or running Rox as well.
Once you have Rox running, you need to retrieve the Fluxbox menu, or you won't be able to quit Fluxbox or run any of the programs!
- Right-click on the Rox Pinboard and choose Rox-Filer --> Options.
- Choose Compatibility from the menu on the left and check the boxes for Pass all backdrop mouse clicks to window manager and Blackbox root menus hack under Window manager problems.
This enables you to access Fluxbox's right-click desktop menu again, but with the side effect of not being able to use Rox's menu anymore. If you ever need to access the Pinboard's right-click menu again, simply make your way to Rox Options by right-clicking in the Rox File Manager, and turn off the above options.
Is Fluxbox for You?
At the end of the day, Fluxbox is one of the slickest, smallest, yet most elegant desktops in existence, and trying it out at least once is mandatory. By itself, it's very strong and attractive, but combined with Rox, it becomes powerful yet CPU-friendly. After years of Linux usage, Fluxbox is still a favorite of mine.
Sidebar: Related Projects
Blackbox--the original project from which all its derivatives spring: blackboxwm.sourceforge.net.
Openbox--if you like the look and feel of Blackbox/Fluxbox, you can use it under large desktops like GNOME with Openbox: openbox.org.
Waimea--much like Openbox, Waimea adds extra features, such as menu translucency: www.waimea.org.
Sidebar: Viewing Hidden Directories
Konqueror and Nautilus:
Click View --> Show Hidden Files
Click Options --> Show Hidden
Click the eye icon on the top row of buttons.
FbPager adds a box to preview workspaces and switch between them, as in KDE and GNOME.
fbpanel adds a GNOME-like toolbar, but is designed around Fluxbox.
fbdesk is Fluxbox's original, yet less-intuitive answer for desktop icons.
About the Author
John Knight is a 21-year-old, rock-climbing, Japan-loving megalomaniac, trying to take over the world from his bedroom via his keyboard. He spends most of his time tinkering with MPlayer and headbanging to his MP3s.