31 December 1970

An Even Lighter Debian

Note: The material here has pretty much been obsoleted by SkinnyDebbie (blog postings | website) and is probably obsolete in other respects as well. I am leaving this page here for reference purposes.

If after installing a basic Debian-Xfce environment you find that your computer is still not fast enough for you, you can lighten up your system considerably by changing the default window manager, file manager, and some other things. This will take some time and patience to set up, but it will give you a desktop environment that's quite fast. This is especially useful if you have a RAM-starved or slow system. The result might not be awesomely pretty, but it will give you a very fast, usable, and secure system.

Install a baseline Debian-Xfce system
Go through A Lighter Debian and follow the instructions.

Install IceWM
IceWM is a very light yet highly usable window manager. To install it:
$ sudo aptitude install icewm icewm-themes
If you look through Synaptic, you will see iceme and iceconf and may be tempted to install these as well. I suggest that you not do this and instead learn how to configure IceWM directly through editing its configuration files. It's not that tough, and good documentation is available at the IceWM website.

Install ROX-filer
ROX-filer is a lightweight file manager with desktop management features. We will use it instead of Thunar.
$ sudo aptitude install rox-filer
Update menus
$ sudo update-menus
$ update-menus
Set IceWM as the default window manager
Logout. Then from the login screen's "Sessions" menu select IceWM and initiate a login. When asked if you want to make IceWM the defualt window manager, answer "Make Default".

Configure IceWM options
This is such an involved process that I decided to publish configuration files to make it easier. The basic idea is to copy some configuration files to IceWM's hidden folder in your home directory.

Start ROX-filer,
$ rox
and make your hidden files and folders visible by clicking on the eye icon or typing Ctrl-H. (Remember that in Linux, files and folder whose names begin with a period are "hidden". To see hidden files, you will need to tell your file manager to show hidden files.)

Open your WWW browser and go to http://mithat.co.nr/linux/icewm-config. Download each of the files to a temporary location and then use ROX to move them to the .icewm folder in your home directory. Important: The files you download should have no file extension. If your WWW browser adds an htm extension, remove the extensions by renaming the files.

Make the startup file executable:
$ chmod u+x ~/.icewm/startup
Logout by clicking on IceWM's applications menu icon (the leftmost icon on the taskbar) and select "Logout...", then log back in. ROX should now be managing your desktop and IceWM will generally behave better (or at least more to my liking).

You can now drag and drop items to your desktop and get to know how ROX-Filer works in your freetime.

Notes:
  • ROX-Filer places links to things on the desktop, not things themselves.
  • System icons (png, svg, etc.) that you can use for decorating what you place on your desktop are located in /usr/share/icons.
  • Some of the applications under "Utilities" will not work yet. This is because we have yet to install them.
