So, you've installed
Openbox, unlike the larger desktop environments, depends on very few libraries. For that reason, it can provide a lightweight graphic environment that runs very quickly, even on older hardware. Whether your hardware is old or new, Openbox also provides a highly customisable and unobtrusive working environment. That means that if you don't want or need a panel, taskbar, clock, or any other program, those choices are yours!
After you have emerged xorg-server, installing Openbox can be done in one simple command:
(Use emerge -av openbox to preview which packages will be installed) # emerge openbox
Just like with other window managers and desktop environments, you will need to
tell the X Server to load Openbox automatically, by adding it to your
# echo "exec openbox-session" >> ~/.xinitrc
This will automatically start your Openbox session when you type
Now that you have emerged Openbox and added it to your
Since you're looking at nothing more than a black screen, you may be wondering
where the menu is. If you click your right mouse button, you will notice that a
menu pops up in the location of your cursor. This menu is nothing more than an
example to illustrate the style of an Openbox menu. Since it
Since the default Openbox menu is essentially useless to you for the reasons
mentioned above, it's time that we create one that will work. Everything in the
Openbox menu is written in the appropriately named
An easy way to get a basic menu file which you can modify is to use MenuMaker,
which will generate a
# emerge menumaker
Once it is installed, make sure to logout of root, and back into your user account. You then instruct MenuMaker to create a menu specifically using the Openbox XML syntax:
$ mmaker -v OpenBox3
The generated menu will be located at
$ cp .config/openbox/menu.xml /etc/xdg/openbox/menu.xml
When you open up the
]]>
Simply replace anything in CAPS with your information.
Alternatively, you can
Aside from being minimalistic and lightweight, Openbox is also surprisingly
customisable and flexible. As a user, you can easily change various settings
related to theme, appearance, window placement, docking, and more. There are
two options for configuring these settings within Openbox. You may either
manually edit the
If you want to manually edit the
If manually editing the
# emerge obconf
You can then open the configurator by typing
]]>
As mentioned above, you don't see a whole lot when you issue the
In the default
# Run XDG autostart things. By default don't run anything desktop-specific # DESKTOP_ENV="" # if which /usr/lib/openbox/xdg-autostart >/dev/null; then # /usr/lib/openbox/xdg-autostart $DESKTOP_ENV # fi
In the above example, the comment symbol (#) was added before each line. The commenting method is preferred to just deleting the lines because you may want to add support for some of those startup items at a later time. Thus, leaving the default lines in place could ease that process.
Adding your own programs to the
conky &
The ampersand (&) after the command allows that application to load up in
the background. You will most likely want to load all the applications in your
Some things that you might take for granted in bigger desktop environments are
not included by default in Openbox. One such thing is setting your desktop
background. In order to place an image as your wallpaper, you will need to
emerge a program like feh or nitrogen. Feh is a simple image viewer that can
also set the background,
(feh has many other options instead of --bg-scale [which will scale the image to the screen dimensions]. Consult the feh documentation.) $ feh --bg-scale /path/to/image.jpg
Once you have set the background manually, a file called
source $HOME/.fehbg &
If you don't particularly care for the idea of having to issue a command in the terminal in order to set your background, you can alternatively use nitrogen. It will allow you to set a folder for your background images, view thumbnails of those images, and fit, stretch, or tile them to your desktop.
Installing nitrogen and getting it into your Openbox menu requires a few more
steps than are readily apparent. Firstly, and most obviously, you need to emerge
nitrogen. Due to
nitrogen /path/to/your/backgrounds/folder
Thirdly, you can set your background image, but it will not be there after you
logout. Just as with feh, you need to restore your background by editing your
nitrogen --restore &
This will cause nitrogen to load automatically when you start your Openbox session, and that can lead to a slightly slower load time than using feh.
The following is a list of some programs which you might want to use within your Openbox environment. While the list contains numerous terminal emulators, file managers, panels, and more, it should by no means be considered exhaustive. If none of the programs listed fit your needs, please check the appropriate categories in Portage for more options.
If installing each component of a working environment sounds like a little
If you already have a GNOME environment installed, you may just want to replace
the Metacity window manager with Openbox. Fortunately, this is quite a simple
task! You will need to fire up your favourite editor, open your
exec openbox-gnome-session
If you use GDM or another graphic login manager, you will see a new
"GNOME/Openbox" option in your session menu. You can simply select that option
instead of manually editing your
Say you have KDE installed and like it, but you want more flexibility with your
window management than KWin offers. You can use Openbox as your window manager
inside of KDE by simply editing your
exec openbox-kde-session
Now when you issue
If you use KDM or another graphic login manager, you will see a new
"KDE/Openbox" option in your session menu. You can simply select that option
instead of manually editing your
If you use Xfce4 and would like to replace xfwm4 with Openbox, you will need to go about it a little differently than with KDE or GNOME. Firstly, you need to start your normal Xfce session, and open up a terminal. From the terminal, issue the following command:
$ killall xfwm4 ; openbox & exit
Secondly, you need to exit out of your Xfce session, and make sure to tick the
checkbox that says "Save session for future login." This will keep Openbox as
your default window manager. Thirdly, you will notice that you can't logout
properly when using the default menu action. To fix this problem, open up your
- ]]>
xfce4-session-logout
While this document will easily take you through the inital installation and customisation of Openbox, it is by no means the only reference on the topic. There are several other resources that will aid you in creating your perfect Openbox setup. Some of them are listed below: