|
OpenBox desktop setup
One of the reasons I liked OpenBox from the start is that many of
the characteristics of my Ctwm desktop setup could be mapped to
OpenBox features:
- Focus follows mouse.
- Autoraise, with a small delay.
- Minimal decoration for windows.
- No icons.
- Multiple desktops.
- Free menus that can pop up everywhere.
Some screen dumps:
|
The normal desktop. On
top is the (folded in) Gnome
panel. Below that are XPostit, a screen-wide Xload window, a
Biff and a digital, colour-coded clock. These are sticky (occur on
all desktops). The big white window is a xterm, the yellow
window is Emacs. The bottom window is a xterm tailing the
system log files. |
|
Same, but with
the Gnome panel folded out. |
|
Desktop, showing the
“Execute” menu. This menu is selected from the root menu
that was popped up after a left-click on the desktop.
The “Execute” menu can also be popped up as a
separate menu at all times with Ctrl-Menu, or with a right-click on
the desktop. |
|
Desktop, showing the
“New Window” menu. This menu is selected from the root menu
that was popped up after a left-click on the desktop.
The “New Window” menu can also be popped up as a
separate menu at all times with Shift-Menu, or with a middle-click on
the desktop. |
|
OpenBox does not have a
nice Icon Manager like Ctwm, but the “Windows” menu
(client-list-combined-menu) provides a good alternative. |
As can be seen, the OpenBox desktop looks (and, believe me, feels)
pretty much the same as the Ctwm desktop. It is easier to upgrade a
program than human behaviour
.
In the new setup I tried to stick as closely to the system standard
setup as possible. How exactly this works depends on the Gnome
version, since a few essential things changed in Gnome 2.24 (Fedora 10
and later).
This is the way Gnome startup works for Gnome version 2.24 and
later:
- The main startup script wm sets Gnome config property
/desktop/gnome/session/required_components/windowmanager
to openbox and executes startx .
startx normally runs xinit
/etc/X11/xinit/xinitrc . But since I have my own
.xinitrc it will
execute xinit $HOME/.xinitrc instead.
$HOME/.xinitrc runs $HOME/XStart/XStartup.
$HOME/XStart/XStartup executes
/etc/X11/xinit/xinitrc after preparing some things.
/etc/X11/xinit/xinitrc initiates the Gnome
session.
gnome-session starts the programs as registered in
the Gnome properties
/desktop/gnome/session/required_components/* .
When it comes to starting the window manager,
it will start in $HOME/bin/openbox . See below.
- Using Preferences > Personal > Sessions > Startup
Programs, I have added $HOME/XStart/start-gadgets. This
script starts the standard programs (local xterms, emacs, ...).
This is the way Gnome startup works for Gnome versions before 2.24:
- The main startup script wm sets environment variable
WINDOW_MANAGER and executes startx .
startx normally runs xinit
/etc/X11/xinit/xinitrc . But since I have my own
.xinitrc it will
execute xinit $HOME/.xinitrc instead.
$HOME/.xinitrc runs $HOME/XStart/XStartup.
$HOME/XStart/XStartup executes
/etc/X11/xinit/xinitrc after preparing some things.
/etc/X11/xinit/xinitrc initiates the Gnome
session.
gnome-session starts the programs as registered in
Preferences > Personal > Sessions > Startup Programs, in
order of priority.
At priority 20, there is the window manager. The default
setting will be overridden by the WINDOW_MANAGER
setting so it will start in $HOME/bin/openbox
instead. See below.
- At priority 50, I've added $HOME/XStart/start-gadgets. This
script starts the standard programs (local xterms, emacs, ...).
The final ‘trick’ is that instead of starting
openbox directly, I start a wrapper program. This program figures out the
system, features, screen properties, and so on. It creates dedicated
obrc.xml and obmenu.xml files, and then
invokes the real openbox program.
One thing I have been missing for a while is the ability to start
applications with their windows at a desired postion and size.
Straightforward X11 applications can do it, but modern GTK based
programs cannot. Why? Noone has been able to tell me. I found a
good companion to OpenBox in the Devil's Pie program. This programs handles window
placement (and a lot of other nifty things you can do with windows).
My openbox wrapper program generates the necessary
Devil's Pie config files, and devilspie itself is started via the
start-gadgets script. Works great!
Note that all sample files mentioned on this
page are snapshots from a working configuration. They are subject to
change without notice.
|