• Home
  • Code
  • Howtos
  • Opinion
  • Presentations

The Wandering Geek

Linux and Unix Lore, Sysadmin, Coding, and Hacks

« Migrating From Blogger to Wordpress
Move Over, Grep. Hello, Ack. »

A Lightweight Linux Desktop

Apr 12th, 2009 by Doug

Note: Updated April 2009 with instructions for current Debian Stable, Lenny. I recently had the need to install Linux on an older PC - a generic PIII 1Ghz with 384MB of RAM. I’ve long been a fan of Debian for older hardware - the installer allows you to install a base system of about 400MB which you can tweak and add onto after-the-fact. I find this much easier than installing a complete desktop and removing loads of uneccesary bloat afterwards. I’m going to show you how to proceed with such a minimal install of Debian Lenny and get X and a few lightweight apps installed.

To get started, during the installation, select your network mirror as usual, but do not select anything during the software selection phase. By default, you will have “Desktop Environment” and “Standard System” selected. Un-select both and proceed with the rest of the install. Here is what the default looks like:

Software Package Selection

Proceed with the rest of the installation as normal; it will be very fast, since only a basic console system is installed. Log into your bare-bones desktop as root and edit (with vi or nano) /etc/apt/sources.list to remove the Debian CD (or DVD) line at the top, and add the contrib repository. You should have just a few lines left:
deb http://ftp.debian.org/debian/ lenny main contrib deb http://security.debian.org/ lenny/updates main contrib deb http://volatile.debian.org/debian-volatile lenny/volatile main contrib
Now let’s install a few basics - X, a lightweight window manager, a text editor and some tools for text-mode and graphical browsing. Feel free to substitute your own window manager here, I prefer icewm as it has the “standard” keybindings I’m used to for a desktop.
aptitude update aptitude dist-upgrade aptitude install ssh openssl wget elinks less screen xserver-xorg \ xresprobe icewm icewm-themes exim4 menu rxvt \ build-essential iceweasel xinit x11-xserver-utils
Remove build-essential if you won’t be compiling any software. Iceweasel is just Mozilla Firefox in a Debian package. rxvt is a lightweight replacement for xterm, and menu is a Debian-specific package that keeps your window manager applications menu updated as packages are installed and removed.

If you want to play that music collection, install mpg321 and aumix, console-based mp3 player and volume control, respectively. For image manipulation, imagemagick is a suite of powerful command-line image viewing and editing tools. For printing, install CUPS and associated print filters:
aptitude install cupsys cupsys-client foomatic-filters-ppds
Then open a web browser to http://localhost:631 to add a printer. For mail, give mutt and getmail a try: aptitude install mutt getmail4
Remember that in Debian, extended package documentation is in /usr/share/doc/<package name>, for example /usr/share/doc/getmail4. A helpful tip - a lot of package documentation is stored in compressed form - you can read it with zless, which will uncompress it on the fly.

During the Xorg server configuration, you can probably accept the defaults to all of the questions - with xresprobe installed, critical things like screen resolution and monitor timings will be auto-detected. When all this is done, log out and back in as a non-root user, and type “startx” at the prompt. Here is a look at the spartan desktop:

Icewm Desktop

If you need to, you can redo the Xorg configuration with this:
dpkg-reconfigure -phigh xserver-xorg
If you would rather install a graphical login manager, you can choose from gdm, xdm or kdm, or do a package search with apt-cache search “display manager”. I recommend xdm, as it has the fewest dependencies.

That’s pretty much it. At this point, you still have far less than a gigabyte of software and OS installed, and your desktop will seem positively snappy, even on slow hardware.

[Post to Yahoo Buzz]  [Post to Delicious]  [Post to Digg]  [Post to Reddit]  [Post to StumbleUpon] 

  • About

    Here you'll find plenty of Linux and Unix sysadmin tips, howtos, code snippets and geek commentary - I hope you find the site both interesting and useful.

  • [FSF Associate Member]
  • Links

    • Dilbert
    • Hacker News
    • Linux Gazette
    • Linux Questions
    • Linux Weekly News
    • Perl Monks
    • Ubuntu Forums
    • UnixLore.net
    • User Friendly
    • Xkcd
    • Join the FSF as an Associate Member!

The Wandering Geek © 2009 All Rights Reserved.