Differences between revisions 2 and 3
Revision 2 as of 2007-08-03 16:54:23
Size: 11543
Editor: AdamMiller
Comment:
Revision 3 as of 2008-06-15 13:49:48
Size: 11544
Comment: corrected xscreensaver entry for ~/.xinitrc file
Deletions are marked like this. Additions are marked like this.
Line 216: Line 216:
xscreensaver --no-splash xscreensaver -no-splash &

Some information on the Openbox ["window_manager"].

?TableOfContents

Introduction

To answer that question, it's important to know the difference between a window manager and a desktop environment.

A window manager is the program which draws on your screen the "box" in which the program is run. A window manager controls how your program window works, looks and acts. It decides what window decorations to use and gives you a way to move the windows, hide them, resize them, minimize them and close them. It controls what buttons you push to do those things, and what keys you press to make those things happen.

On the other hand, a desktop environment minds the entire desktop. It provides a taskbar, a system tray, a login manager, additional menus or perhaps screensavers and desktop icons. It might include a file manager, a text editor or some other accessory programs, too.

Openbox is a window manager, not a desktop environment. Openbox is only responsible for maintaining the windows you open on your screen -- nothing else. That means installing Openbox won't give you easy menu access to wallpaper options, a taskbar or system panel, or most of those other doo-dads. It does, however, give you a framework to build incorporate other programs that do those things -- and usually with a greater degree of freedom over the style and interface.

Openbox can be used alone, without a desktop environment, or it can be used to replace the window manager in a complete desktop environment. Either way is acceptable.

Installation

When you install Openbox in ["Debian"] a right-click desktop menu is automatically generated.

# aptitude install openbox

If in the event your menu is not auto-generated with the ["DebianMenu"] you will need to install the 'menu' package.

# aptitude install menu

Openbox Session

KDM and GDM

To start an Openbox session from ["KDM"] or ["GDM"] you can choose 'openbox' from the session or session-type menu.

XDM

To run Openbox from xdm you should setup a .xsession file in your ["home_directory"].

exec openbox

Alternatively there is the possibility to use the debian alternatives (see ["update-alternatives"]) and setup x-session-manager to be Openbox.

From Commandline

To run Openbox from the commandline login, setup the .["xinitrc"] file in your ["home_directory"] and insert the following line:

exec openbox

Alternatively there is the possibility to use the Debian alternatives (see ["update-alternatives"]) and setup x-window-manager to be Openbox.

Configuration

Obconf

?ObConf is a small graphical utility which configures the window manager Openbox' preferences and configuration settings on the fly. . If you are an Openbox user, you want this package.

# aptitude install obconf

Wallpaper

feh

A number of programs can handle the responsibility of showing a background image; the most common is a little program called feh.

feh is a lightweight image viewer with a number of options, but perhaps the most popular is the ability to draw a desktop background. Pick a wallpaper image and try this command in a terminal.

feh --bg-scale /path/to/your/background/image.jpg

Feh can handle other file types than just jpg. Once you've picked a wallpaper, feh stores the name in a file called .fehbg. That means you can tell it to restore the wallpaper on the next boot by checking to see what's inside that file. Add this line to your ~/.xinitrc file.

eval `cat $HOME/.fehbg` &

Random wallpaper

One neat trick available with feh is a random wallpaper on each boot. Make a directory in your home folder called "wallpapers", then put a few background images in it. Then copy this text into a file called wallpaper.sh, and save it anywhere.

WALLPAPERS="~/wallpapers"
ALIST=( `ls -w1 ~/wallpapers` )
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]}

Next make the script executable.

chmod +x wallpaper.sh

Now add that program to your ~/.xinitrc file, like this.

./wallpaper.sh

When you log in, the script should be executed, and feh will pick a new wallpaper.

Other options

feh isn't the only program that can handle drawing a background image. Here are some others.

  • xsetbg
  • imagemagick

Additionally, some file managers have the option of managing your wallpaper.

  • rox-filer
  • PCManFM
  • Nautilus, if started without the --no-desktop option, will draw over the background image

Desktop icons

iDesk

