Installing Openbox on Foresight Linux
My friend Og Maciel
originally introduced me to Openbox a while back and I’ve been using it ever since. I love the lightweight feel, the ability to customize and the center around having NO icons on my desktop. I don’t feel cluttered when I work! I published a version of this tutorial/how-to on my previous blog that I’ve retired. It was originally for Openbox 3.4.2 but I’ve now updated it for Openbox 3.4.6.1. This tutorial is tailored for Foresight Linux 1.4.X but the guide may very well serve other distros as well.
What is Openbox?
From the Openbox homepage, “Openbox is a minimalistic, highly configurable, next generation window manager with extensive standards support.” From using it, I often think of it as fluxbox with the benefits of being able to dip into Gnome or KDE for the items that I want to use. Your desktop will then run with speed and simplicity using only the elements you want to use with it.
So…Let’s get Started…
This How-To will assume that you’re running Foresight Linux, you’re logged into Gnome and that you’re familiar with conary, the package manager for Foresight. First and foremost, install openbox:
lostwork:/home/devnet] sudo conary update openbox obconf obmenu
This installs the needed components to run Openbox on your system. Openbox is minimal by default though so if you login to the environment npw for the first time, there will be no taskbars, nothng…just a large blank area for you to work with. We will need to install some extra components to give a bit more functionality. If you’d like a panel menu, I recommend using pypanel. This is a small python panel that allows applications to dock and houses a notification area. You can also setup an area to launch apps from so it really is quite nice.
There are other panels that are packaged with openbox in mind for Foresight; fbpanel is available, which is a very fast and functional menu bar. I like lxpanel also, which is fbpanel with some easier configuration options. For a full list, please see openbox documentation. For our purposes here, we will install pypanel:
lostwork:/home/devnet] sudo conary update pypanel
Now we need to copy the default configuration file for pypanel so we can build our panel to our liking:
lostwork:/] cd ~/ lostwork:/home/devnet] cp /usr/share/pypanel/pypanelrc ~/.pypanelrc
From there, configure your ~/.pypanelrc accordingly. Documentation is available inside the .pypanelrc file.
Let the Configuration Begin!
The hard part (install) is now out of the way thanks to the conary package manager. Now we need to configure Openbox so that it’s ready for us when we logout of Gnome. The configuration files will need to be copied to /home/user/.config/openbox.
Visiting there now will show that there aren’t any files in this directory. The file we’ll absolutely need to create is autostart.sh. Other files that will be in here are rc.xml which is for obconf (openbox configuration) and menu.xml (openbox menu system). We’ll copy menu.xml from a default copy there later. The other file should autocreate when loading for the first time (rc.xml)
The autostart.sh file is what starts all of our services and our pypanel we just installed as well as setup our wallpaper and other items. Instead of going through the options you can place in here, I’m going to share my autostart.sh to get you up and running quickly. Please note that if you chose not to install fbpanel and use the gnome-panel or other panel instead, you’ll need to comment the pypanel line below and uncomment what you’ll be using:
lostwork:/home/ddevine/.config/openbox] cat autostart.sh # This shell script is run before Openbox launches. # Environment variables set here are passed to the Openbox session. ############################################################## # Panel Section ############################################################## # Kiba-dock and awn require a compositing line from the compositing section to be uncommented. # They are a bit buggy in openbox but CAN be run. Uncomment if you'd like t # kiba-dock & # avant-window-navigator # pypanel, my favorite panel for openbox (sleep 3 && pypanel) & # Use the wbar Launcher if you would like# wbar & # If you're going to use the gnome-panel, put a '#' in front of fbpanel & above and uncomment the next line # gnome-panel & ############################################################# # Gnome Integration Section ############################################################# # This section let's Gnome give us some of its desktopiness
gnome-power-manager & glipper & nm-applet --sm-disable & /usr/libexec/gnome-settings-daemon & gnome-volume-manager --sm-disable & gnome-keyring-daemon & ########################################################### # Other Add-on's for Openbox ########################################################### # Make your wallpaper restore to last setting using Nitrogen. nitrogen --restore & # Let Conky do it's magic conky & # Mugshot is a program from Red Hat that aggregates many social media websites. See mugshot.org mugshot & ############################################################ # Compositing Section ############################################################ # Arch Wiki xcompmgr line #xcompmgr -cC -t-3 -l-5 -r5 -I0.3 -O0.03 -D2 -f & # Freedesktop.org standard line #xcompmgr -c -t-5 -l-5 -r4.2 -o.55 & # My Customized one #xcompmgr -c -f -F -t-3 -l-3 -r5 -I0.018 -o.45 -O0.01 -D1 & # DO NOT USE SERVER SIDE FOR XCOMPMGR (shown below). Doesn't work well. #xcompmgr -a -s &
To create the menu system file for openbox, we’ll copy from the default installation to our .config/openbox directory (so we can use obmenu…otherwise, that command will give us an error) so use the following command in a terminal:
cp /etc/xdg/openbox/menu.xml ~/.config/openbox/
Now you’re ready to login and reap what you have sown
Logout of Gnome and change sessions in GDM to Openbox. Notice that your pypanel starts up and has the gnome applications we recorded in the autostart.sh file above running and docked! You can add more options to your autostart.sh file and you can also edit .pypanelrc (in your /home/user directory) to store settings for your panel.
I’ve Installed and am Running, Now What?
Now you get to customize the Openbox menu with your favorite applications. Menus are activated by right clicking anywhere on the desktop. There are a few default applications…I choose obconf right away so that I can choose a theme I like and increase the text size since I’m using a high resolution. After that is done, I right click for the menu again and go to applications >> xterm. When the terminal pops up, I type obmenu. From there, I’ll be able to edit my right click menu.
Now instead of entering obmenu in a terminal each time, let’s add it to our right click options. In obmenu window that you opened in the last paragraph, expand the Openbox 3 option. Find obconf and highlight it. Click ‘new item’ and add obmenu for a label, execute for action, and obmenu for Execute. This will add obmenu to your right click options so you don’t have to open a terminal each time to do things. You can also customize any of the items you find in applications…I put a few things I normally need such as thunderbird, firefox, gnome-terminal, etc. Feel free to add whatever you need…you can have many submenu’s . It’s setup is pretty straightforward.
Nitrogen requires a small tweak as well to get working. What I did was create a /home/user/Photos/Wallpaper directory and then loaded it up with my favorite desktop wallpaper. Good places to go for cool wallpapers is desktopography.com and vladstudio.com
After your first login, you’ll need to add a menu entry using obmenu to call the nitrogen browser. So create the menu entry and the action you call is:
nitrogen /home/user/Photos/wallpaper
So What Have we Done?
Today, we’ve installed Openbox 3.4.2 on Foresight Linux. We’ve given it a pypanel so we have a place to dock applications and we’ve customized the Openbox right click menu and added a wallpaper program called Nitrogen. Hopefully, this shows you the customizable features of Openbox and also shows you the speed that Openbox operates at. It’s a very minimalistic environment, yet one that can be very powerful.
Installation Notes of Interest
pypanel
Some things I’ve noticed when running openbox…network manager has problems with pypanel. I added the sleep command inside my autostart.sh and this is much better now…but there may be similar problems with network manager. It’s really NM searching for a network and it causes the panel to flicker a bit. Not a real show stopper.
Gnome-panel
Gnome-panel running inside openbox causes a few errors to pop up when I login. This could be due to the fact that I’ve started things in my autostart.sh out of order…I’m also not all together sure what is causing these errors. The problem seems to be with the docking area of gnome-panel as when I minimize programs they are not docked. Easily fixable, but annoying nonetheless.
Alternative Panels
There are quite a few alternative panels out there. fbpanel is one. Perlpanel is another. fbpanel and lxpanel are available in the Foresight repositories. You can also add other launchers like wbar if you so desire.
Screenshot
This content is published under the Attribution-Noncommercial-Share Alike 3.0 Unported license.
Related posts:
- Foresight, rPath, LiveCD, and Unity Linux Most, if not all, top distributions of Linux ship a...
- Foresight and Fedora, ClarkConnect Becomes ClearOS Foresight and Fedora (aka “boots, a fedora remix”) Last week...
Related posts brought to you by Yet Another Related Posts Plugin.