Additional notes:
  • There is a weird bug in either IceWM or ROX that will make a 'rox' button appear and flash in the taskbar whenever you log in. You can make it go away by clicking on it.
  • The "Desktop" folder in your home directory is Xfce's desktop -- not ROX's. If you are absolutely certain that you will never use Xfce again, you may delete this folder. (It's probably empty anyway, so you can simply add it again later if you decide to revert to Xfce.) Also, you will want to open the WWW browser and tell it *not* to use the "Desktop" folder as the default download location; your home directory is a good alternative for a default download location.
Change IceWM's theme
IceWM's default theme will probably not be to your liking. Change it by clicking on IceWM's applications menu icon and navigating through to the available themes. I tend to use IceBlueOkayish. There are more themes available at http://themes.freshmeat.net/browse/925/, but really good ones are hard to find.

Set ROX-filer's options
Start ROX from the command line or IceWM's applications menu.
In a blank area of the ROX window, right-click and select "Options..."
Go through list of options and set as desired. I use the following (only differences from defaults are noted):
  • Filer windows -> Sorting : Directories come first
  • Filer windows -> Tools/Minibuffer : Toolbar type : Text under icons
  • Pinboard : Pinboard behaviour : Icon grid step : Medium
  • Pinboard : Iconified windows : [unchecked] Show iconified windows
  • Menus : Behaviour : [checked] File menu on right click
  • Menus : Behaviour : Terminal emulator program: x-terminal-emulator
  • Types : Themes : Icon theme : Tango
  • Compatibility : [checked] Window manager problems : Pass all backdrop mouse clicks to window manager
Note that ROX's default behavior is to open things with a single click. Since I have moderate RPI issues, this works well for me. But you can change this to the more standard double-click if you prefer, both for regular file manager windows and for pinboards (i.e., the desktop).

Add a sound mixer
Start Synaptic under sudo and use it to install aumix-gtk, a commonly used command-line sound mixer with a GUI wrapper.

Bonus: The IceWM configuration files you downloaded earlier include keyboard shortcuts that use aumix to increase (Alt-UpArrow) and decrease (Alt-DownArrow) the master sound level. You can change these keys in ~/.icewm/keyboard.

Note: alsamixer and gnome-alsamixer are also popular sound mixers, but I haven't found a way to use either to control level with IceWM's keyboard shortcuts.

Setup a rubbish bin
One of ROX's biggest shortcomings is that it does not come with a trashcan by default. ROX lets you delete files, but when they are deleted, they are permanently deleted. However, we can add a basic Rubbish bin to the desktop manually.

Create a hidden folder in your home directory called .Apps. (Notice the period before the name; there is no perdiod after the name.) The Rubbish script will ultimately reside here, and you will be able to place other local service applications that you want hidden here as well.

Goto http://www.hayber.us/rox/ and click on the appropriate link to download Rubbish. Download the file into your home directory. Open a terminal window any type:
$ tar -xvvzf ~/Rubbish-001.tgz
(changing the name of the file if needed) to decompress the file; this will produce a Rubbish bin in your home directory. Move the directory into the ".Apps" folder using ROX; then drag and drop the Rubbish icon from the ".Apps" folder onto the Desktop. You now have a Rubbish bin link on the desktop.

Important note:
When you drag and drop items onto the Rubbish bin, they will stay there until you "Take out the rubbish" with a right-click. However, if you delete an item directlty with ROX using a right-click on an item's icon and navigating to Delete (or using the Ctrl-X shortcut), the item will be permanently deleted. I don't love this behavior, but it's best we can do without a lot of work. Xfce's trash/delete system works the same way, so there's at least some precedent for this behavior.

Change the theme used in toolbar icons of GTK2 applications
To use Tango icons in GTK applications, create a (hidden) file in your home directory called .gtkrc-2.0 and add the following text to the file:
gtk-icon-theme-name="Tango"

Extra credit: Change session managers
In theory you can lighten your system a bit more by removing the Gnome Desktop Manager (GDM) and using X Desktop Manager (XDM) instead. However, I am not entirely sure the savings is worth the hassle. Also, using GDM will make it a lot easier to switch between IceWM and Xfce (as a fallback). But if you want to try it or if you need to save every last bit of RAM, do the following in one sitting and without logging out until directed to do so.

Start Synaptic:
$ sudo synaptic
and use it to uninstall GDM, then use it to install XDM.

Create a file called .xsession in your home directory, open it in an editor, and add the following lines to it:
# This is a simple .xsession file that simply starts IceWM.
# Start IceWM (or run xterm if it fails.)
exec icewm-session || exec xterm -fg red


Make the .xsession file executable:
$ chmod u+x ~/.xsession
(FYI, the above is documented in http://www.icewm.org/FAQ/IceWM-FAQ-3.html.)

Replace XDM config files:
Download the three *_mfk files from http://mithat.co.nr/linux/xdm-config to a temporary location. Then open a file manager window as root (sudo) and move the files from the temporary location into /etc/X11/xdm/.

Edit /etc/X11/xdm/xdm-config so that the *_mfk versions of the files are pointed to by making the following changes:

DisplayManager*resources: /etc/X11/xdm/Xresources_mfk
...
DisplayManager*startup: /etc/X11/xdm/Xstartup_mfk
...
DisplayManager*setup: /etc/X11/xdm/Xsetup_mfk


Logout and restart. You should now see the XDM login screen. Note: to toggle between Username and Password fields, use your keyboard's TAB key. You will not see anything when you are typing your password. Hit ENTER when you are ready to login.

Note: If you want to revert to Xfce, rename the .xsession file to something like .xsessionICEWM and logout/login.

Enjoy
Welcome to the world of Linux. You will now rely heavily on the Internet and the command line to figure out how to set up things that this tutorial hasn't talked about, such as:
  • Printing
  • File serving/sharing
  • A music player (try Amarok or Rythmbox)
  • Networking (including wireless networking)
Dealing with this kind of stuff is part of the joy and culture of Linux. It's not for everybody.

A final note
When you add new users, you will need to go through much of this setup for the new user. Sorry. After the new user has logged in, start from the top and do everything except install software (i.e., anything that starts $ sudo aptitude or that you do with Synaptic.)

Recommended Practices

Note: This content is almost certainly obsolete. It's left here mainly for reference purposes.

Here are my current recommended practices for raising a happy skinny penguin. Please note that I am not a Linux expert. That's not such a bad thing because it means I have to deal with all the problems and frustrations that you would from a perspective that is something close to your own. With any luck, you will be able to benefit from my experience in getting skinny penguins going.

Before we start, there's something you need to be aware of. Full-blown desktop Linux (e.g., Canonical's Ubuntu) may have come of age--meaning that it is now possible to run a general-purpose Linux system on recent hardware that is easy enough for anyone used to Windows or Mac OS to configure and use. However, if your goal is to try to install a desktop Linux system on a circa Windows 98 machine, it's not going to be as easy as using Windows or Mac OS. Depending on the route you take, the initial installation may be easy or tedious. But more importantly, after the installation you may need to learn how to configure stuff that Windows and Mac OS do for you without your having to think. This is especially true if you want/need advanced features such as wireless networking, local-network file sharing, automatic mounting of removable media, and the like. Even something as basic as creating a new user account in lean Linux can be a pain. This learning curve can be very discouraging, so unless you are prepared to embrace a lot of stuff that may sometimes have you pulling your hair out, you might want to cut your losses at this point and turn back.

If you are still with me, then read on.

I have broken things down into different categories depending on how fat your penguin is allowed to be. Pick the category that comes closest to describing your situation.

You have 192MB or more of RAM
Recommendations:
  • Xubuntu
  • Debian-Xfce
  • Fedore Xfce-spin (untested)
Canonical's Xubuntu is an Xfce-based Linux distribution that aims to offer a fully-featured desktop environment but with lower system requirements than those using the more common Gnome or KDE envoronments. Indeed, Xubuntu offers quite a bit of polish and a lot of features. Things like automatic mounting of portable media and notification of software updates happen out-of-the-box. So my first suggestion is to try Xubuntu to see if it works for you.

Debian also offers a version with an Xfce-based desktop environment. The Debian-Xfce install is a maybe a bit less demanding of system resources than Xubuntu--but it's also less feature-filled. If Xubuntu is a bit too sluggish for you or if you just have to have a Debian system, try Debian-Xfce. Start by reading the tips described elsewhere on this site if you want to go this route.

You might also consider the Fedora Live Xfce Spin, which I have not explored any further than loading up the live CD and using it for about one minute.

You have between 64 and 192MB of RAM
Recommendations:
  • SkinnyDebbie
  • Lighten up a Debian-Xfce based system
  • Absolute Linux
SkinnyDebbie (blog postings) is my own "Debian flavorizer" that makes installing a lightweight Debian-based system easy. Read about it. Try it. Then let me know what you think so I can make it better.

If SkinnyDebbie doesn't float your boat and you don't mind getting down and dirty with the installation, follow these instructions (including the Even Lighter Debian step) to give yourself a light and fast Debian system that also introduces you to the joys of Linux administration. It's actually kind of fun in a perverse sort of way. Regular Debian-Xfce and Xubuntu will run in less than 192MB of RAM, but I won't say the experience will be a good one. In fact, this whole skinny penguin adventure got started because I was frustrated with Xubuntu 6.10's performance on a 192MB laptop I own and really annoyed by its performance on a 128 MB desktop.

Another option you may consider is Absolute Linux. Absolute Linux is a Slackware-based distribution that uses IceWM as it's window manager and includes many custom utilities to make configuring things easy. It comes with a wide range of applications, and more are available on an additional CD. It's more complete than most other "light and lean" systems I've looked into, and it works. (Or at least it used to work. I've had the version 12.1.0 beta8 of Absolute fail to properly launch a X server session on at least one machine. I hope they fix this.)

