Openbox

Differences between revisions 4 and 5
Revision 4 as of 2005-11-13 15:30:43
Size: 8750
Editor: dhcp-jmh-44
Comment:
Revision 5 as of 2005-11-13 15:58:54
Size: 9294
Editor: dhcp-jmh-44
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
Openbox is a lightweight window manager using [http://www.freedesktop.org/ freedesktop] standards.
It can be used either as a replacement for the default gnome
window manager, Metacity, or as a standalone desktop environment.
Openbox is a lightweight window manager using [http://www.freedesktop.org/ freedesktop] standards. It can be used either as a replacement for the default gnome window manager, Metacity, or as a standalone desktop environment.
Line 8: Line 6:
=== Window Managers ===
A Window manager is the program which draws on your screen the 'box' in
which the program is run. The window manager supplies the bar from which
you can se
lect ''minimise'' ''maximise/restore'' and ''exit'' commands,
among others.

=== Features ===
== Window Managers ==
A Window manager is the program which draws on your screen the 'box' in which the program is run. The window manager supplies the bar which displays the name of the program and also the ''minimise'' ''maximise/restore'' and ''exit'' commands, among others.

== Features ==
Line 31: Line 26:
or through synaptic, downloading the ''openbox'' and ''obconf''
packages.
or through synaptic, downloading the ''openbox'' and ''obconf'' packages.
Line 39: Line 33:
If you which to keep Openbox as your default window manager, then
just save your session on logout, or not.
If you which to keep Openbox as your default window manager, then just save your session on logout, or not.
Line 43: Line 36:
Obconf is a handy program to customise Openbox. It allows for the selection
of themes, behaviour, the number of desktops, and the Dock.
Obconf is a handy program to customise Openbox. It allows for the selection of themes, behaviour, the number of desktops, and the Dock.
Line 52: Line 44:
Themes can also be found at a number of sites and can easily be installed.
Download the theme, then install it to the .themes folder in Home.
Themes can also be found at a number of sites and can easily be installed. Download the theme, then install it to the .themes folder in Home.
Line 62: Line 53:
The two configuration files are stored in ~/.config/openbox/ and are
editable in any text program. They use xml, and if you do edit them so
that they are no longer valid xml, Openbox will revert to the default
files in /etc/xdg/openbox/

=== rc.xml ===

The rc.xml file stores the settings for Openbox such as key bindings and
desktop names. Many of the settings can be changed within Obconf.

=== menu.xml ===
This stores the menu which you get when right clicking on
the desktop. The file is quite self explanatory, with a structure of:
The two configuration files are stored in ~/.config/openbox/ and are editable in any text program. They use xml, and if you do edit them so that they are no longer valid xml, Openbox will revert to the default files in /etc/xdg/openbox/

'''rc.xml'''

The rc.xml file stores the settings for Openbox such as key bindings and desktop names. Many of the settings can be changed within Obconf.

'''menu.xml'''

This stores the menu which you get when right clicking on the desktop. The file is quite self explanatory, with a structure of:
Line 87: Line 75:
To make programs and scripts run at startup then they have to be placed
in the .xsessions file.
To make programs and scripts run at startup then they have to be placed in the .xsessions file.
Line 95: Line 82:
you then merely have to add the programs you want to start with openbox
onto a line, with an & following, # can be used for comments, and the last
line has to be 'exec openbox'.

''''For the .xsession file to be used the DEFAULT option must be used
in the GDM session options at login''''

===
Example .xsession file ===
you then merely have to add the programs you want to start with openbox onto a line, with an & following, # can be used for comments, and the last line has to be 'exec openbox'.

'''''For the .xsession file to be used the DEFAULT option must be used in the GDM session options at login'''''

'''
Example .xsession file '''
Line 147: Line 132:
Openbox Itself does not draw a background. To do this you need a
separate program such as ''feh''.

Feh is a lightweight image viewer with a variety of modes, but can
be used to draw the desktop background through the command:
Openbox Itself does not draw a background. To do this you need a separate program such as ''feh''.

Feh is a lightweight image viewer with a variety of modes, but can be used to draw the desktop background through the command:
Line 157: Line 140:
A random wallpaper script can also be used to draw a random picture to
the desktop.

==== Other Background Programs ====

Feh stores the background picture in the file .fehbg and can be used to restore the background by adding the line
{{{
eval `cat $HOME/.fehbg` &
}}}
to your .xsession file. This will allow you to change background durring your login and not have to edit the .xsession file.

A random wallpaper script can also be used to make feh draw a random picture to the desktop.

'''Other Background Programs'''
Line 194: Line 184:
To Automount external volumes such as CDs and USB drives, then you will also
need a volume manager. There is the gnome based app:
To Automount external volumes such as CDs and USB drives, then you will also need a volume manager. There is the gnome based app:
Line 209: Line 198:
to the .xsession file. this will enable the screensaver to start after a period
of inactivity, or when invoked by the lock command '''xflock4''' if xfce4 is installed
or by '''xscreensaver-command -lock''', either of which can be added to a keybinding
or as a menu item.
to the .xsession file. this will enable the screensaver to start after a period of inactivity, or when invoked by the lock command '''xflock4''' if xfce4 is installed or by '''xscreensaver-command -lock''', either of which can be added to a keybinding or as a menu item.
Line 215: Line 201:
If you are not running gnome then you will need a run dialog program, usually
invoked by ''Alt-F2''. If Xfce4 is installed then the keybinding in the rc.xml
file can be changed to '''xfrun4'''. If you are not, then you can install the small
program '''gmrun''' (this does not have to be put in the .xsession file to be
able to use, but the rc.xml file does need to be changed)
If you are not running gnome then you will need a run dialog program, usually invoked by ''Alt-F2''. If Xfce4 is installed then the keybinding in the rc.xml file can be changed to '''xfrun4'''. If you are not, then you can install the small program '''gmrun''' (this does not have to be put in the .xsession file to be able to use, but the rc.xml file does need to be changed)
Line 222: Line 204:
If you do want desktop icons then it is recomended to use the pinboard feature of rox.
Rox can be installed with the command;
If you do want desktop icons then it is recomended to use the pinboard feature of rox. Rox can be installed with the command;
Line 233: Line 214:
As an alternative to Metacity there are a range of other window
manager possibilities.
xfwm4 is the default window manager for the
xfce4 desktop environment and is a quite capable alternative. The Howto
from the forums can be found
[http://www.ubuntuforums.org/showthread.php?t=88393 here].

As stand alone replacements ["Xfce4"] is the most complete lightweight alternative to Gnome
and KDE. Other minimalistic desktops are ["Fluxbox"] and ["Blackbox"].
As an alternative to ["Metacity"] there are a range of other window manager possibilities.

'''
xfwm4'''

The default window manager for the
xfce4 desktop environment and is a quite capable alternative. The Howto from the forums can be found [http://www.ubuntuforums.org/showthread.php?t=88393 here].

'''["Fluxbox"]'''

There is also a Howto in the Forums for replacing Metacity with ["Fluxbox"] [http://www.ubuntuforums.org/showthread.php?t=63734]

'''Standalone'''

As stand alone replacements ["Xfce4"] is the most complete lightweight alternative to Gnome and KDE. Other minimalistic desktops are ["Fluxbox"] and ["Blackbox"].   For a complete lightweight install the ["Xubuntu"] or LightweightDesktop projects may be for you
Line 245: Line 233:
To get Feh to draw a random image as your background then save the following as a script, say wallpaper.sh To get Feh to draw a random image as your background then save the following as a script, say, wallpaper.sh
Line 268: Line 256:
=== Openbox ===
'''Openbox'''
Line 273: Line 263:
=== Themes === '''Themes'''
Line 277: Line 268:
=== Other Programs === '''Other Programs'''
Line 281: Line 273:
=== Gentoo === '''Gentoo'''

What is Openbox

Openbox is a lightweight window manager using [http://www.freedesktop.org/ freedesktop] standards. It can be used either as a replacement for the default gnome window manager, Metacity, or as a standalone desktop environment.

TableOfContents

Window Managers

A Window manager is the program which draws on your screen the 'box' in which the program is run. The window manager supplies the bar which displays the name of the program and also the minimise maximise/restore and exit commands, among others.

Features

The Benefits of Openbox:

  • Mouse-Wheel scrolling of the desktops
  • Customisable right-click menu
  • Customisable keybingings
  • Pipes
  • Written in C
  • SPEED

  • No ugly black lines when minimising

Installing

Openbox is in the Universe repository see AddingRepositoriesHowto for infomation.

Either install Openbox from the command line,

sudo apt-get install openbox obconf

or through synaptic, downloading the openbox and obconf packages.

Replacing Metacity in Gnome

To replace Metactiy type into the run dialogue (Alt-F2)

openbox --replace

If you which to keep Openbox as your default window manager, then just save your session on logout, or not.

Obconf

Obconf is a handy program to customise Openbox. It allows for the selection of themes, behaviour, the number of desktops, and the Dock.

Themes

Download the openbox-themes package from synaptic, or by

sudo apt-get install openbox-themes

Themes can also be found at a number of sites and can easily be installed. Download the theme, then install it to the .themes folder in Home.

cd ~/.themes
tar xzvf ~/path_to_downloaded_theme/theme.tar.gz

Then use Obconf to select your new theme.

Configuration

The two configuration files are stored in ~/.config/openbox/ and are editable in any text program. They use xml, and if you do edit them so that they are no longer valid xml, Openbox will revert to the default files in /etc/xdg/openbox/

rc.xml

The rc.xml file stores the settings for Openbox such as key bindings and desktop names. Many of the settings can be changed within Obconf.

menu.xml

This stores the menu which you get when right clicking on the desktop. The file is quite self explanatory, with a structure of:

  <item label="Program_Name">
    <action name="Execute"><execute>Program_Command</execute></action>
  </item>

.xsession

If you run Openbox by itself, by selecting the Openbox option (and making it the default setting) in the GDM login, then you will notice that there is a distinct lack of other programs, such as background wallpaper, automatically started programs etc.

To make programs and scripts run at startup then they have to be placed in the .xsessions file.

If you don't already have one, then create one with the command

gedit ~/.xsession

you then merely have to add the programs you want to start with openbox onto a line, with an & following, # can be used for comments, and the last line has to be 'exec openbox'.

For the .xsession file to be used the DEFAULT option must be used in the GDM session options at login

Example .xsession file

From [http://www.ubuntuforums.org/showthread.php?t=23998]

# X WINDOW SYSTEM STARTUP SCRIPT
#

# The following X clients are started up
# as part of the initial window system
# environment. Users can change or add
# to these default clients in order to
# set up a custom environment. All
# clients started up in this script
# should be run in the background,
# except for the window manager, which
# should be last.

# epist is the recommended way to bind keys
# to actions in Openbox.
#epist &

# gkrellm is a system monitoring tool.
# -w puts it in the "Slit".
gkrellm -w &

# bbpager is a pager which uses blackbox
# themes to decorate itself.
# -w puts it in the "Slit".
#bbpager -w &

# gnome-panel is the panel for GNOME desktop environment.
#gnome-panel &

# ROX is a fast, user friendly desktop which makes extensive use of drag-and-drop
rox --pinboard=PIN &

# run the window manager
exec openbox

Other Programs

Background

Openbox Itself does not draw a background. To do this you need a separate program such as feh.

Feh is a lightweight image viewer with a variety of modes, but can be used to draw the desktop background through the command:

feh --bg-scale /home/user/desktop.jpg

Replacing the path shown to the path where you have your wallpaper.

Feh stores the background picture in the file .fehbg and can be used to restore the background by adding the line

eval `cat $HOME/.fehbg` &

to your .xsession file. This will allow you to change background durring your login and not have to edit the .xsession file.

A random wallpaper script can also be used to make feh draw a random picture to the desktop.

Other Background Programs

There are other programs out ther capable of drawing a desktop background such as:

Note: If nautilus is started without the --no-desktop command, it will draw over the background image

GKrellM

gkrellm is a system moniter with a variety of sensors, plugins and themes.

Pagers

a number of pagers can be used to draw a taskbar and panel;

  • bbpager
  • pypanel
  • gnome-panel
  • fspanel
  • fbpanel
  • perlpanel
  • xfce4-panel

Just find one that you like and add the command to the .xsession file.

GTK Apps

You will also notice that program GUIs will not look as polished as they did when you were running gnome, kde or xfce. to solve this you need to run a GTK app. such as

gnome-settings-daemon

or if you want the xfce look:

xfce-mcs-manager

Automounting

To Automount external volumes such as CDs and USB drives, then you will also need a volume manager. There is the gnome based app:

gnome-volume-manager

or the Kubuntu / Xubuntu app:

ivman

Screensaver

To get the screensaver to startup add:

xscreensaver -no-splash

to the .xsession file. this will enable the screensaver to start after a period of inactivity, or when invoked by the lock command xflock4 if xfce4 is installed or by xscreensaver-command -lock, either of which can be added to a keybinding or as a menu item.

Run Dialogue

If you are not running gnome then you will need a run dialog program, usually invoked by Alt-F2. If Xfce4 is installed then the keybinding in the rc.xml file can be changed to xfrun4. If you are not, then you can install the small program gmrun (this does not have to be put in the .xsession file to be able to use, but the rc.xml file does need to be changed)

Desktop Icons

If you do want desktop icons then it is recomended to use the pinboard feature of rox. Rox can be installed with the command;

sudo apt-get install rox-filler

or looking for the rox-filler package in synaptic.

Other Lightweight WMs

As an alternative to ["Metacity"] there are a range of other window manager possibilities.

xfwm4

The default window manager for the xfce4 desktop environment and is a quite capable alternative. The Howto from the forums can be found [http://www.ubuntuforums.org/showthread.php?t=88393 here].

["Fluxbox"]

There is also a Howto in the Forums for replacing Metacity with ["Fluxbox"] [http://www.ubuntuforums.org/showthread.php?t=63734]

Standalone

As stand alone replacements ["Xfce4"] is the most complete lightweight alternative to Gnome and KDE. Other minimalistic desktops are ["Fluxbox"] and ["Blackbox"].

For a complete lightweight install the ["Xubuntu"] or LightweightDesktop projects may be for you

Random Wallpaper

To get Feh to draw a random image as your background then save the following as a script, say, wallpaper.sh

WALLPAPERS="/home/drew/wallpaper" #change this path for your system 
ALIST=( `ls -w1 /home/drew/wallpaper` ) 
RANGE=${#ALIST[@]} 
let "number = $RANDOM" 
let LASTNUM="`cat $WALLPAPERS/.last` + $number" 
let "number = $LASTNUM % $RANGE" 
echo $number > $WALLPAPERS/.last 

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

you can then make the script executable

chmod a+x wallpaper.sh

and then put the script somewhere in your path. wallpaper.sh can then be added to the .xsession file and/or run as a menu option.

Links:

Openbox

Themes

Other Programs

Gentoo


CategoryDocumentation CategoryCleanup

Openbox (last edited 2008-08-06 16:40:34 by localhost)