Example Openbox desktop with the XFCE4 Panel,
OBmenu, and Conky system monitor.
Click image for larger view.
Raspberry Pi Openbox Desktop Setup
Note I'm dealing only with Debian based distributions in particular in the Raspberry Pi. This will work for other Debian based distributions when starting from the command line startx based on your .xinitrc file. If you haven't installed Openbox already then:
sudo apt-get install openbox obconf menu obmenu conky parcellite feh rox-filer tint2 xfce4-panel
If one has a regular Debian distribution on a PC with a display manager such as lightdm and have installed Openbox select Openbox from the menu then log in.
Note .xinitrc doesn't work with a display manager!
Openbox obmenu program.
Setting Up Openbox Menu
This is called the Openbox desktop and from here we will construct our own fast operating system. What do we really need? Right click the mouse and a small selection box comes up with a terminal program and web browser (Midori) and little else.
At this point we are going to add these items to the menu in order to learn how to setup the menu and get direct access to those programs. Let's add those items already installed to the menu first and add more later.
Open the terminal and I'm assuming you logged in as root. Type obmenu (enter) and we can now open Obmenu as shown above. The top bar should say "Obmenu /root/.config/openbox/menu.xml". Click on "Openbox 3" to open the main menu.
Put the dark bar below the terminal and web browser and select "New Item" and put in:
Label - PcmanFM ; Execute - pcmanfm and once again select "New Item" and do the same for the following:
Label - Leafpad ; Execute leafpad ; etc. whatever programs you want to enter.
Now save and right click on the menu "restart" and the now items you entered are in the menu. You should also see "Debian" if menu was installed and opens up to a number of other small programs.
Pcmanfm is a file manager that came with LXDE and leafpad is a text editor. As one adds new programs they can return here to add those to the menu.
If one is in their home directory (which is where you should be if not root) the top black bar will have "~/.config/openbox/menu.xml".
This can also be done from a text editor in order to add small icons:
$ sudo leafpad ~/.config/openbox/menu.xml
And this is a sample where "label" and "execute is what you entered with Obmenu. (This example uses thunar.)
<item icon="/usr/share/icons/thunar.png" label="Thunar"> <action name="Execute"> <execute>thunar</execute> </action> </item>
Here is great screen shot of my Openbox menu: sshot3.png and that pre-made menu can be downloaded via wget and will need some editing unless one is following this entire series.
$ sudo mv ~/.config/openbox/menu.xml ~/.config/openbox/menu_bak.xml
$ sudo wget http://www.bristolwatch.com/rpi/dl/menu.xml
$ sudo cp menu.xml ~/.config/openbox
What one did above was rename the old menu.xml, downloaded the replacement, then copied it to ~/.config/openbox.
How to Configure Openbox
This assumes the following programs have been installed if not do so now.
~ $sudo apt-get tint3, xfce4-panel, feh, parcellite, conky, rox-filer
When Openbox loads it will run the file "autostart" in the "~/.config/openbox" folder if not over ridden by .xinitrc. Open a terminal and:
$ leafpad ~/.config/openbox/autostart
Copy what's below and uncomment what you want and save.
#start up for openbox # uncomment what you want if not selected from .xinitrc # this assumes these programs are installed # wallpaper - sh ~/.fehbg & #bottom tray/bar choose only 1 #exec tint2 & #exec xfcer4-panel & # clipboard #exec parcellite & # system monitor #exec conky & #rox-filer pinboard. If using with conky set both to same background # may not work with conky #exec rox --pinboard=pblewis &
$ sudo chmod +x autostart
This will work if one doesn't have a .xinitrc file over riding it. To find out more see Raspberry Pi Window Manager Control with Xinitrc
- Build Your Own Raspberry Pi Arduino System
- Setting up Openbox for Raspberry Pi
- Raspberry Pi Linux Permissions-Program Installations
- Connecting DS1307 RTC to Raspberry Pi
- Raspberry Pi Window Manager Control with Xinitrc
- Setup FSTAB, Symbolic Links for Raspberry Pi
- Change Background Wallpaper on Raspberry Pi with FEH
- Setup JWM Window Manager for Raspberry Pi
- Raspberry Pi USB Audio Connection
- Additional Program not in the Repositories
- Add Zmixer ALSA Sound Control to Raspberry Pi
- Adding Lightweight Beaver Text Editor to Raspberry Pi
- Add Viewnior Lightweight Image Viewer for Raspberry Pi