Geek Moment: Shiny New CrunchBang Linux

CrunchBang Linux is an operating system based ona philosophy of lean code and usability. It doesn’t aim to be the easiest version of Linux, but for someone with a moderate amount of computer ability it’s straightforward and not bloated.

The upcoming version switches to the proven and stable base of Debian. This is version 10, named “Statler,” (naming is based on Muppet characters) and the alpha version available now has been receiving an enthusiastic reception from the CrunchBang community – a number commenting that it’s more stable than many distros’ final releases.

Now, while I’d love to see a stable Linux distro that works for everybody, a version that works extremely nicely for semi-geeks like myself is very, very welcome.

via Release Notes – CrunchBang Linux 10 Alpha 2 ~ CrunchBang Linux Wiki.

Appropriate software design

It makes sense to have an option only if an unsophisticated user can understand what it does and how to set it.  Otherwise you should Do The Right Thing for those users.

That’s a comment from an LXDE developer on their mailing list. LXDE is a Linux desktop environment (i.e. user interface) with a focus is on lean code, and a level of usability appropriate to new users. Principles like the one above are central to what makes the project work so well.

Of course it can be more complex – it can be good to have advanced options, as long as they’re marked as such, and the default is suitable for regular users.

Lightweight Linux

A fellow Appropedian asked me about options for lightweight Linux distros, for using on old hardware. Thought I’d share my response here.

My knowledge is limited, but what I’ve learnt:

  • Join a local LUG – look out for days when they help people install Linux. Beware of installing Linux when you won’t be face-to-face with Linux geeks for a long time, especially if you’re doing something more problematic like installing on a laptop – I made this mistake, and it was a horrible time sink. Online support doesn’t cut it.
  • Vector & other Slackware distros don’t seem user friendly, and neither does DSL (Damn Small Linux) – I looked into it, but with only about 2 years experience in Linux, I didn’t feel up to any of these choices. With more experience, and the backing of geek friends, it may be an option for you. (DSL is also a much older distro, with much older packages a.k.a. program versions, but it works on very limited hardware, and is possibly more reliable than other ultralight distros such as Puppy Linux).
  • I recommend Openbox (window manager) and LXDE (desktop environment using Openbox – meaning Openbox is the lighter of these two light options). These are really nice and lean – lighter than XFCE, but nicer to use. Expect to see these become more popular. You can add them to any distro, but where they’re not one of the standard options, in some cases there can be clashes (probably a bigger problem on a laptop).
  • I like to find a distro where it’s set up to be lean, but it’s easy to use.
  • I’m not hung up on installing “free” (open source) only – I want Skype and I want video codecs. (I install Linux firstly because I want an operating system that does what I need, not to make a statement.) Ubuntu makes for a little hassle with this – you have to add repositories and certain packages (programs and codecs), and the new user doesn’t know this – they just wonder why things don’t work. Debian makes it really hard work for a newbie, especially if any of your hardware doesn’t have a perfectly free (open source) driver.
  • I strongly prefer something that is at least based on a major distro, and uses the package repositories of that distro. There’s the potential for better support and in theory for bug fixing (Ubuntu is buggy anyway, in my experience, but it does have good support). It also means far more software choice. This, with the previous points, leaves me with one distro:
  • CrunchBang Linux: it’s based on Ubuntu, but uses Openbox, but with some very cool usability tweaks, including partial use of LXDE. It also comes with Skype and video codecs installed. This is the only distro I know that comes with Openbox by default (excluding Debian and Knoppix which I don’t recommend – see below). I’m not usually a fan of Ubuntu, for several reasons including bugginess when I used it in the past – but in spite of that, it’s working quite well for me at the moment, and it has an active and helpful community. This is the most promising distro I’ve used.
  • Debian 5.0 comes with with LXDE as one of its standard options, which means it has Openbox – but Debian was unnecessarily difficult for me. When it didn’t even recognize the hard disk on my ThinkPad, I thought: if this is a sign of how things work in Debian, I’m trying something else.
  • And Knoppix also comes with LXDE standard.  It’s not designed for installation to hard disk though, unless you really know Linux. However, it’s apparently a great rescue disk, with a reputation for hardware recognition – the MacGyver of Linux distros – so I keep a Knoppix LiveCD handy, just in case. (I’d try the CrunchBang LiveCD first, but if things are really screwed up and that doesn’t work, I’ll try Knoppix.)
  • I’ve heard good things about Puppy Linux – it was flaky when I tried it ~2006, but may have improved. It’s also kind of a backwater in Linux development – a lot of non-standard stuff, running as root by default (which sounds like a bad idea to me and to many Linux people), with its own kind of installation, and far fewer packages than a major distro. So unless you need to go super-light (even lighter than Crunchbang) I wouldn’t recommend it.
  • I just discovered boxpup – looks like Puppy with Openbox. I’m guessing it’s a bit harder than CrunchBang, with less package choices, but probably even lighter than CrunchBang. I would still have some concerns about bugginess, security, package choice and maybe usability, but if you’re keen, you could try it out with some help from your LUG.
  • Anything I’ve said related to something being hard to use (e.g. Debian) becomes much less of an issue if you have geeky friends close by and/or belong to a LUG. My preference though: Get something you can mostly handle yourself. You’ll still need help, but there’s no need to make it harder than necessary.

