// Running Fat Distros on Thin Hardware // // by dual_parallel // // http://www.oldskoolphreak.com Boy, the new KDE sure looks good - Keramik theme, Crystal icons, transparency, shadows... That's all fine and good - if you're running a P4! Most of us don't have the jack (or the need) to run the hottest hardware. But we all want the latest in GNU/Linux - the latest hardware support, the latest development environments, etc. There's no better way to get everything you want on the hardware you have than by thinning down your distro. This article will go over some great ways to shave precious megabytes off of your install and your memory usage. If it happens to be too distro or application specific, too bad. Take the information and adapt it - create something new. First, let's talk hardware. If you have a 486 laying around, awesome. You can run X on a 486, but it's probably not recommended. Just ditch X, which is the best way to slim down you distro by the way. (If you're running Linux on a 486, you probably don't want X anyway.) Next, we have Pentium processors. With lots of memory, you can run X with a tiny window manager (to be discussed later). On PIIs, up to about 350 MHz, it is possible to run GNOME 1.4 or KDE 2.2, albeit very slow. After that, you don't need this article. Memory was mentioned, and here's the gist of it: Install as much as you can. Memory for older systems is dirt cheap and plentiful. Check electronic surplus stores, thrift stores, Ebay, the cushions of your couch - you can find the SIMMs you need. On to the distro. One way to slim down your distro is to not choose the latest, bloated offerings (SuSE 8.1, Red Hat 8.0, Mandrake 9.0). Beyond the fact that they're probably buggy, it's simplicity itself to upgrade the kernel/packages of previous distros. Optimizing your distro during the install is the next, and an important step. Choosing KDE or GNOME may be advisable if the apps you really want have to have the latest Qt or GTK and you don't want any dependency problems. Don't worry, you won't be using them as your your main desktop environment. Now choose custom install and hand pick every app you want/need and deselect every one you don't. Don't worry, most modern Linux distros handle dependencies pretty well. You'll probably only end up with a few packages that you didn't want. And skip the graphical login. Now you've got a working system. But man is it slow with the installed KDE or GNOME. Well now we're going to ditch it and use a smaller window manager, spefically, IceWM (the test machine for this article was a PII 266 running Red Hat 7.3). Create a user and login. Install IceWM and create an ".xinitrc" file in your home directory. Use vi and add one line to the file - "exec icewm". Next time you login/reboot IceWM should be your window manager (Infidel2 is the coolest theme, btw). You should also notice much faster boot and response times. Type "free" at a console before and after installing IceWM should you want to see numbers. Other window managers to consider are Blackbox and Fluxbox. Has anyone ever used Matchbox on a desktop? What good is a tight window manager if you have to use Netscape, Mozilla, or Konqueror. Well, you don't. Two small, fast and surprisingly well-rendering replacements are Galeon and Dillo. Galeon is included in most modern distros, so just select it during the install process. When running Galeon for the first time, it may be a good idea not to choose to use the smart toolbar/tabbed browsing features. Don't overcomplicate a good browser. The downside to Galeon is that it requires Mozilla to be installed, both using the Gecko rendering engine. This brings up Dillo. Unless you use Opera on a handheld, Dillo will probably be the smallest browser you'll ever use - the tarball is a whopping 303 KB. You can download the latest Dillo, 0.6.6, at http://dillo.cipsga.org.br/download.html Once installed, you have to copy the "dillorc" file found in the dillo directory to your new .dillo directory. A perl script, dilloconf.pl, is included at the end of this text that will copy and configure dillorc based on user input. One last part that adds security as well, is to shut down uneeded services in inetd or xinetd. And on Red Hat, you can use "chkconfig" to stop services found in rc.d. For example, to shut off sendmail, enter the command chkconfig --level 2345 sendmail off and you'll notice the absence of sendmail during boot-up. If you're using a tower, shut down apmd. No mattter what kind of box you're using, shut down wine. In addition, perform a little kernel optimization by cd'ing to /usr/src/linux-2.4.X-X and typing "make menuconfig". If you're reading this, you probably use console apps most of the time anyway. But go ahead and treat yourself to a little GUI action. You can even theme/customize your desktop, which is a lot of fun in the author's opinion, and stay fast. With a thinned-down distro you can have the best of both worlds. ************************************************************************* #!/usr/bin/perl system("/usr/bin/clear"); print "dilloconf.pl - configures dillorc\n"; print "---------------------------------\n"; # Get working directory print "From what directory did you install Dillo? (ex. /home/user): "; chomp( $home = <> ); # Check that dillo has been installed and run if ( -d "$home/.dillo" ) { print "\n>> Dillo is installed. Proceeding..."; } else { die "\n>> Check your directory input or run Dillo once before running dilloconf.\n\n"; } # Get Dillo version print "\n\nWhat version of Dillo are you using? (ex. dillo-0.6.6): "; chomp( $dil_ver = <> ); # Customize dillorc print "\nWhat size do you want the initial browser window to be? (ex. 1024x768): "; chomp( $scr_res = <> ); print "\nWhat do you want to set your home page to? (ex. www.2600.com): "; chomp( $hm_page = <> ); print "\nDo you use a proxy to connect to the Internet? (y or n): "; chomp( $ans = <> ); if ($ans =~ /y/) { print "\nWhat is the name/IP of the proxy server? (ex. 123.45.67.89:8080): "; chomp( $prox_ip = <> ); } else { $prox_ip = "#http_proxy=http://localhost:8080/" } open(INPUT, "$home/$dil_ver/dillorc") || die "\n>> Double-check your directory input then rerun dilloconf.\n\n"; open(OUTPUT, ">$home/.dillo/dillorc"); while () { s/640x550/$scr_res/; s/dillo\.sourceforge\.net/$hm_page/; s/dillo\.cipsga\.org\.br/$hm_page/; if ( $prox_ip =~ /#http_proxy=http:\/\/localhost:8080\// ) { s/#http_proxy=http:\/\/localhost:8080\//#http_proxy=http:\/\/localhost:8080\//; } else { s/#http_proxy=http:\/\/localhost:8080\//http_proxy=http:\/\/$prox_ip\//; } print OUTPUT; } close(INPUT); close(OUTPUT); print "\n>> Config complete.\n\n"; *************************************************************************