The biggest downside to Absolute Linux is that since it is Slackware-based, installing programs that are not part of the original distribution will be harder than would be the case for SkinnyDebbie, Debian-Xfce or Xubuntu. This is because the standard Slackware package manager (the thing that handles the installing of new software) does not do dependency checking--as do most other Linux package management systems. Possible solutions to this include slapt-get and/or swaret--tools for Slackware that manage dependencies and that you might be able to install under Absolute. Also, Slackware repositories aren't as rich as Debian's and Ubuntu's. However, for most users, (e.g., your grandmother) the applications that come with Absolute Linux will be all that's needed, so this won't be a huge deal.

You have less than 64 MB of RAM
Recommendations:
  • Damn Small Linux
  • Puppy Linux
If you have a really old computer or one that is seriously RAM challenged, Damn Small Linux is a good alternative. DSL is cute and functional. It has a limited (but still very useful) complement of programs. Changing things like screen refresh rates will drive you mad, but that's probably the least of your worries if you are running with less than 64 MB of RAM.

Others have recommended Puppy Linux as well, but I have not tried it so I am unable to comment.

A Lighter Debian

Note: This content is almost certainly obsolete. It's left here mainly for reference purposes.

If you are looking for a useful and standard lighter-than-most Linux distribution, Debian's Etch using the Xfce desktop environment is a pretty good choice. Xfce's window and desktop manager and its associated Thunar file manager are somewhat easier on system resources than the much more common Gnome and KDE desktop environments but retain much of the usability and features. The Debian-Xfce distribution also ships with a good range of software. I installed Debian-Xfce Etch on an old 192 MB, Celeron 500 MHz la
Publish Post
ptop. With 192 MB the results are not snappy, but the system is certainly usable.

