PreviousNext
Help > 68. bConf:About
68. bConf:About

This page is about the Openbox configuration tool, ObConf 2.0.

Installing and distributing Openbox themes

ObConf now easily installs new themes which use the .obt Openbox theme archive format for distribution. Just open any .obt theme archive in your file browser, or use the interface provided inside ObConf.

You can also use ObConf to create .obt Openbox theme archives for distributing your own themes.

Screenshots

(thumbnail)

http://openbox.org/oldwiki/skins/common/images/magnify-clip.png

Theme options

(thumbnail)

http://openbox.org/oldwiki/skins/common/images/magnify-clip.png

Appearance options

(thumbnail)

http://openbox.org/oldwiki/skins/common/images/magnify-clip.png

Behavior options

(thumbnail)

http://openbox.org/oldwiki/skins/common/images/magnify-clip.png

Desktop options

(thumbnail)

http://openbox.org/oldwiki/skins/common/images/magnify-clip.png

Dock options

Download

ObConf is available for download here.

The current changelog is found here.

Installing ObConf

ObConf should be installed to the /usr prefix to have file associations function correctly.

When ObConf is installed, upgraded or uninstalled, you need to run these commands to update the .obt file associations for GNOME:

update-mime-database /usr/share/mime

update-desktop-database /usr/share/applications

These programs are a part of the shared-mime-info and desktop-file-utils packages. They should be installed if GNOME is installed.

Dependencies

Compiling ObConf requires the following packages:

GTK+ 2.x library and headers (development package)

Glade 2.x library and headers (development package)

Openbox 3.4 or above (the libraries development package if it is separate)

Building ObConf

If you have installed Openbox into the /usr/local prefix, you will need to tell the ObConf configure script where to find the Openbox libraries:

  PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure --prefix=/usr

 

Openbox on Gnome

Use these instructions only if you're converting an existing Gnome desktop to Openbox.

Replacing Metacity in Gnome

To replace Metacity on a Gnome installation, type this command into the run dialog (Alt+F2):

openbox --replace

Creating a Openbox/Gnome session

For Natty 11.04, create the following two files as root (sudo) and then you will be able to select "Classic Ubuntu (with Openbox)" as an option at login:

/usr/share/gnome-session/sessions/openbox.session

[GNOME Session]

Name=Openbox GNOME

Required=windowmanager;panel;filemanager;

Required-windowmanager=openbox

Required-panel=gnome-panel

Required-filemanager=nautilus

DefaultApps=gnome-settings-daemon;

/usr/share/xsessions/openbox-gnome.desktop

[Desktop Entry]

Name=Ubuntu Classic (with Openbox)

Comment=This session logs you into GNOME with Openbox as the window manager

Exec=gnome-session --session=openbox

TryExec=gnome-session

Icon=

Type=Application

X-Ubuntu-Gettext-Domain=gnome-session-2.0

Prior to 11.04: If you wish to keep Openbox as your default window manager, just save your session on logout. When you reach the GDM login, clicking on the "Session" button should give you Openbox as an option. Click it to start Openbox after your login.

Openbox by itself

Starting Openbox on its own is an easy task. Edit your ~/.xinitrc file and add this line to trigger Openbox when X starts.

exec openbox-session

Of course, without some additional programs and accessories, there's very little to see in a pure Openbox installation. Keep reading for more ideas.

Configuration

menu.xml and rc.xml

Openbox uses two main configuration files: rc.xml, which sets keybindings, desktop names and window behavior; and menu.xml, which contains the instructions for the right-click menu. As you might have guessed, both files are written in XML and can be edited in any text editor program. User-specific copies are stored in ~/.config/openbox/ and used first by default. If user-specific files do not exist or contain invalid XML, Openbox will revert to the default configuration files in /etc/xdg/openbox/.

Here's an example of what's inside the menu.xml file.

<item label="Program_Name">

        <action name="Execute">

                <execute>

                        Program_Command

                </execute>

        </action>

</item>

As you can see, the menus are neatly nested so they can be easily followed. Each entry has an opening tag and a closing tag, and each is clearly readable. rc.xml has a similar structure.

For more information about how to hand-edit Openbox's XML files, read over the Openbox Web site.

ObMenu

