Saturday, July 28, 2007

Choosing a distribution

There are so many guides and reviews out there on the net, it hardly seems necessary to write another regarding the topic of choosing a Linux distribution. Still, it can't hurt, can it? :-) I have tried a fair number of distributions, but I'm only going to write about those I have some at least some real experience with.

Ubuntu

Ubuntu is undoubtedly among the best of desktop-oriented Linux distributions today. If you have a computer with fairly common hardware inside, chances are Ubuntu will install painlessly. Ubuntu is designed to hide the interior mechanics of the operating system, and the installation CD is also a so-called Live CD, meaning you can run the OS just by inserting the CD and booting. The CD comes with all the basic software you'd want on a desktop, including OpenOffice.org, and even the command line is designed to be somewhat more user-friendly than Linux command lines traditionally are. For example, if you open a terminal window and type "inkscape" (an excellent free vector drawing program), which doesn't come with the CD, you will get a nice message telling you the command to download and install inkscape via apt-get. Furthermore, the many included administration tools, including network tools, X configuration tools, package managers, etc., means that if you're familiar with using the Windows control panel to configure your system, Ubuntu should be easy to learn how to administer. Still, as much as Ubuntu tries, it is not a Windows replacement; it is a very user-friendly operating system, but sooner or later you will run into problems which require some knowledge of Linux to fix (although the Ubuntu forums really help here). Thus, if you are new to Linux and want to give it a try, I suggest you download or buy the Ubuntu CD and at the same time get a good Linux book so you can start building your knowledge of the nuts and bolts of the OS. FYI: Dell is now selling desktops & laptops with Ubuntu Linux pre-installed. http://www.ubuntu.com

Debian

As great as Ubuntu is, much of its ease of use comes from the distribution it originated from: Debian. Perhaps Debian's greatest feature is that it is built upon an astounding package management system known as apt, which does a fantastic job of resolving dependencies (programs & libraries that other programs require to run). Debian tends to rely on the command line for configuration; this doesn't necessarily make it hard to work with Debian (in many ways, Slackware can be harder to set up), but it does mean you'll have to read a fair amount of documentation before you try to install. I would mainly give one word of warning with Debian (and similarly for Ubuntu): Never add an unofficial repository to the apt sources list; there is a perfectly good chance that you'll break your system. If you want software not in the main repository (this should be a rare occurrence), compile from source. http://www.debian.org

Slackware

Slackware can be an excellent option if you like to have control over your computer. I wouldn't recommend Slack to someone who is new to Linux; Ubuntu, for instance, does all the set-up automatically and delivers a powerful Linux desktop with a large repository of software and the ease of Debian's apt packaging system. However, if you aren't content with the "standard" setup (GNOME, the default services, sudo), Ubuntu can be a pain. I feel that this is where Slackware shines; although it comes with helpful text-based configuration tools, it is designed to be easily configurable through basic text files, and therefore gives easy access to all the customizability of Linux (GUI tools, by design, can't encapsulate every single option). It's not as strongly tied to its packaging system as, say, Debian/Ubuntu; rather, it focuses on making compiling programs as easy as possible, instead of trying to put every possible package into one large repository. All the window managers have usable configurations out-of-box, unlike other distros where care is only given to KDE or GNOME. Slackware isn't for everyone, but if you like to tinker and don't mind taking a week to set-up your operating system, you may want to give Slack a try. http://www.slackware.com

Other fine distros

There are plenty of distros which have a goal similar to that of Ubuntu: a user-friendly desktop Linux operating system. There's Mandriva Linux, SuSE Linux, and Fedora Linux, to name a few. Fedora Linux is based on the late Red Hat Linux (Red Hat is now focusing on enterprise needs rather than the desktop). I used Red Hat Linux 9 for a short while, and found it somewhat buggy. Fedora aims to include the absolute latest software, so I wouldn't expect it to give the best experience for a new Linux user. I haven't tried Mandriva or SuSE, so I won't comment beyond "try them." Gentoo Linux is a popular distribution which caters to experienced Linux users, like Debian and Slackware; however, with Gentoo, you can compile everything, which is supposed to optimize the OS and programs for your particular system. FreeBSD (and its cousins, NetBSD and OpenBSD) are also interesting distributions; they are based on a different kernel (not Linux), and aside from the debate between GPL and BSD definitions of "free," the big difference between FreeBSD and, say, Debian or Slackware for a desktop user is that it can be (much) harder to get some hardware to work with FreeBSD than Linux. This is mainly because Linux has a large desktop user base and is "cool," so there's a larger effort towards getting a wide variety of desktop-oriented hardware drivers written for Linux.

Update (7/29): I would like to add that I am not an authority on any BSD. If you want to get the facts about FreeBSD vs. Linux, go here:

http://www.over-yonder.net/~fullermd/rants/bsd4linux/bsd4linux1.php

As a desktop user, I don't necessarily value stability above all else. I personally feel that Linux, "chaotic" though its development process may be, provides a nice compromise between stability, security, "tinker"-ability, and desktop-oriented hardware support.

Slackware Linux 12 on Dell Latitude D400

I purchased this notebook used and it's great. I kept Windows on it for a few weeks and used Cygwin to run the Linux programs I needed, but couldn't wait to get back to the Linux world. Installed Ubuntu 7.04, which worked great out-of-box, but was painful when I tried using non-standard setups (like using Window Maker instead of Gnome). I just felt that Ubuntu was too controlling, so I purchased a Slackware 12 DVD. It works great, but there are a few snags that come up with this particular Dell model.

Disclaimer: I provide no warranty that this will work for you. If you use anything you read here, you do so at your own risk.

