Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old June 8th, 2006   #1
raublekick
Way Too Much Ubuntu
 
raublekick's Avatar
 
Join Date: Apr 2005
Location: Lancaster, PA
Beans: 328
Ubuntu Breezy 5.10
Send a message via AIM to raublekick
HOW-TO: Install, Customize, and Configure Openbox (lots of options)

Welcome to my Openbox guide. First, I must thank Fuscia, Stormy Eyes, benplaut the Gentoo and Ubuntu wiki pages. I plan to cover the installation and customization of Openbox as far as use and looks go. I am assuming that you have installed Ubuntu 6.06 with the full Gnome set up. If you are using Kubuntu, Xubuntu, or a server install, some things may change. I may or may not cover those areas. This guide will not cover how to integrate OpenBox into Gnome, KDE, or any other DE. Sorry if you find this a little (or a lot) verbose, but I hate reading guides that leave gaps. So, if I leave some gaps, let me know and I will try to fill them in.

If you want a pure OpenBox installation without the requirement of Gnome, see here.

For themes please see
http://www.boxwhore.org/modules/news/
http://hewphoria.com/?p=submission&type=theme&cat=7


All of my instructions are based on using the command line.


Installation:
To install Openbox, all that is necessary is
Code:
sudo apt-get install openbox
I recommend installing the themes, obconf, and pypanel as well.
Code:
sudo apt-get install openbox obconf openbox-themes pypanel
Now you are ready to use Openbox. Log out, and at the login screen select Openbox under sessions.

Upon entry into Openbox you are provided with nothing more than a mouse cursor. Right-clicking will bring up the root menu, and as you will see it is pretty minimal, but provides all that you need to go on (the terminal).



Setting Up the Menu:
The menu is the most important part of Openbox usability (in my opinion). The most basic way to edit the menu is to edit the menu.xml file. I will list three methods to edit the menu, which method you choose is up to you but I suggest checking out each method before actually editing the menu. In my opinion it is much easier to trim down a bloated menu than build up an empty menu. Thus, my reccomended method for seting up the Openbox menu is to run menumaker first and then use the XML or obmenu to trim it down.

First, copy the default menu into your $HOME/.config/openbox directory.
Code:
cp /etc/xdg/openbox/menu.xml ~/.config/openbox/menu.xml
*Important!* Every time you edit the menu, you must reconfigure by right-clicking to bring up the root menu and selecting reconfigure.

A.) Edit the raw XML
This method deals with editing the raw XML. Open the file by using
Code:
gedit ~/.config/openbox/menu.xml
Here you can see how to format the XML to add entries. This is about as far as I'll go here, because there are much easier ways to edit the menu, but this method can be very fast.

B.) Use obmenu
The second method uses obmenu to edit the menu entries in a graphical interface. It is very easy to use and can create sub-menus and seperators. Obmenu must be installed from source, and has three dependencies that can be filled through apt/synaptic.

The obmenu homepage is here: http://obmenu.sourceforge.net/index.html and the download page is here: http://obmenu.sourceforge.net/download.html

1. To install the dependencies
Code:
sudo apt-get install python2.4 python2.4-glade2 python2.4-gtk2
The glade and gtk2 parts might be wrong, but I am fairly certain they are correct.

2. Now to install obmenu simply
Code:
tar xzvf ~/obmenu-1.0.tar.gz
cd obmenu-1.0
sudo python setup.py install
3. Run obmenu
Code:
obmenu
4. Add entries, save, and reconfigure.

I suggest adding obmenu first, so you have easy access to it. Also add obconf as well if you installed it.

C.) Use menumaker
Menumaker is a tool that will generate a full menu of (almost) everything you have installed. Menumaker can be installed or run from the source tarball. I will show you how to use it without installing it.

1. Download the latest version here: http://sourceforge.net/projects/menumaker and unpack it
Code:
tar xzvf ~/menumaker-0.99.7.tar.gz
2. Go into the menumaker dir and run mmaker
Code:
cd ~/menumaker-0.99.7/
./mmaker OpenBox3
3. Reconfigure

Like magic, you have a new menu. Menu maker moves the reconfigure option into the OpenBox sub-menu. Now you have a pretty much fully working set up, but if you're like me, you want a clock, a panel, and a desktop bg, as well as some better looking themes.



Setting the Background Image:
This one is simple, install feh if you don't have it.
Code:
sudo apt-get install feh
Then simply run
Code:
feh --bg-scale path/to/the/image.ext
ex: feh --bg-scale ~/backgrounds/desktop.jpg

Be warned that the image will reset when you log out and back in. I will cover this soon.



Installing and Using Themes and Window Decorations:
I will instruct you on how to install the exact theme and window decoration I use.

Window decorations can be extracted to your .themes directory and changed in obconf.
1. Download the clearlooks-olive theme from here http://hewphoria.com/get.php?t=theme&id=129 and save it to your home folder.