So join a LUG, check out CrunchBang, and enjoy Linux!

Thanks to Jon Camfield for his input at the talk page where this started.

Lean code #2: Luxury computing

Efficient code is green code, as I blogged a few weeks back. And more than that, efficient code is just really, really nice to use.

I’ve been using LXDE for a couple of months now. This is a “desktop environment” – that is, the window manager, panel, all the “GUI” stuff, that makes up the top layer of a Linux distribution. I’m using it with Mandriva (and like other major desktop environments, it also works with many other distributions).

And this is a very lightweight distribution – i.e. it’s efficient code. It’s much smaller than even XFCE, one of the best known lightweight alternatives. But here’s what it means to me:

  • Stability. The last time I restarted my laptop was about 20 days ago – in that time I have suspended and woken the machine several times every day, with no hiccups. My browser (Swiftfox, a slightly faster and lighter version of Firefox) has crashed a few times, thanks to way too many tabs, and to a document-viewing site called But the operating system has been rock solid.
  • Speed. I wanted a lightweight distro so that I could just open my laptop and be writing in seconds rather than minutes, before I forget the idea I’m planning to write down. I thought that would be hard to achieve, but it was as easy as installing LXDE. Plus, I rarely get the hangs and long waits I used to get with Windows, and to a lesser extent with fatter Linux systems. (If I do, it’s usually because I have a file search going that I’d forgotten about, and that’s quickly fixed.)
  • Much more flexibility. I can now keep open whatever programs I want, without upsetting the system. I always have multiple documents open in Abiword and text editors, Skype, often I have two browsers open, plus a PDF viewer and more. Even when most of the memory is in use, when Mandriva with heavier desktops would be slowing to a crawl, Mandriva with LXDE is perfectly happy and responsive. And with its smaller footprint, it’s harder to use up the memory in the first place.

Perfect, huh? Well, not quite. It’s a work in progress, and while I’m told everything works well on LXDE with Debian or other distros, I have problems on Mandriva: I have no audio, no flash video, and USB drives and external hard drive don’t work at all. I live with this for now, because the speed and stability is letting me get my work done in a way that no operating system – Windows, Mac or any Linux distribution – has ever done for me before. For the occasional backup, I can boot up in Openbox and the USB connection works perfectly. (Openbox is an even lighter option, just the window manager used by LXDE with no “desktop environment”, but it’s slightly confusing for newbies.)

At some point soon, I plan to bite the bullet and switch to Debian. But whatever system I end up using, one thing is sure – LXDE has spoiled me. I have experienced sleek, efficient code, and there’s no going back.

Footnote: In the interests of better documentation, and making life easier for newbies, I’ve been adding what I learn to the Mandriva and LXDE wikis. Of course!

The world needs lean code!

Efficient code is green code, code that will work better on old or “light” computers used in developing countries, better on the shiny new netbooks (such as the EEE) that are coming out these days – and that will make a fast computer even faster. Efficient code, it seems, has no downside.

Jim Gettys  of OLPC says in a July 2006 interview:

There seems to be a common fallacy among programmers that using memory is good: on current hardware it is often much faster to recompute values than to have to reference memory to get a precomputed value. A full cache miss can be hundreds of cycles, and hundreds of times the power consumption of an instruction that hits in the first level cache. Making things smaller almost always makes them faster (and lower power). Similarly, it can be much faster to redraw an area of the screen than to copy a saved image from RAM to a screen buffer. Many programmer’s presumptions are now completely incorrect and we need to reeducate ourselves…

A large part of this task is raising people’s consciousness that we’ve become very sloppy on memory usage, and often there is low hanging fruit making things use less memory (and execute faster and use less power as a result). Sometimes it is poor design of memory usage, and sometimes it is out and out bugs leaking memory. On our class of a system, leaks are of really serious concern: we don’t want to be paging to our limited size flash.

In fact, much of the performance unpredictability of today’s free desktop can be attributed to the fact that several of our major applications are wasting/leaking memory and driving even systems with half a gigabyte of memory or more to paging quite quickly…

X [the X window manager] does what its told: many applications seem to think that storing pixmaps in the X server (and often forgetting about them entirely) is a good strategy, whereas retransmitting or repainting the pixmap may be both faster and use less memory. Once in a while there is a memory leak in X (generally in the graphics drivers): but almost always the problem are leaks in applications, which often forget the pixmaps they were using.RAM in the X server is just as much RAM of your program, though it is in a different address space. People forget that the X Window System was developed on systems with 2 meg of RAM, and works today on 16 megabyte iPAQ handhelds.

We need better tools; some are beginning to appear. OLPC is sponsoring a Google Summer of Code student, Eduardo Silva, from Chile, who is working on a new tool called Memphis to help with this problem.

Work done on memory consumption will benefit everyone: not everyone in the world has a 2ghz laptop with a gig or two of RAM…

Nuff said.

Confession: I’m not a coder. I help with the development of Linux only by documenting the parts I know, and by reporting bugs. While I join Jim Getty in calling for more efficient code, even much of the bloated code still represents an enormous amount of good work – it just needs some cleaning up to become awesome code.