Hardware

1.4 GHz Pentium M processor
1 GB RAM
Intel 82852/855 accelerated graphics
External CD/DVD combo drive (write CDs, read DVDs)
Broadcom 5705 Ethernet
Alps Touchpad
Conexant D480 56k (winmodem)

Installation

I've read that with older versions of Slackware, the external USB combo CD/DVD drive can be a problem. However, with Slack 12 the drive was detected perfectly. Installation went well for the most part; the only issue is that LILO installation failed when I tried to install it to the root partition. Installing LILO to the MBR instead worked fine.

Booting

Booting after installation resulted in a kernel panic. I found that this could be fixed by typing "Linux root=/dev/hda1" at the LILO prompt. I think the easiest way to make this permanant is to run liloconfig once you've booted; on the "append" screen, type "root=/dev/hda1".

X

X setup went smoothly with xorgconfig using the i810 video driver and setting the video ram to 64MB; screen resolution should be set to 1024x768. I don't remember whether the "dri" module was loaded by default; if it's not, just uncomment the 'Load "dri"' line if you want hardware acceleration.

"Tap-to-click" is enabled by default and it gets really annoying (to me). I fixed this by installing the synaptics touchpad driver and using it to disable tap-to-click in xorg.conf (see the synaptics documentation). Also, since the D400 really comes with an ALPS Glidepoint touchpad, to use sidescrolling you'll need to set the pertinent options (LeftEdge, RightEdge, etc.) according to README.alps (in the synaptics package) in your xorg.conf.

Power usage

Out-of-box, CPU frequency scaling doesn't work and if you try to suspend by pressing the power button or closing the lid, the whole system locks up. Fortunately, fixing this situation is as easy as re-compiling the kernel. To make this process basically foolproof, when you `make menuconfig' you should import the default Slackware kernel config, which is in the /boot directory. Choose a "local version" under general setup so you don't confuse your kernel config with the default. Under ACPI, you should enable CONFIG_ACPI_SLEEP, CONFIG_ACPI_AC, CONFIG_ACPI_BATTERY, CONFIG_ACPI_BUTTON, CONFIG_ACPI_FAN and CONFIG_ACPI_PROCESSOR. Under CPU Frequency Scaling, enable CONFIG_CPU_FREQ, all the governors (ondemand, performance, etc.), and CONFIG_X86_SPEEDSTEP_CENTRINO. I also enabled CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI and CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE. Don't compile these as modules; compile them directly into the kernel. After you compile & install your new kernel, you can install cpufreqd, and then configure acpid to respond to button and lid events. There seems to be a bug where closing the lid causes the laptop to lock up so that you can't get out of X, or reboot, or anything else. This was discussed on the Ubuntu forums, and the fix is to add "nmi_watchdog=0" as a boot parameter in /etc/lilo.conf (don't forget to run /sbin/lilo after you edit the file).

Misc

There are automounting features in Slack 12, but I haven't taken the trouble to learn how to work with them. If you want to use more traditional methods, you need to uncomment the cdrom line in /etc/fstab so that root can `mount' the combo drive. Also, unlike some distros (eg Ubuntu) Slackware won't recognize USB memory sticks automatically; to use one, type "mkdir /mnt/usbstick" as root and add the following line to /etc/fstab:

/dev/sda1 /mnt/usbstick vfat noauto,owner,rw,user,exec,dev,umask=0 0 0

The Linuxant modem drivers were easy to install on Ubuntu; you can get 14.4k for free, and the upgrade to the 56k driver is $20 IIRC. I haven't tried installing the drivers on Slackware, although it shouldn't be too difficult. I haven't tried getting the wifi working; I would point you in the direction of ndiswrapper if you want wifi.

A final word...

I strongly suggest reading http://jpjorda.club.fr/x300.html because the X300 and D400 share quite a bit of hardware.

First Post

Well, this is my first blog post. As the title of this blog suggests, I use Linux as my primary desktop (laptop) operating system, and largely depend on "free" software (http://www.fsf.org) such as OpenOffice.org, LyX, and GNU Octave to complete my daily work. Why do I use Linux? Mostly because I find other operating systems too boring. I like to tinker, and Linux makes it easy for me to do just that. In addition, Linux tends to support a wider variety of useful desktop hardware than, say, FreeBSD, if only because more people use Linux and it has a higher coolness quotient today.

My first encounter with Linux was when I purchased a Linux book from the local Tower bookstore and tried installing the included Red Hat Linux 5.0 on an eMachines eTower 266 (which came with 32 MB of memory and a 2.1 GB hard drive - stone age technology!) The installation didn't go so well, and not having any other computers to play with, I gave up on Linux for a while.

A couple years later, I purchased a cheap used desktop (in the $50 range, IIRC) and used Debian Linux 3.1. That was fun for a while, but (perhaps due to constantly swapping the 7 Debian CDs over and over) the CD-ROM drive gave out. That computer was generally losing it anyway so I moved on to a low-end Fry's "Great Quality"-brand desktop PC (either 128 or 256 MB ram, 1.1 GHz). The computer came with "ThizLinux" pre-installed and the supplied manual (surprise, surprise) was mostly instructions on how to remove Linux and install Windows. Instead, I purchased a copy of Slackware Linux 9 and got an nVidia video card to use instead of the onboard SiS graphics (which were only partially compatible with Linux). That computer lasted me through high school, and a month or two ago I moved on to a Dell D400 notebook (which I purchased used) running Windows XP, then Ubuntu 7.04, and now Slackware 12. Getting Slack 12 up and running was a small challenge in and of itself, so I intend to write a short piece about that.

Well, that's it for now.