2. Move the theme to .themes and extract it
Code:
mv ~/clearlooks-olive-0.2.tar.gz ~/.themes/clearlooks-olive-0.2.tar.gz
tar xzvf ~/.themes/clearlooks-olive-0.2.tar.gz
3. Open obconf (either from the menu or command line) and select Clearlooks-Olive from the list under Appearance.


Now, to get rid of those nast GTK controls. This part is pretty easy too, but for some reason the themes installed with Gnome don't work for me, so you have to extract your own to .themes like above.

1. Download the Olive Suite theme from gnome-look.org here http://www.gnome-look.org/content/do...ent=35572&id=1

2. Move the theme to .themes and extract it, just like above but replace the file name.

3. Install switch2
Code:
sudo apt-get install gtk-theme-switch
4. Run switch2 and select Olive, apply.

Now you should have a much nicer looking windows and control scheme for GTK apps.



Installing and Using a Panel:
If you haven't already, install pypanel. There are several other panels you can use, but pypanel is in the repos and easy to use.
Code:
sudo apt-get install pypanel
To use pypanel, just run pypanel from the command line or add it to the menu. Pypanel can be configured through editing .pypanelrc found in your home directory.



Getting Backgrounds and Panels to Show Up at Start:

I originally used the .xsession method, but benplaut provided a much more generic way to go about it. This is pretty much verbatim what he outlined in here http://ubuntuforums.org/showpost.php...8&postcount=22


First, make the file ~/.config/openbox/autostart.sh. In it modify the following to fit your needs.
Code:
gedit ~/.config/openbox/autostart.sh
Panels usually cooperate better if you let them load after the WM, so this is a bit different from others.

Code:
#!/bin/sh 
# Auto-mounting drives 
# gnome-volume-manager & 
# GTK themes... this is just one method 
# gnome-settings-daemon & 
# feh stores the last background in .fehbg 
eval `cat $HOME/.fehbg` &
pypanel & 
# This prevents the panel from failing if it loads too fast 
if pgrep pypanel 
then exec openbox 
else pypanel && exec openbox 
fi
*Rauble's note* I commented out gnome-volume-manager and gnome-settings-daemon. These are not necessary but can be very useful. If you cannot use CDs, uncomment the gnome-volume-manager line. For me, my extra harddrive and CD-ROM drives work without it. **

Panels are finicky... the little thing at the end should help.

OK, here's for gdm:

First,
Code:
chmod +x ~/.config/openbox/autostart.sh
Now, edit the session file:
Code:
sudo gedit /usr/share/xsessions/openbox-autostart.desktop
and insert the following into the file:

Code:
[Desktop Entry] 
Encoding=UTF-8 
Name=Openbox Autostart 
Comment=Openbox with autostart goodness 
Exec=/home/dapper/.config/openbox/autostart.sh 
Icon= 
Type=Application
Note: Edit the Exec line to match your user account