Debian-Xfce is very similar to Canonical's Xubuntu (which is itself based on Debian). However, while Xubuntu is more feature-filled than Debian's distibution, Debian's is more standard than Xubuntu (e.g., Xubuntu doesn't use a root user), and that's why I prefer it as a starting point for exploring a lighter-and-leaner Linux. If you have 256 MB or more of RAM, you probably won't have speed issues with Xfce, so I would recommend you first try Xubuntu without making any changes as it is a friendlier experience than Debian-Xfce. If Xubuntu doesn't work for you, then come back here. Or you may also consider Fedora Live Xfce Spin, with which I have no experience.

Some argue that Debian's biggest strength is also its weakness: major updates are well-tested but conservative and infrequent. What this means is that if you want the latest versions of Linux software titles, Debian's recommended "stable" releases may not make you the happiest camper. However, if you really insist on having the latest stuff, you can still have it with Debian by using their "testing" and "unstable" releases. But I will let you explore this on your own.

Debian-Xfce is a very usable distribution out-of-the-box, but it can benefit from a few tweaks to make it more usable and a bit faster. The most important tweaks are outlined below. In what follows, I am assuming you know what a terminal window is, what the difference between root and standard users is, and what sudo is. If you don't, do some priming and then come back here. Lines below begining with $ indicate a terminal window prompt.

Let's begin.

Install Debian-Xfce from CD
Download the "stable" realese of the single-CD Debian-Xfce installer (e.g., debian-40r3-i386-xfce-CD-1.iso) using http/ftp, bittorrent, or jigdo. Be sure you download the single-CD Debian-Xfce installer and not a multi-CD or DVD full version of Debian. Burn a copy, boot from the CD, and follow the instructions to do the install.

Add yourself as a superuser (sudo)
Login using the normal (not root) account that you created during the installation. Open a terminal by right-clicking on the desktop and selecting Terminal. Convert this regular terminal to a root terminal with the command

$ su -l


You will be prompted to enter the password for the root account that you specified when you installed the system. Enter it, and at the following prompt type the following command:

$ visudo /etc/sudoers


This will open a text editor as root. To the end of the file add the line:

user ALL=(ALL) ALL

where user is your username.

Save the file and exit the text editor. Type exit into the root terminal to exit from root (su) mode and the type exit again close the terminal. From now on, never open a terminal as root unless you have really good reason for doing so.

Edit apt's sources.list file
Open a regular terminal by right-clicking on the desktop and selecting Terminal. (Henceforth we will only be using regular terminals. In case you missed the warning above, never use a root terminal unless you have really good reason for doing so.) Now type the following command:

$ sudo mousepad /etc/apt/sources.list

