How to Build a Lightweight Linux for your Low-End Laptop

Like many of you, I occasionally come into possession of an older laptop. Usually, it’s something that used to run Windows XP, sometimes even older. You always hear that Linux is supposed to be so great for resurrecting old hardware, but many modern desktop distributions with all their bells and whistles end up chugging along just as slowly as Windows did. In those circumstances, you can either throw the machine away, or build your own custom install tailored toward the needs of the machine. Today we’re going to put together a Debian installation tailored specifically toward the needs of an older laptop.

There are a few distributions out there, such as Puppy or Damn Small Linux which focus almost entirely on this niche. Why not use one of them? You certainly can, but Debian’s characteristics make it ideal as a platform for building up your software stack the way you want it. Debian’s greatest strength (though some might call it a weakness) is that it is not a unified, cohesive whole in the way that Windows, OSX, and even Ubuntu are. Instead, Debian is more like a box of Legos, where you’re provided with a solid base and access to all the pieces you need. This is what makes it such a popular starting point for custom Linux systems, and why it’s the core behind many of today’s most popular desktop Linux distributions.

Before we begin installing, it’s important to note that Debian install CDs are strictly composed of 100% free software. That means it does not contain any non-free hardware drivers, so there is a good chance that your laptop’s wireless network device will not function from the install media. Therefore it is highly recommended that you proceed with the installation using cabled Ethernet.

For many reasons, I suggest using the tiny Network Install CD instead of the full 700MB ISO. This will likely end up saving you a lot of time that would otherwise be wasted downloading and upgrading packages that you don’t want or need.

We’ve previously covered the process of performing a Debian network install, so I won’t go into detail here, but there is one important suggestion. Once the Software Selection screen comes up (after partitioning and such), I strongly recommend that you uncheck the box for Desktop Environment, and check Laptop.

l4-debselection

You certainly can leave Desktop Environment checked if you wish, which will install a vanilla Gnome 2 desktop. I suggest removing it because that will add a LOT of weight to your install, and will most likely include several packages and services you do not need.

Getting the OS installed is only the first step. Now, let’s include some packages. Once you’ve booted up and logged in, you’ll probably want to start by installing your own graphical environment to replace Gnome. First, however, we’ll need to add a few core pieces that will be needed by any desktop software. Run the following command (as root) to add these core utilities.

apt-get install xorg sudo iceweasel pulseaudio
  • X.org is the backend graphical system used by all major desktop environments
  • sudo allows you to run individual commands as root
  • Iceweasel is Debian’s 100% free rebranding of Firefox
  • PulseAudio is one of the sound systems most commonly used in Linux*

* Some people have had a lot of trouble with PulseAudio, which can be difficult to get working properly. If you have trouble, try installing alsa-base and alsa-utils instead, which will make your system use the Advanced Linux Sound Architecture.

Once finished, make sure your username has sudo rights and you’re ready to install your desktop.

Option 1: LXDE

Based on OpenBox, LXDE is a very small and fast desktop environment. It includes several small applications such as a file manager terminal, and music player designed specifically for use in LXDE.

lxde-bigscreen

LXDE is well suited to those who want to get up and running right away, or those who are used to the Windows-style desktop and Start menu interface.

It can be installed easily from the command line with

sudo apt-get install lxde

Option 2: Window Maker

If you’re a little more adventurous, or a little more willing to tinker with settings, I very highly recommend Window Maker. It’s a bit old, it’s a bit ugly, but with a few tweaks, it becomes quite possibly the most productivity-oriented desktop around.

final-screenshot

And it’s fast. Blazing fast. This entire article was written on an old HP laptop running Debian and Window Maker as described, and my desktop is more responsive than most of the higher-end Windows 7 and even Linux desktop running larger, fatter environments.

(This is, of course, a completely subjective statement and depends on a lot of variables)

Like LXDE, it’s easily installed from the command line with

sudo apt-get install wmaker

Presumably, by this point, you’ve got your lean and mean Debian system running with little more than a window manager and a web browser. I recommend the following applications for keeping productivity high and resource usage low.

  • NDISWrapper Driver Tool – Allows you to use many Windows drivers to run devices on Linux (extremely handy for WiFi)
  • PCManFM File Manager – Even if you’re not using LXDE, this is a great lightweight file manager that stays out of your way.
  • Geany Code Editor – If you do software development, Geany is an excellent editor that has many useful features, but manages to remain small and fast.
  • VLC Media Player – It doesn’t matter the distro or even the OS, VLC is just a great player.
  • Audacious Music Player – This is one of the last remaining WinAmp style players, and still does a great job.
  • LightDM – A desktop login manager intended as an alternative to large ones like GDM and KDM

Hopefully, by the time you’re done reading this, you’re well on your way to a custom Debian setup that allows your old laptop to run fast and smooth. I’ve toyed with many a Linux distribution and desktop environment, yet time after time I come back to Debian and Window Maker, with a few lightweight utilities. Together they make for fantastically productive and useful computing with minimal clutter. This laptop, for one, is never going to have to try to run Linux Mint again.