e

Setting up Openbox in Bodhi Linux

Here is a quick guide for the setting up of Openbox window manager on Bodhi Linux.

Installing the Needed Packages

First step is to download the needed packages and dependencies from Synaptic Package Manager.

Windows manager:
openbox
openbox-themes
obconf
obmenu

Panel:
tint2

Wallpaper changer:
nitrogen

GTK theme switcher:
gtk-theme-switch2

Application launcher:
grun

Alternatively, from the command line run:

sudo apt-get install openbox openbox-themes obconf obmenu tint2 nitrogen gtk-theme-switch2 grun

Setting up the Environment

Now all the packages are installed we will log out of the current Bodhi session and login to 'openbox-session'.

Not much going on right? Don't worry it is now time to set every thing up:

1. Setting background wallpaper
Right-click on the desktop to bring up the Openbox menu and click on Terminal
Enter the command grun then enter nitrogen.
Click Preferences and navigate to your wallpaper directory. Once done click Ok then select a new wallpaper to apply.

2. Setting up tint2 panel
Again open a terminal and enter the command grun then enter tint2
This will open a tint2 panel at the bottom of your screen and produce a tint2rc configuration file in /home/$USER/.config/tint2

3. Volume controls
Openbox / Tint2 panel doesn't come with any volume + - gui contols as default - for this guide I will use a simple script that lauches/closes alsamixer when the clock in tint2 panel is left mouse clicked.

First create a blank file in PCmanFM. Navigate to /usr/bin, then right-click > create new > blank file and call it tvolume. Now right click on it > properties > permissions and tick Make File Executable
Paste the following code into the script and save.

#!/bin/sh
## tint2 left click on clock volume control ##
STATE=`pidof -x alsamixer`
if [ ! -n "$STATE" ]; then 
xterm -geom "37x17+986+525" -e alsamixer
else 
killall alsamixer 
fi

Now open the /home/$USER/.config/tint2rc file in Leafpad text editor and look for the clock section and change

clock_lclick_command =

to

clock_lclick_command = /usr/bin/tvolume &

then save.

To adjust the volume + - with alsamixer you can use the up and down arrow keys and the m key to mute.

4. Auto start
Now you have set up the basics you want them to auto start when you log into the openbox-session. For this we will need to create another script in /home/$USER/.config/openbox - you may or may not have this directory.
If it isn't there in PCmanFM navigate to /home/$USER/.config in a clear area right-click > create new > folder and name it openbox

Now navigate to the openbox folder then right-click > create new > blank file and call it autostart.sh and to make it executable right-click > properties > permissions - tick make file executable. Open the /home/$USER/.config/openbox/autostart.sh file in Leafpad text editor and paste the code below then save.

#!/bin/sh
## Openbox auto start applications ##
nitrogen --restore & 
tint2 & 
nm-applet --sm-disable &

This will auto start wallpaper, tint2 panel and network manager - you can add any other applications here you wish to auto start when you log into openbox-session.

Ok time to log out. Right-click on the desktop and select Exit from the Openbox menu. When you log back in you will have your choice of wallpaper, tint2 panel and network running - check the volume control by left clicking on the clock in the tint2 panel.

5. Openbox menu
This guide uses the manual setup for Openbox right-click menu, meaning instead of the menu being auto generated you add applications and arrange the menu layout to your own needs with obmenu GUI.
To run obmenu open a terminal and enter the command grun then obmenu.
The obmenu GUI is pretty self-explanatory: New Menu being a new sub-menu and New item being a new application launcher. Once you have finished tweeking your menu click Save. Your Openbox right-click menu will be updated.

6. GTK themes
For changing GTK themes you can use gtk-theme-switch2
Enter the command gtk-theme-switch2 in grun and or add to the Openbox menu as in step 5.

7. Openbox themes
For changing GTK themes you can use obconf
Enter the command obconf in grun and or add to the Openbox menu as in step 5.


original article by Stu90

 
openbox_setup.txt · Last modified: 2012/03/06 13:14 by ottermaton · [Old revisions]


© Copyright Bodhi Linux 2012. All Rights Reserved - Hosted by vaultnetworks