You will be prompted for your password. Enter it (i.e., your password, not the root account's) and proceed.

In the sources.list file that opens, comment out all the deb cdrom: ... lines unless you want to have to insert the CD-ROM whenever you install software. To comment out a line, add a # character at the start of the line.

Add contrib and non-free to the existing entries (after main) to gain access to a much wider range of software.

Save the file and exit.

Update and upgrade
$ sudo aptitude update
$ sudo aptitude upgrade


Install Synaptic

Synaptic is a nice GUI-based software installer. It's basically a GUI version of aptitude, if you know what aptitude is.
$ sudo aptitude install synaptic

Install some fonts
This is especially useful for web browsing.

$ sudo aptitude install msttcorefonts

Add the Tango desktop theme

This is optional, but I like the Tango icons much more than the default Xfce ones.

$ sudo aptitude install tango-icon-theme


then right-click on the desktop and go to Settings -> Settings Manager -> User Interface. Select the Icon Theme tab and select Tango.

Update menus
$ sudo update-menus
$ update-menus


Tweak Xfce to make it a bit faster

Open the Xfce Settings Manager by right-clicking on the desktop and navigate to Settings -> Setting Manager. Then click on Window Manager in the window that appears. Select the "Advanced" tab and uncheck both "Display content of windows when resizing" and "Display content of windows when moving."

You may also see some benefit by opening the Desktop panel from the Xfce Settings Manager and telling it not to use a background image and to use a solid color for the background.

Fix Iceweasel's DPI handling
Iceweasel is Debian's totally libre version of Mozilla Firefox. Both Firefox and Iceweasel have default DPI handling that might leave onscreen type looking too large or too small. Luckily it's pretty easy to fix. Launch Iceweasel by right-clicking on the desktop and selecting Web Browser. If you don't like the way web pages render, open about:config in Iceweasel and change the layout.css.dpi entry from -1 to 0. If you try it and don't like it, you can always change it back.

And while you're at it, change the browser.urlbar.clickSelectsAll entry to true.

Set the Xserver screen DPI if needed
Sometimes Linux's video server gets screen DPI settings wrong. If the type you see on the screen is consistently too small or too large, you can override the DPI setting used by
creating a file called .Xresources in your home directory and adding the following line to it:

Xft.dpi: 96

Note that the name of the file begins with a period. This makes it a hidden file in Linux. To see hidden files, you must tell your file manager to show hidden files (View -> Show Hidden Files or Ctrl-H in Xfce's file manager). If you are using the command line, issue the ls -a command.

The number
96 above is a DPI setting that is as close to a standard as anything. Feel free to adjust that number up or down as needed to get text to display properly. Other common values are 75, 85, 100, and 120.

Use a lighter terminal
The default Xfce terminal is feature-filled but pretty heavy. uxterm and rxvt-unicode are lighter alternatives. If you want to use rxvt-unicode (I like it), you will need to install it; uxterm should be installed already. To install rxvt-unicode,

$ sudo aptitude install rxvt-unicode


Now set the default terminal program,

$ sudo update-alternatives --config x-terminal-emulator


and select urxvt if you want to use rxvt-unicode or select uxterm to use uxterm.

Update menus (again)
$ sudo update-menus
$ update-menus


Add Gnome system tools (maybe)

Caveat: I'm not sure that this is the best idea because it really digs deep into your system, and since you are not running Gnome it may not do it in the cleanest way. Unless you have special needs--like wireless networking--you may want to skip this step.

Gnome system tools put nice GUI wrappers around administrative tasks that normally drive newbie Linux users nuts. They tend to be resource hungry, but since you will only run them occasionally, the hassle of waiting for them to start will probably be a much less terrible torture than trying to do these tasks via the command-line. If I find a better (i.e., non-Gnome) way to add similar functionality, I'll let you know. But for now your Linux life will be less sucky if you:

$ sudo aptitude install gnome-system-tools


The above adds some stuff that we really don't want, so now we need to uninstall a few things:

$ sudo aptitude remove nautilus
$ sudo aptitude remove gnome-control-center
$ sudo aptitude remove gnome-media


Update menus (yet again)

$ sudo update-menus
$ update-menus


Silence the beep

The GDM login screen beeps when it's ready for you. The terminal beeps when you backspace too far. Both of these behaviors use the PC's built-in speaker and are really annoying. One solution is to turn off the PC speaker completely so nothing can beep at you. This won't disable regular sound on your system; it will only disable the miserable beeper speaker inside your box. To do this:

$ sudo mousepad /etc/modprobe.d/blacklist

Add this line to the end of the file:

blacklist pcspkr


When you restart, you should now have a beep-free login screen. If you ever want the beep back, just remove the blacklist pcspkr line and restart.

Final comments
Please note that there is a goofy behavior in the Debian/Xcfe setup: the desktop Trash icon does not update when you throw something away. You didn't break it; it was broken from the start.

If after doing the above, your system is still not fast enough for you, consider making it even lighter by using an even less resource hungry window manager and file manager than the Xfce and Thunar pair. One way to do this is described in An Even Lighter Debian.