Introduction to openbox

Openbox is a highly configurable desktop window manager with extensive standards support. It allows you to control almost every aspect of how you interact with your desktop.

本パッケージは LFS-8.0 において正しくビルドでき動作することが確認されています。

Package Information

Openbox Dependencies


X ウィンドウシステム and Pango-1.40.10 (compiled with support for libXft)


dbus-1.10.22 (runtime), Imlib2-1.4.10 (to enable icons in the right click menu), PyXDG-0.25, startup-notification-0.12, and librsvg-2.40.18

User Notes:

Installation of Openbox



If XORG_PREFIX is not /usr, tell gcc about it:


If you installed only Python 3 PyXDG module convert one of the scripts to Python 3:

2to3 -w data/autostart/openbox-xdg-autostart &&
sed 's/python/python3/' -i data/autostart/openbox-xdg-autostart

Install Openbox by running the following commands:

./configure --prefix=/usr     \
            --sysconfdir=/etc \
            --disable-static  \
            --docdir=/usr/share/doc/openbox-3.6.1 &&

This package does not come with a test suite.

Now, as the root user:

make install

Command Explanations

--sysconfdir=/etc: This option puts Openbox's configuration files in /etc/xdg/openbox instead of /usr/etc/xdg/openbox.

--docdir=/usr/share/doc/openbox-3.6.1: this puts a few files in a versioned directory in /usr/share/doc.

--disable-static: このスイッチはスタティックライブラリをインストールしないようにします。

Configuring Openbox

Config Files

/etc/xdg/openbox/autostart, /etc/xdg/openbox/menu.xml, /etc/xdg/openbox/rc.xml, ~/.config/openbox/autostart, ~/.config/openbox/menu.xml and ~/.config/openbox/rc.xml

Configuration Information

Openbox's right click menu can be used to launch programs. The menu itself is configured with 2 files, /etc/xdg/openbox/menu.xml and ~/.config/openbox/menu.xml. To make changes to the menu, copy /etc/xdg/openbox/menu.xml to ~/.config/openbox/menu.xml and edit it:

cp -rf /etc/xdg/openbox ~/.config

~/.config/openbox/menu.xml can be edited with a text editor or you can install Obmenu (requires pyxml and PyGTK-2.24.0).

To have icons in your right click menu requires installing Imlib2-1.4.10 before you install Openbox. To set an icon for an entry in the menu edit ~/.config/openbox/menu.xml and add an icon to the <item> tag like this:

<item label="Mplayer" icon="/usr/share/pixmaps/mplayer.png">

Many other aspects of Openbox's behaviour are configured with ~/.config/openbox/rc.xml such as what keybindings are used to launch programs or which mouse button launches the main menu.

Details of the theme that Openbox applies to window decorations are configured in ~/.config/openbox/rc.xml. You can get a list of the available themes with the command:

ls -d /usr/share/themes/*/openbox-3 | sed 's#.*es/##;s#/o.*##'

Starting Openbox

To automatically start openbox when you start Xorg:

echo openbox > ~/.xinitrc

If you want to set a background image to your desktop you can use display and launch it from ~/.xinitrc just before openbox:

cat > ~/.xinitrc << "EOF"
display -backdrop -window root /path/to/beautiful/picture.jpeg
exec openbox

Or if you like a bit of variety, put a selection of images in a folder (in this example, the directory ~/.config/backgrounds) and choose one at random each time you xinit:

cat > ~/.xinitrc << "EOF"
# make an array which lists the pictures:
# create a random integer between 0 and the number of pictures:
random_number=$(( ${RANDOM} % ${#picture_list[@]} ))
# display the chosen picture:
display -backdrop -window root "${picture_list[${random_number}]}"
exec openbox

If you like to have the numlock key set whan you start Xorg, install Numlockx and add that to your xinitrc. Another useful application is dbus-1.10.22:

cat > ~/.xinitrc << "EOF"
. /etc/profile
random_number=$(( ${RANDOM} % ${#picture_list[*]} ))
display -backdrop -window root "${picture_list[${random_number}]}"
eval $(dbus-launch --auto-syntax --exit-with-session)
lxpanel &
exec openbox


Installed Programs: gdm-control, gnome-panel-control, obxprop, openbox, openbox-gnome-session, openbox-kde-session and openbox-session
Installed Libraries: and
Installed Directories: /etc/xdg/openbox, /usr/include/openbox, /usr/share/doc/openbox-3.6.1 and /usr/share/themes.

Short Descriptions


is a command line tool to send signals to GDM.


is a command line utility to invoke the Gnome Panel run dialog/menu.


is a tool for displaying the properties on an x window. It has a similar functionality to xprop, but allows you to see UTF-8 strings as text.


is a standards compliant, highly configurable, window manager.


is a script to launch an Gnome session with Openbox as your window manager from your ~/.xinitrc.


is a script to launch an KDE session with Openbox as your window manager from your ~/.xinitrc.


is a script to launch an Openbox session from your ~/.xinitrc.

contains the functions used by Openbox for theme rendering.

is the Openbox toolkit library.

最終更新日: 2017-02-21 09:33:44 +0900