Window Manager: Getting started with Openbox

Posted Posted by Rakesh in Technology     Comments No comments
Feb
15

Get the packages

First install the main package, and any or none of the three optional extra utilities.

In Debian/Ubuntu do:

## required installation:

sudo apt-get install openbox

## optional installation:

sudo apt-ge install obconf gmrun pcmanfm

In other linux installations you can probably use ‘yum’ instead of ‘apt-get’.

Set up your configuration

Installing openbox will get you a set of default system wide configuration files in

/etc/xdg/openbox

You can copy them to your own directory, where you can edit them:

mkdir -p ~/.config/openbox

cp -p /etc/xdg/openbox/* ~/.config/openbox

There are three files required for a minimal configuration

autostart.sh
run once just before openbox starts up
Use a delay to launch X11 windows, and background them,
so that the don’t come up until openbox has started.
I have some example commands in here

menu.xml
You can define exactly one menu to be invoked in the root
window, using the right mouse button. I have modified this
to make it very easy to invoke gmrun, to launch a command,
and to start an xterm window.
My modified version of the default is here

rc.xml
This is the main configuration file in which you can define
how menus should look, how many virtual desktops you want,
which keyboard actions you want, etc. My version defines two
ways of launching an xterm window, one big and one small, using
CTRL+F1 and CTRL+F2 respectively. I also cycle left and
right through desktops using CTRL+Left and CTRL+Right.
I have included an option to run ‘gmrun’ using CTRL+F4
My modified version of the default is here

PERMISSION AND WARNING
Anyone who so desires has my permission to copy and use any of the example files provided here, most of which are themselves slightly edited versions of files that came with OpenBox.

Please check the executable files before you use them, especially autostart.sh and the .xinitrc file mentioned below.

Using gmrun
One of the nice things about using gmrun is that it maintains a history of commands. It also supports tab completion, and if you give it a url it will launch firefox, etc. I have slightly modified the default initialization file, which is

~/.gmrunrc

to specify a location for the panel and wider default text-box width. My version, based on the default version, is here.

Sample .xinitrc
A sample ~/.xinitrc file invoked when you start X from a console, is here. If you fetch it make it executable and remove the comments at the top.

Tar file with sample config files
A tar file containing my tailored extensions to Openbox and a sample .xinitrc file is available here: configfiles.tar.gz

Current contents

-rwxr-xr-x 2087 2009-01-22 17:57:34 dotxinitrc
drwxr-xr-x 0 2009-01-22 04:11:41 dotconfig-openbox-files/
-rw-r--r-- 1768 2009-01-20 09:46:33 dotconfig-openbox-files/autostart.sh
-rw-r--r-- 2861 2009-01-22 03:55:14 dotconfig-openbox-files/menu.xml
-rw-r--r-- 25571 2009-01-22 04:49:49 dotconfig-openbox-files/rc.xml
-rw-r--r-- 1391 2009-01-20 03:27:22 dot-gmrunrc-sample
drwxr-xr-x 0 2009-01-22 15:41:34 CLO/
drwxr-xr-x 0 2009-01-22 15:41:50 CLO/openbox-3/
-rw-r--r-- 5050 2009-01-22 15:37:54 CLO/openbox-3/themerc

I hope it is clear from the rest of this file what to do with each of those. But just in case, here is a summary:


# create the required directories, in case you don't have them

cd /download

tar xvzf configfiles.tar.gz

mkdir -p ~/.themes ~/.config/openbox

## put the CLO theme in place

mv CLO ~/.themes

mv dotconfig-openbox-files/* ~/.config/openbox

## config file for gmrun

mv dot-gmrunrc-sample ~/.gmrun

## if you want to start up the X window system directly from
## a console terminal using startx

mv dotxinitrc ~/.xinitrc

Before trying out the scripts please check all the files, in case of corruption, or in case they invoke utilities not available on your machine, especially these two ’startup’ files: ~/.xinitrc ~/.config/openbox/autostart.sh

Get the packages

First install the main package, and any or none of the three optional extra utilities.

In Debian/Ubuntu do:

## required installation:

sudo apt-get install openbox

## optional installation:

sudo apt-ge install obconf gmrun pcmanfm

In other linux installations you can probably use ‘yum’ instead of ‘apt-get’.

Set up your configuration

Installing openbox will get you a set of default system wide configuration files in

/etc/xdg/openbox

You can copy them to your own directory, where you can edit them:

mkdir -p ~/.config/openbox

cp -p /etc/xdg/openbox/* ~/.config/openbox

There are three files required for a minimal configuration

autostart.sh
run once just before openbox starts up
Use a delay to launch X11 windows, and background them,
so that the don’t come up until openbox has started.
I have some example commands in here

menu.xml
You can define exactly one menu to be invoked in the root
window, using the right mouse button. I have modified this
to make it very easy to invoke gmrun, to launch a command,
and to start an xterm window.
My modified version of the default is here

rc.xml
This is the main configuration file in which you can define
how menus should look, how many virtual desktops you want,
which keyboard actions you want, etc. My version defines two
ways of launching an xterm window, one big and one small, using
CTRL+F1 and CTRL+F2 respectively. I also cycle left and
right through desktops using CTRL+Left and CTRL+Right.
I have included an option to run ‘gmrun’ using CTRL+F4
My modified version of the default is here

PERMISSION AND WARNING
Anyone who so desires has my permission to copy and use any of the example files provided here, most of which are themselves slightly edited versions of files that came with OpenBox.

Please check the executable files before you use them, especially autostart.sh and the .xinitrc file mentioned below.

Using gmrun
One of the nice things about using gmrun is that it maintains a history of commands. It also supports tab completion, and if you give it a url it will launch firefox, etc. I have slightly modified the default initialization file, which is

~/.gmrunrc

to specify a location for the panel and wider default text-box width. My version, based on the default version, is here.

Sample .xinitrc
A sample ~/.xinitrc file invoked when you start X from a console, is here. If you fetch it make it executable and remove the comments at the top.

Tar file with sample config files
A tar file containing my tailored extensions to Openbox and a sample .xinitrc file is available here: configfiles.tar.gz

Current contents

-rwxr-xr-x 2087 2009-01-22 17:57:34 dotxinitrc
drwxr-xr-x 0 2009-01-22 04:11:41 dotconfig-openbox-files/
-rw-r--r-- 1768 2009-01-20 09:46:33 dotconfig-openbox-files/autostart.sh
-rw-r--r-- 2861 2009-01-22 03:55:14 dotconfig-openbox-files/menu.xml
-rw-r--r-- 25571 2009-01-22 04:49:49 dotconfig-openbox-files/rc.xml
-rw-r--r-- 1391 2009-01-20 03:27:22 dot-gmrunrc-sample
drwxr-xr-x 0 2009-01-22 15:41:34 CLO/
drwxr-xr-x 0 2009-01-22 15:41:50 CLO/openbox-3/
-rw-r--r-- 5050 2009-01-22 15:37:54 CLO/openbox-3/themerc

I hope it is clear from the rest of this file what to do with each of those. But just in case, here is a summary:


# create the required directories, in case you don't have them

cd /download

tar xvzf configfiles.tar.gz

mkdir -p ~/.themes ~/.config/openbox

## put the CLO theme in place

mv CLO ~/.themes

mv dotconfig-openbox-files/* ~/.config/openbox

## config file for gmrun

mv dot-gmrunrc-sample ~/.gmrun

## if you want to start up the X window system directly from
## a console terminal using startx

mv dotxinitrc ~/.xinitrc

Before trying out the scripts please check all the files, in case of corruption, or in case they invoke utilities not available on your machine, especially these two ’startup’ files: ~/.xinitrc ~/.config/openbox/autostart.sh

Related posts:

  1. Using Openbox as window-manager on Linux

Post comment

Archives

Recent Posts

Recent Comments

Blog Sponsor



Tags

Switch site

Blogroll


whos among us