If you're not keen on editing an XML file, there's ObMenu. This is a very small Python program that will allow you to modify your menu with a simple GUI, and save the results back into your menu.xml file. It's fast, easy and you don't have to worry about typos in your menu.xml file.

Obmenu has been included in the repositories. To install open a terminal and type:

sudo apt-get install obmenu

The command "obmenu" runs the program.

Customizing

Openbox might just be a window manager, but there are plenty of opportunities to add some flair.

Obconf

Obconf is a handy program to customise Openbox. It allows for the selection of themes, some window behaviour, the number of desktops, and the dock. You can start Obconf with this command:

obconf

Note: Edgy (Ubuntu 6.10) users should be aware of a small discrepancy in Obconf that might prevent it from running. You can correct that with these commands ...

cd /usr/lib

sudo ln libobparser.so.0.4.0 libobparser.so.1

sudo ln libobrender.so.0.4.0 libobrender.so.1

Entering obconf in an X terminal window should now trigger the Obconf dialogue.

Themes

A variety of default themes are available in the repositories; you can install them via Synaptic, or through a terminal command:

sudo apt-get install openbox-themes

These system-wide themes are stored in /usr/share/themes and may be a good base to copy to your ~.themes directory and customize (see modifying themes below).

A number of third-party sites also offer themes as compressed packages. Download the one you like, then decompress it into the ~/.themes folder.

tar -xzvf compressed-theme-package-that-you-downloaded.tar.gz -C ~/.themes/

Don't forget the trailing slash. Now you can use Obconf to select your theme.

Modifying themes

The better part of a theme package is contained in a text file called themerc inside some nested folders in ~/.themes. If you want to fine-tune a theme (such as, make the letters bigger, or change the width of a window handle, or pick a different color), find the correct file in your ~/.themes folder and edit it as you like.

When you save it, you can reselect the theme with Obconf, and your changes will take effect.

Wallpaper

feh

A number of programs can handle the responsibility of showing a background image; the most common is a funny little program called feh.

feh is actually a lightweight image viewer with a number of options, but perhaps the most popular is the ability to draw a desktop background. Pick a wallpaper image and try this command in a terminal.

feh --bg-scale /path/to/your/background/image.jpg

Feh can handle other file types than just jpg. Once you've picked a wallpaper, feh stores the name in a file called .fehbg. That means you can tell it to restore the wallpaper on the next boot by checking to see what's inside that file. Add this line to your ~/.xinitrc file.

eval `cat $HOME/.fehbg` &

Nitrogen

If you perfer a graphical method for choosing between many background images, perhaps nitrogen is a good option. Nitrogen allows you to choose from many background images from a preset directory, you should add any wallpapers you wish to choose from to this directory.

To use nitrogen, you should add

nitrogen /path/to/backgroundfiles/

to your menu.xml file (or alternatively add it to your menu using obmenu.)

Next you must add

nitrogen --restore

to your ~/.config/openbox/autostart.sh (You can create this file if it does not exist)

Now you can use your nitrogen entry in your menu to change your wallpaper and the changes will be restored on login.

Random wallpaper

One neat trick available with feh is a random wallpaper on each boot. Make a directory in your home folder called "wallpapers", then put a few background images in it. Then copy this text into a file called wallpaper.sh, and save it anywhere.

WALLPAPERS="$HOME/path_to_your_wallpapers"

ALIST=( `ls -w1 $WALLPAPERS` )