finally,
Code:
sudo chmod +x /usr/share/xsessions/openbox-autostart.desktop
(i'm not sure if that's required, but it can't hurt)

Now you must restart and log into the OpenBox Autostart session
Code:
sudo reboot


Using OpenBox Like a Pro:

Stormy Eyes has a great how-to here: http://doc.gwos.org/index.php/Openbox_Gnome . It describes many things I have gone over, as well as how to add keybindings. I will leave his explaination be and just go over some extra stuff.

Adding the following provides an easy way to capture screenshots.
Code:
  <keybind key="A-F11">
    <action name="execute"><execute>gnome-screenshot</execute></action>
  </keybind>
OpenBox has some great keybindings by default. Some of my favorites are the following:
alt-F10 (A-F10): Maximize window
alt-F5 (A-F5): Unmaximize window
alt-F12 (A-F12): Roll up window
ctrl-alt-left/right: switch to next/previous desktop
shift-alt-left/right (S-A-Left/Right): switches and sends program to next/previous desktop
ctrl-alt-d (C-A-d): show desktop (minimize all windows)

You may also want menu entries for reboot and shutdown. Logging out of openbox has been finnicky for me, sometimes it just goes to a light blue, hard to see login screen. So, here are some menu entries to try:
add a command for "sudo reboot" to restart the computer
or "sudo shutdown -t now" to shutdown
More info can be found here: http://enterprise.linux.com/article....1219226&tid=89



Credits:
(I basically compiled a lot of good information into one source that makes it easy for me to follow, hopefully it will be easy for new OpenBox users as well)

Random Openbox Chatter

Linux.xom | CLI Magic: shutdown - Using the command line for shutdown commands.

OpenBox Gnome - Stormy Eyes' HOW-TO on configuring OpenBox on its own and with Gnome.

Openbox - Ubuntu Wiki - Ubuntu's wiki entry, good info but some of the suggestions are not preferred by me (like using Rox-filer)

Gentoo Openbox Entry - Some great technical info.


*To be added*
- Using and configuring idesk
- Better use of docks and panels
raublekick is offline   Reply With Quote
Old June 8th, 2006   #2
Hanj
Way Too Much Ubuntu
 
Hanj's Avatar
 
Join Date: Jun 2005
Beans: 205
Re: HOW-TO: Install, Customize, and Configure Openbox (lots of options)

Nice howto! Just one suggestion:
If you start gnome-settings-manager at startup, you can launch the Gnome theme manager by executing gnome-theme-manager. It's better than gtk-theme-switch (at least IMO) and also gives you control over icon themes.
Hanj is offline   Reply With Quote
Old June 8th, 2006   #3
raublekick
Way Too Much Ubuntu
 
raublekick's Avatar
 
Join Date: Apr 2005
Location: Lancaster, PA
Beans: 328
Ubuntu Breezy 5.10
Send a message via AIM to raublekick
Re: HOW-TO: Install, Customize, and Configure Openbox (lots of options)

ah, excellent for pointing that out! i figured that was the key, but using switch2 still didn't work... i didn't think to use the Gnome switcher! i'll add that in later.
raublekick is offline   Reply With Quote
Old September 27th, 2007   #4
Kimm
100% Pure Ubuntu
 
Kimm's Avatar
 
Join Date: Feb 2005
Location: Umeå
Beans: 854
Ubuntu 9.10 Karmic Koala
Re: HOW-TO: Install, Customize, and Configure Openbox (lots of options)

Quote:
Originally Posted by Hanj View Post
Nice howto! Just one suggestion:
If you start gnome-settings-manager at startup, you can launch the Gnome theme manager by executing gnome-theme-manager. It's better than gtk-theme-switch (at least IMO) and also gives you control over icon themes.
It would be better to use xfce-mcs-manager as it does the same thing, but is slightly smaller (then you need to use XFCE's theme manager of course)
__________________
"Computers are incredibly fast, accurate and stupid. Human beings are incredibly slow, inaccurate and brilliant. Together they are powerful beyond imagination." -- Albert Einstein
Kimm is offline   Reply With Quote
Old February 9th, 2008   #5
leftorvo
First Cup of Ubuntu
 
Join Date: Feb 2008
Location: Poland
Beans: 11
Re: HOW-TO: Install, Customize, and Configure Openbox (lots of options)

great howto. thanks a lot!
leftorvo is offline   Reply With Quote
Old February 9th, 2008   #6
urukrama
Dark Roasted Ubuntu
 
urukrama's Avatar
 
Join Date: Jul 2006
Beans: 1,015
Re: HOW-TO: Install, Customize, and Configure Openbox (lots of options)

Quote:
Originally Posted by leftorvo View Post
great howto. thanks a lot!
The howto is a bit outdated now (the autostart info for example is all redundant with the new Openbox 3.4 releases), but it helped me enormously when I got started with Openbox.

For a more up to date guide (and a bit more comprehensive), have a look at the link in my signature.
__________________
Openbox Guide | Blog
urukrama is offline   Reply With Quote
Old 3 Weeks Ago   #7
bend_r
First Cup of Ubuntu
 
Join Date: Dec 2009
Beans: 1
Re: HOW-TO: Install, Customize, and Configure Openbox (lots of options)

Im having a prob getting SABnzbdplus to run from menu...

I usually run it from terminal by typing sudo /usr/bin/sabnzbdplus.

So I editted my sudoers file and added at the end:

%wheel ALL=NOPASSWD:/usr/bin/sabnzbdplus

then in Obmenu I made a menu item and for Execute I put:
sudo /usr/bin/sabnzbdplus

That didnt run SAbnzbd so I tried the command in terminal and it still wanted a passwd.

I read that I could put gksudo in there, but I dont want to have to put in the password everytime I want to run from menu, nor do I want to run sabnzbdplus with root.

Can anyone point me in the right direction?

Last edited by bend_r; 3 Weeks Ago at 11:25 PM..
bend_r is offline   Reply With Quote
Old June 8th, 2006   #8
Hanj
Way Too Much Ubuntu
 
Hanj's Avatar
 
Join Date: Jun 2005
Beans: 205
Re: HOW-TO: Install, Customize, and Configure Openbox (lots of options)

Oh, and one more thing: laptop users may want to add gnome-power-manager to their autostart script. If you run gnome-power-preferences after this you can check "Always display icon" to get a battery indicator on your pypanel (only need to check this once).
Hanj is offline   Reply With Quote
Old June 8th, 2006   #9
bionnaki
Dark Roasted Ubuntu
 
Join Date: Aug 2005
Beans: 1,028
Re: HOW-TO: Install, Customize, and Configure Openbox (lots of options)

screenshots?
bionnaki is offline   Reply With Quote
Old June 8th, 2006   #10
Hanj
Way Too Much Ubuntu
 
Hanj's Avatar
 
Join Date: Jun 2005
Beans: 205
Re: HOW-TO: Install, Customize, and Configure Openbox (lots of options)

Here's one screenshot. Very minimalistic, but that's the reason I use OpenBox.
Hanj is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:18 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry