A few weeks ago I posted a very early review of the new web-friendly Peppermint OS. In that review, I lauded the Peppermint team for achieving what I think might be the fastest graphical Linux distro I’ve ever tried, on any hardware.
The only things that get in my way of enjoying Peppermint are, unfortunately, the limitations imposed by the still-under-heavy-development LXDE desktop environment, which, while I’m still pretty excited about it, provides a few stumbling blocks to someone like me who likes to have more control over his user interfaces.
Well, for those of you out there who agree, I thought I’d do a quick writeup on getting the most out of Peppermint OS without having to resort to installing another desktop or window manager. Instead, we can make do with something that’s already integrated into Peppermint: the Openbox window manager!
As I mentioned, Openbox is already part of Peppermint OS, being the window manager around which LXDE is based. Similar to the now defunct Blackbox window manager and the popular Fluxbox, Openbox is a very fast, very lightweight, highly configurable and modular window manager. Some of you who have been following content here on Linux Critic since last year may remember the writeup I did on the Openbox window manager back in September.
A control freak’s dream, Openbox features a way to configure just about anything, to the extent where even a Fluxbox enthusiast such as myself was very fulfilled by using it for a couple of months while I was evaluating it.
Since Peppermint is already built on Openbox — in part responsible for how incredibly fast this OS happens to be — it’s an obvious choice to go with for those who want a higher degree of control than LXDE offers by default, and we don’t even need to install much or change very many configuration files to make it happen.
Install one utility, tweak a couple of files
Since it has been since around September that I last messed around with the Openbox window manager, I confess I had to go back and refer to my own post on the subject to refresh my memory and avoid having to re-figure out stuff from scratch. But hey, that’s easily 50% of why I started this blog to begin with!
So let’s get started.
First: copy the files you’ll need
Since Openbox is already on your Peppermint system, all the configuration files you need are also already there.
Open up a terminal session and type the following:
cp /etc/xdg/openbox/* ~/.config/openbox
If there isn’t already an openbox directory in your .config folder, you might want to create one. At any rate, that copy command gives you a copy of the basic Openbox files in your profile so you can edit them without having to be root or use
sudo. This way too, if for whatever reason you manage to hose up your Openbox config, you can always start from scratch with the default system copies of those files without having to reinstall the window manager.
Second: install Obmenu
The next important step to install is Obmenu, because in my opinion, editing the Openbox default menu is a must before you go any farther with this, and editing the XML file by hand is a pain.
Still have that terminal window open from the last step? Good. Type the following in there:
sudo apt-get install obmenu
Once it’s installed, you’ll want to run obmenu and get your menu set up however you like it. I’m a long time Fluxbox user, so I have a fairly standard list of things I tend to like on my menu, and the Openbox menu is almost exactly like Fluxbox’s, so the end result is pretty similar.
Obmenu is pretty self explanatory as far as usage goes, so I won’t go into dry detail here on its use.
My most commonly used apps — Firefox, mail, lxterminal, Leafpad, whatever my favorite music player is at the moment — all tend to be in the top section of the menu. Underneath that I normally include a subfolder that has my most commonly used ssh and RDP connections pre-coded, and under that I include things like mintUpdate and Obconf and Obmenu so I can get to them quickly if I need to tweak something.
The observant among you may notice my “Wallpaper shuffle” menu option from my screenshot. Openbox doesn’t have any way to set the wallpaper by default, so you’ll need to install something like Feh in order to set your own. I was already playing around with Fluxbox on this laptop, so in my “Wallpaper shuffle” item on my Openbox menu, I just utilize the default Fluxbox method since I had it available. That line in Obmenu for me looks like this:
fbsetbg -f -r /home/trent/wallpaper
But you can use whatever solution with which you are most comfortable, of course.
Step three: configure your autostart shell script
For the less technical among you, don’t worry, this isn’t as bad as all that.
Openbox uses a simple shell script to determine what runs on startup. Put it this way: if you don’t tell it to run it, it doesn’t do it. This includes things like networking, a panel, whatever.
So since I, like most people, want a few of these things up and running when I log in, I added the following lines to the very end of my
fbsetbg -f -r /home/trent/wallpaper
xscreensaver -no-splash &
(sleep 2 && lxpanel) &
Some explanation is probably in order. That first line does the same thing as my “Wallpaper shuffle” Obmenu item… it sets a random wallpaper from a specified directory. Note that if you don’t have Fluxbox installed, that “fbsetbg” command won’t work for you, and the syntax is a little different if you use something like Feh to set a wallpaper on startup, so your mileage may vary.
Next you’ll see I call nm-applet, which starts up the network manager so that I can connect to my wireless router.
Then I start the Xscreensaver daemon, and then the gnome-power-manager so that Openbox knows what to do when I close the lid on my laptop or leave it sitting idle for six hours or whatever.
Below that you’ll note that I have it fire off the gnome-keyring-daemon and then mail-notification. The gnome-keyring-daemon is what holds the password for mail-notification. Since I’m not using a local mail client on this laptop (or anywhere else lately, for that matter), I just have mail-notification running all the time that checks a couple of my pop accounts and notifies me with a silly wav sound file whenever it notices something new has arrived.
Last but not least, I have the autostart.sh call my touchpad disabling script (I hate having my touchpad enabled on laptops) and then I’m calling lxpanel, which gives me the usual task bar with which most LXDE users will be familiar. I preface that last one with a “sleep 2″ command so that I make sure Openbox is finished starting up before I call lxpanel, otherwise weird stuff can happen.
Next step: look and feel
On my Openbox menu you can see in my screenshot above that I also have an option in the bottom section for “ObConf”. This is the way to configure some of the default behavior of Openbox as well as how you can change the theme, color scheme and fonts used by the window manager. Run this (either in terminal or by launching the “Openbox Configuration Manager” on the “Preferences” submenu in the LXDE menu) and play around with it until you get everything the way you like it.
Log out and pick your session
Once you’re done with the previous tasks, you’re ready to give Openbox a try on Peppermint. Log out, and from the login screen, under the “Desktop” menu, select “Openbox” and log back in.
The first thing you’ll notice is that you have no desktop icons, and if you told Openbox to start lxpanel in the autostart.sh, you’ll need to put what you like back on that as well, but other than that, if you right click anywhere on the desktop the Openbox menu will be there.
There’s a lot you can do with Openbox by itself, so don’t be afraid to experiment with it! If you don’t need the lxpanel, leave it out of the autostart.sh and you’ll have an even faster startup than I have, and with Peppermint not launching the full LXDE desktop functions, that’s pretty fast.
Have fun, and feel free to ask if you have any questions!
EDIT: Peppermint memory under Openbox (without LXDE)
It has been pointed out to me that I have been remiss in not mentioning how much memory Peppermint uses with my current Openbox-only setup.
Even with the various daemons I mentioned above (in my autostart.sh discussion) running, Peppermint in an Openbox session (immediately after startup, with nothing else running) uses only 62 MB of RAM, and still only 64 MB of RAM with the screenshot app running, as you can see in this screenshot I took for this update:
So for those of you out there interested in running Peppermint OS on extremely limited hardware, take note… by running just Openbox without LXDE, you can shave even more resource use off of this already lightweight OS by putting in place just a few minor tweaks like I discussed here today. Impressive!