You can add customizable, clickable icons to your desktop with [http://idesk.sourceforge.net/wiki/index.php/Main_Page iDesk].

# aptitude install idesk

Consult the [http://idesk.sourceforge.net/ iDesk wiki] for instructions on how to configure and use iDesk. For icon sets, you may wish to search the repositories, or download them from third-party customization sites, such as [http://www.gnome-look.org/ Gnome-Look.org] and similar locations.

Rox-Filer

Rox-filer is a file manager, but in addition to handling wallpaper, it also has a pinboard option, and can manage desktop icons. Install rox-filer with this command:

# aptitude install rox-filer

You can set up the pinboard through Rox's menus.

Taskbars and Pagers

Some people prefer to use a taskbar or pager to keep track of running programs. Here's a list of applications you can add to your Openbox installation that will handle that task for you.

System monitors

If you're looking for a way to display system information, try these nifty programs.

If you're working on Openbox in conjunction with a Gnome installation, you might also look into [http://www.gdesklets.org/ gdesklets], which features some very polished monitors and meters for desktop display.

GTK themes

Program GUIs might look ugly if you're working on a pure Openbox system. Install gtk-theme-switch and the gtk2-engines package to give yourself a few more appealing options.

# aptitude install gtk-theme-switch gtk2-engines

Bring up the configuration menu with this command, from a terminal or the Openbox right-click menu.

# switch2

Be sure to search the repositories for other engines that aren't included in the gtk2-engines package.

You can also try installing a Gnome package that will manage some of the settings for you.

# aptitude install gnome-settings-daemon

If you prefere an XFCE look, try

# aptitude install xfce-mcs-manager

Both of those programs can be added to your Openbox menu, or started from a terminal.

Screensaver

If you're building an Openbox desktop with Gnome already installed, you'll probably already have gnome-screensaver in place. Pure Openbox fans might want to install xscreensaver, which is more customizable and has a wider variety of screensavers involved.

Without Gnome or KDE in place, installing xscreensaver needs a couple of extra commands:

# mkdir /usr/share/backgrounds
# aptitude install xscreensaver xscreensaver-gl

The first command sets up a default directory that xscreensaver will look for when it runs. If you don't create that directory, you'll get a string of error messages the first time you set the preferences.

The second command installs xscreensaver and its optional files.

Now add this command to your ~/.xinitrc file, to start the xscreensaver daemon on boot.

xscreensaver -no-splash &

You can access the xscreensaver preferences panel by running xscreensaver-demo from the Openbox menu or from a terminal window.

Keyboard Shortcuts

Openbox default key combinations

* Alt-F4 Close the active window

* Alt-Space Show the client menu for the active window

* Alt-Tab Cycle between windows on the desktop

* Alt-Shift-Tab Cycle between windows on the desktop in reverse order

* Control-Alt-Tab Cycle between panel and desktop windows on the desktop

* Windows-D Hide all windows to show the desktop

* Windows-E Run the Konqueror file manager (This is an example of how to run a program with a key binding)

* Alt-Escape Lower the active window behind other windows, and activate the last window that was in use

* Windows-F1 Go to the first desktop instantly

* Windows-F2 Go to the second desktop instantly

* Windows-F3 Go to the third desktop instantly

* Windows-F4 Go to the fourth desktop instantly

* Control-Alt-Left Open the desktop switching dialog, to go to the desktop to the left of the current one

* Control-Alt-RightOpen the desktop switching dialog, to go to the desktop to the right of the current one

* Control-Alt-Up Open the desktop switching dialog, to go to the desktop above the current one (This will only be useful if you use a pager to set up a desktop layout with multiple rows)

* Control-Alt-Down Open the desktop switching dialog, to go to the desktop below the current one (This will only be useful if you use a pager to set up a desktop layout with multiple rows)

* Shift-Alt-Left Open the desktop switching dialog, to go to the desktop to the left of the current one, and bring the active window with you

* Shift-Alt-Right Open the desktop switching dialog, to go to the desktop to the right of the current one, and bring the active window with you

* Shift-Alt-Up Open the desktop switching dialog, to go to the desktop above the current one, and bring the active window with you (This will only be useful if you use a pager to set up a desktop layout with multiple rows)

* Shift-Alt-Down Open the desktop switching dialog, to go to the desktop below the current one, and bring the active window with you (This will only be useful if you use a pager to set up a desktop layout with multiple rows)

* Alt-Left mouse button Move a window

* Alt-Right mouse button Resize a window. The window is resized towards the edge that the mouse is nearest to. So use Alt-Right mouse button in the top right corner of a window to resize that corner.

* Alt-Scroll wheel Change desktops forward and backward

External links