RANGE=${#ALIST[*]}

SHOW=$(( $RANDOM % $RANGE ))

 

feh --bg-scale $WALLPAPERS/${ALIST[$SHOW]}

Next make the script executable.

chmod +x wallpaper.sh

Now add that program to your ~/.xinitrc file, like this.

./wallpaper.sh

When you log in, the script should be executed, and feh will pick a new wallpaper for your amusement.

Other options

feh isn't the only program that can handle drawing a background image. Here are some others.

xsetbg

imagemagick

nitrogen

Additionally, some file managers have the option of managing your wallpaper.

rox-filer

PCManFM

Nautilus, if started without the --no-desktop option, will draw over the background image

Desktop icons

iDesk

You can add customizable, clickable icons to your desktop with iDesk. iDesk is available in the Ubuntu repositories, and is installable from the command line with

sudo apt-get install idesk

Consult the iDesk wiki for instructions on how to configure and use iDesk. For icon sets, you may wish to search the repositories, or download them from third-party customization sites, such as Gnome-Look.org and similar locations.

Rox-Filer

Rox-filer is a file manager, but in addition to handling wallpaper, it also has a pinboard option, and can manage desktop icons. Install rox-filer with this command:

sudo apt-get install rox-filer

You can set up the pinboard through Rox's menus.

Taskbars and pagers

Some people prefer to use a taskbar or pager to keep track of running programs. Here's a list of applications you can add to your Openbox installation that will handle that task for you.

Taskbars

pypanel (Note: For Ubuntu 6.10 users, the PyPanel included in the repositories is often reported as broken. Look here for a possible way to fix it.)

gnome-panel

fspanel

fbpanel

perlpanel

xfce4-panel

tint2

Pagers

bbpager

neap

System monitors

If you're looking for a way to display system information, try these nifty programs.

gkrellm, which has a number of floating or docked graphical meters and displays

adesklets, for similar graphical displays

conky, a highly configurable text and graphic output that draws directly to your desktop

If you're working on Openbox in conjunction with a Gnome installation, you might also look into gdesklets, which features some very polished monitors and meters for desktop display.

GTK themes

Program GUIs might look ugly if you're working on a pure Openbox system. Install gtk-theme-switch and the gtk2-engines package to give yourself a few more appealing options.

sudo apt-get install gtk-theme-switch gtk2-engines

Bring up the configuration menu with this command, from a terminal or the Openbox right-click menu.

switch2

Be sure to search the repositories for other engines that aren't included in the gtk2-engines package.

You can also try installing a Gnome package that will manage some of the settings for you.

sudo apt-get install gnome-settings-daemon

If you prefere an XFCE look, try

sudo apt-get install xfce-mcs-manager

Either program will run, depending on what's installed, from openbox autostart.sh.

Automounting

To automount external volumes -- like CDs and USB drives -- you will need a volume manager. Here is the Gnome application that handles that:

sudo apt-get install gnome-volume-manager

Kubuntu and Xubuntu share the ivman application, which is installable with:

sudo apt-get install ivman

Screensaver

If you're building an Openbox desktop with Gnome already installed, you'll probably already have gnome-screensaver in place. Pure Openbox fans might want to install xscreensaver, which is more customizable and has a wider variety of screensavers involved.

Without K/X/Ubuntu in place, installing xscreensaver needs a couple of extra commands:

sudo mkdir /usr/share/backgrounds

sudo apt-get install xscreensaver xscreensaver-gl-extra xscreensaver-data-extra

The first command sets up a default directory that xscreensaver will look for when it runs. If you don't create that directory, you'll get a string of error messages the first time you set the preferences.

The second command installs xscreensaver and its optional files. xscreensaver in Ubuntu is packaged with several screensaver options enabled, but not installed. As a result, you might see brief error messages when the daemon picks an enabled screensaver that it can't find. Adding those packages puts the missing screensavers in place, which is easier than disabling the absent ones.

Now add this command to your ~/.xinitrc file, to start the xscreensaver daemon on boot.

xscreensaver -no-splash

You can access the xscreensaver preferences panel by running xscreensaver-demo from the Openbox menu or from a terminal window.

Run dialogue

Some people find it convenient to invoke a run dialogue program, which is usually triggered with ALT+F2. You'll need to change the keybinding in the rc.xml file in order to regain that function.

If you are using XFCE components, changing rc.xml to point at xfrun4 might solve the problem. If not, consider installing the gmrun program.

sudo apt-get install gmrun

Change your rc.xml file to point to gmrun; you don't have to add it to your .xinitrc file, though.

If you are running Gnome, you probably want to probably want to bind Alt+F2 (A-F2) to the Gnome run dialog by adding the following to your rc.xml file:

    <keybind key="A-F2">

      <action name="Execute">

        <execute>gnome-panel-control --run-dialog</execute>

      </action>

    </keybind>

Other window managers

To replace Metacity

As an alternative to Metacity, consider these window managers.

xfwm4: This is the default window manager for the XFCE4 desktop environment, and is a very comprehensive substitute. Instructions on replacing Metacity with XFCE4 are found here.

compiz: Compiz is a modern window manager that has many effects, such as animations, decoration opacity and provides its own composite manager.

E17: Enlightenment provides a full desktop environment, based around speed and attractiveness. This includes the window manager and a desktop shell.