How to make Peppermint OS even faster with Openbox

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!

Why Openbox

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.
Peppermint OS running Openbox
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 ~/.config/openbox/autostart.sh file:

fbsetbg -f -r /home/trent/wallpaper
nm-applet &
xscreensaver -no-splash &
gnome-power-manager &
gnome-keyring-daemon
mail-notification &
/home/trent/touchpad.sh
(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!

-- Trent

About these ads

10 thoughts on “How to make Peppermint OS even faster with Openbox

  1. Thank you for the Peppermint review.
    I will be following this one.
    I will be deploying it for those that have older harware, or just want to do those netbook type activities.
    I usually go to DistroWatch. Keep the good work up. :)

  2. Pingback: Links 25/5/2010: KDE 3.5 Forked, Slackware 13.1 Released, Fedora 13 | Techrights
  3. Thanx 4 yr review and advice. I was always a Mac user, but I’ve also been using Mint since Bianca. Peppermint looks like a gr8 start, but it really does need a different browser. How about Arora? that does the job 4 me.

  4. Actually, I think LX- terminal is a tad bit heavier than something like Urxvt, so I’m assuming your actual memory footprint at start-up as maybe 57-59mb

    That’s impressive, seeing as how my Arch and Debian Sid setups (using standalone OpenBox or PekWM) take up around the same 50-60MB of RAM with all my startup apps, applets and daemons loaded.

    Thanks for the write-up. I’ll definitely check out Peppermint (right after I try out the new Zenwalk-Openbox iso)

    Cheers.


    • Actually, I think LX- terminal is a tad bit heavier than something like Urxvt, so I’m assuming your actual memory footprint at start-up as maybe 57-59mb


      You’re probably right about that. I’ve kind of found myself liking LXTerminal lately, so I haven’t even tried my informal memory usage look with something lighter than that for my term choice.

      Thanks for the write-up. I’ll definitely check out Peppermint (right after I try out the new Zenwalk-Openbox iso)

      Cheers.


      Absolutely, my pleasure. I actually really had to nitpick to find downsides in Peppermint, and now I’ll admit I’ve got it running on 2 of my 3 main machines now as my OS of choice. I’m definitely glad I tested it out long enough to review it. :)

  5. Excellent tutorial, one question though: how do you set peppermint to automagically login and start the openbox-session instead of the regular peppermint one?

      • Trent,
        Once again, I must thank you for your initial write-up on Peppermint. I finally got round to trying it a few days ago (the Zenwalk Openbox edition was underwhelming).

        I must admit that performance was pretty impressive, considering it’s ‘heavy’ Ubuntu/Mint underpinnings. I was particularly surprised with boot-up.

        Not really a fan of LXDE, though (seriously, teh panel is the fugliest thing I’ve seen… like something from GTK1.0 times)
        I did a standalone Openbox install and added some of the stuff I use on my usual Openbox setups; tint2 panel, conky, nitrogen, urxvt…etc.

        Only problem is, I seem to have screwed up the partitioning process, and Peppermint doesn’t recognize my usual shared ‘Home’ folder…… will do another install and dive deeper into it. All I can say for now is, performance-wise, it’s about on par with an Arch or minimal Debian install, and actually beats both in the boot process (probably thanks to a new Xorg build working in tandem with ureadahead and upstart)

        Only problem with this is;
        Regarding automatic logins that Klas talked about, I haven’t checked yet, but read somewhere that Peppermint disabled this feature by default. I tried launching ‘gdm-control’, which I assumed was for controlling GDM (I’m not that familiar with GDM, tbh) but it didn’t launch, and neither were there any options in the actual GDM screen.
        If it’s true about the Peppermint devs disabling automatic-login by default, then I feel they might have shot themselves in the foot a bit, since ureadahead assumes your system to automatically login, and profiles accordingly meaning it profiles from kernel startup right up to (a working desktop, so not having automatic-login enabled basically means that uread is profiling as your’re typing your username/password, which is probably not the most eficient thing to do.

        Now I’m no Linux guru, it’s just something I read somewhere. You might want to ask the Peppermint devs or forum members for more info on this.

        Just my 2 cents.

        Thanks for taking the time to read my boring wall of text.

  6. A very nice post. I’m a long-time linux user and have used Gentoo on my desktop for a wihle. On my laptop (netbook: eeePC), which is what gets used most, I was using Cruncheee but just installed Mint 10 on HALF of the disc. Think I’ll put Peppermint on the other half. I was using openbox on my cruchneee install and really enjoyed it. Do you use conky at all? What’s your feeling about it?

    • I would think that Peppermint would be pretty slick on an eeePC. As lightweight and fast as it is, it’s probably close to ideal for something with limited resources like that.

      I used to use Conky, but I noticed that it tended to eat up too many resources, so I went back to GKrellm.

      Thanks for the comment!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s