Like other window managers, Openbox allows for scripts to dynamically build menus (menus on-the-fly). Examples are system monitors, media player controls, or weather monitors. Pipe menu script examples are found in the [http://openbox.org/wiki/Openbox:Pipemenus Openbox:Pipemenus] page at Openbox's site.

Like other window managers, Openbox allows for scripts to dynamically build menus (menus on-the-fly). Examples are system monitors, media player controls, or weather monitors. Pipe menu script examples are found in the [http://openbox.org/wiki/Openbox:Pipemenus Openbox:Pipemenus] page at Openbox's site.

−

User ''Xyne'' created a pipe menu file browser and user ''brisbin33'' created a pipe menu for scanning and connecting to wireless hot spots (using netcfg). Forum posts for these utilities are here: [http://bbs.archlinux.org/viewtopic.php?id=77197&p=1 file browser] and here: [http://bbs.archlinux.org/viewtopic.php?id=78290 wifi].

+

User ''Xyne'' created a pipe menu file browser and user ''brisbin33'' created a pipe menu for scanning and connecting to wireless hot spots (using netcfg). Forum posts for these utilities are here: [https://bbs.archlinux.org/viewtopic.php?id=77197&p=1 file browser] and here: [https://bbs.archlinux.org/viewtopic.php?id=78290 wifi].

User ''jnguyen'' created a pipe menu for managing removable devices using Udisks. The forum post is here: [https://bbs.archlinux.org/viewtopic.php?id=114702 obdevicemenu].

User ''jnguyen'' created a pipe menu for managing removable devices using Udisks. The forum post is here: [https://bbs.archlinux.org/viewtopic.php?id=114702 obdevicemenu].

Otherwise, choosing "Exit" from the root-menu causes Openbox to terminate its execution, leaving you with no window manager.

If you have a problem changing virtual desktops with the mouse wheel skipping over desktops, edit ~/.config/openbox/rc.xml. Move the mouse binds with... actions "DesktopPrevious" and "DesktopNext" from context Desktop to the context Root. Note that you may need to create a definition for the Root context as well.

When using the Openbox root-menu instead of Xfce's menu, you may exit the Xfdesktop with this terminal command:

$ xfdesktop --quit

Xfdesktop manages the wallpaper and desktop icons, requiring you to use other utilities such as ROX for these functions.

(When terminating Xfdesktop, the above issue with the virtual desktops is no longer a problem.)

Openbox for multihead users

While Openbox provides better than average multihead support on its own, a branch called Openbox Multihead is now available in the AUR that gives multihead users per-monitor desktops. This model is not commonly found in floating window managers, but exists mainly in tiling window managers. It is explained well on the Xmonad web site. Also, please see README.MULTIHEAD for a more comprehensive description of the new features and configuration options found in Openbox Multihead.

Openbox Multihead will function like normal Openbox when only a single head is available.

A downside to using Openbox Multihead is that it breaks the EWMH assumption that one and only one desktop is visible at any time. Thus, existing pagers will not work well with it. To remedy this, pager-multihead can be found in the AUR that is compatible with Openbox Multihead. Screenshots.

Finally, a new version of pytyle can also be found in the AUR that will work with Openbox Multihead.

Both pytyle3 and pager-multihead will work without Openbox Multihead if only one monitor is active.

Configuration

There are several options for configuring Openbox settings:

Manual configuration

To configure Openbox manually, edit the ~/.config/openbox/rc.xml file with a text editor. The file has explanatory comments throughout. See the Help:Configuration openbox wiki for more documentation on editing this file.

ObConf

ObConf is an Openbox configuration tool. It is used to set most common preferences such as themes, virtual desktops, window properties, and desktop margins. It can be installed with pacman:

# pacman -S obconf

ObConf cannot configure keyboard shortcuts and certain other features. For these features edit rc.xml manually. Alternatively, you can try obkeyAUR from the AUR.

Application customization

Openbox allows per-application customizations. This lets you define rules for a given program. For example:

Start your web browser on a specific virtual desktop.

Open your terminal program with no window decorations (window chrome).

Make your bit-torrent client open at a given screen position.

Per-application settings are defined in ~/.config/openbox/rc.xml. Instructions are in the file's comments. More details are found in the Help:Applications openbox wiki.

Menus

The default Openbox menu includes a variety of menu items to get you started. Many of these items launch applications you do not want, have not installed yet, or never intend to install. You will surely want to customize menu.xml at some point. There are a number of ways to do so.

Manual configuration of menus

You can edit ~/.config/openbox/menu.xml with a text editor. Many of the settings are self-explanatory. The article Help:Menus has extensive details.

Icons in menu

Since version 3.5.0 you can have icons next to your menu entries. To do that :

add <showIcons>yes</showIcons> in the <menu> section of the rc.xml file

then openbox --reconfigure or openbox --restart if you have troubles updating the menu :)

MenuMaker

MenuMaker creates XML menus for several window managers including Openbox. MenuMaker searchs your computer for executable programs and creates a menu file from the result. It can be configured to exclude certain application types (GNOME, KDE, etc) if you desire.

# pacman -S menumaker # Install MenuMaker from the repository

Once installed, generate a menu file (named menu.xml) by running the program.

Pipe menus

Like other window managers, Openbox allows for scripts to dynamically build menus (menus on-the-fly). Examples are system monitors, media player controls, or weather monitors. Pipe menu script examples are found in the Openbox:Pipemenus page at Openbox's site.

User Xyne created a pipe menu file browser and user brisbin33 created a pipe menu for scanning and connecting to wireless hot spots (using netcfg). Forum posts for these utilities are here: file browser and here: wifi.

User jnguyen created a pipe menu for managing removable devices using Udisks. The forum post is here: obdevicemenu.

Startup programs

Openbox supports running programs at startup. This is provided by command openbox-session.

Enabling autostart

There are two ways to enable autostart:

When using startx or xinit to begin a session, edit ~/.xinitrc. Change the line that executes openbox to openbox-session.

When using GDM or KDM, selecting an Openbox session automatically runs the autostart script.

Autostart script

Openbox provides a system-wide startup script which applies to all users and is located at /etc/xdg/openbox/autostart. A user may also create his own startup script to be executed after the system-wide script by creating the file ~/.config/openbox/autostart. This file is not provided by default and must be created by the user.

Further instructions are available in the Help:Autostart article at the official Openbox site.

Note: The autostart files used to be named autostart.sh prior to OpenBox 3.5.0. While these scripts will presently still work, users who are upgrading are advised to drop the .sh extension.

Autostart directory

Openbox also starts any *.desktop files in /etc/xdg/autostart - this happens regardless of whether a user startup script is present. nm-applet, for example, installs a file at this location, and may cause it to run twice for users with the usual (sleep 3 && /usr/bin/nm-applet --sm-disable) & in their startup script. There is a discussion on managing the effects of this at [2].

Recommended programs

Tips and tricks

Aero snap behaviour

Windows 7 supports a unique window behaviour to snap windows when they are moved to the edge of the screen. This effect can also be achieved through an Openbox keybinding. More information here.

File associations

Because Openbox and the applications you use with it are not well-integrated you might run into the issues with your browser. Your browser may not know which program it is supposed to use for certain types of files.

A package in the AUR called gnome-defaults-list contains a list of file-types and programs specific to the Gnome desktop. The list is installed to /etc/gnome/defaults.list.

Open this file with your text-editor. Now you can replace a given application with the name of the program of your choosing. For example, totem <=> vlc or eog <=> mirage. Save the file to ~/.local/share/applications/defaults.list.

Another way of setting file associations is to install package perl-file-mimeinfo from the repository and invoke mimeopen like this:

Xprop values for applications

To use, run xp and click on the running program that you would like to define with per-app settings. The result displays only the info that Openbox requires, namely the WM_WINDOW_ROLE and WM_CLASS (name and class) values:

Linking the menu to a button

Some people want to link the Openbox menu (or any menu) to an object. This is useful for creating a panel button to pop up a menu. Although Openbox does not provide this, a program called xdotool (available in community repo) simulates a keypress. Openbox can be configured to bind that keypress to the ShowMenu action.

After installing xdotool, add the following to the <keyboard> section of your rc.xml:

Restart/reconfigure Openbox. The following command summons a menu at your cursor position. The command may given as-is, linked to an object, or placed in a script.

$ xdotool key ctrl+alt+q

Of course, change the key shortcut to your liking. Here is a snippet from a tint2 (a taskbar-like panel) configuration file which pops up a menu when the clock area is clicked. Each key combination is set to open a menu within openbox's rc.xml configuration file. The right‑click menu is different from the left‑click menu:

Urxvt in the background

With Openbox, running a terminal as desktop background is easy. You will not need devilspie here.

First you must enable transparency, open your .Xdefaults file (if it does not exist yet, create it in your home folder).

URxvt*transparent:true
URxvt*scrollBar:false
URxvt*geometry:124x24 #I do not use the whole screen, if you want a full screen term do not bother with this and see below.
URxvt*borderLess:true
URxvt*foreground:Black #Font color. My wallpaper is White, you may wish to change this to White.

The magic comes from the <layer>below</layer> line, which place the application under all others. Here Urxvt is displayed on all desktops, change it to your convenience.

Note: Instead of using <application name="URxvt">, you can use another name ("URxvt-bg" for example), and use the -name option when starting uxrvt. That way, only the urxvt terminals which you choose to name URxvt-bg would be captured and modified by the application rule in rc.xml. For example: urxvt -name URxvt-bg (case sensitive)

ToggleShowDesktop exception

Above method still minimizes Urxvt when using the ToggleShowDesktop command. A method for avoiding this is explained in this forum post. This involves editing Urxvt's source code.

Note: This method seems to have been broken in a recent update, now leading to a memory leak when the patched Urxvt is run.

The only working method at the moment seems to be the one outlined here. This makes ToggleShowDesktop a one-way action, not restoring the other desktop applications when ToggleShowDesktop is run for a second time. It also creates the opportunity to use a different terminal emulator than Urxvt, however.

Keyboard volume control

ALSA

If you use ALSA for sound, you can use the amixer program to adjust the volume of sound. You can use Openbox's keybindings to act like multimedia keys. (Alternatively, you can probably find out the names of your real multimedia keys and map them.) For example, in the <keyboard> section of rc.xml:

The above example should work for the majority of multimedia keyboards. It should enable to raise, lower and mute the Master control of your audio device by using the respective multimedia keyboard keys. Notice also that in this example:

The "Mute" key should unmute the Master control if it is already in mute mode.

The "Raise" and "Lower" keys should unmute the Master control if it is in mute mode.

Pulseaudio

If you are using pulseaudio with ALSA as a backend the above keybinding are slightly different as amixer must be told to use pulse.

This keybindings should work for most of the systems. Other examples can be found here.

Troubleshooting Openbox 3.5

X server crashes

Problems have been detected after upgrade to ver. 3.5, that the X server might crash in attempt to start openbox, ending with similar error message:

(metacity:25137): GLib-WARNING **: In call to g_spawn_sync(), exit status of a child process \
was requested but SIGCHLD action was set to SIG_IGN and ECHILD was received by waitpid(), so exit \
status can't be returned. This is a bug in the program calling g_spawn_sync(); either do not request \
the exit status, or do not set the SIGCHLD action.
xinit: connection to X server lost
waiting for X server to shut down

In this particular case, some problem with metacity package has been identified as the cause of the X server crash issue. Removal of metacity & compiz-decorator-gtk packages solved the problem. Though, later was found, that even a simple reinstall of packages might have helped, as there is no problem after new installation of previously removed packages.

Also, plenty of similar cases have been found on the Internet, that not only metacity package might be causing the X server to crash.
Thus, whatever else instead of metacity you get in the error output message, try to reinstall it (or remove if necessary) in an attempt to get rid of this X server crash.

Autostarting unwanted applications in 3.5

Unwanted applications do start with your Openbox session, though they are not listed in your ~/.config/openbox/autostart script?

SSH agent no longer starting

Whereas Openbox 3.4.x allowed launching an SSH agent from $XDG_CONFIG_HOME/openbox/autostart{,.sh}, with 3.5 that no longer seems to work. You need to put your code in $XDG_CONFIG_HOME/openbox/environment, e.g.: