Tuesday, April 01, 2008

The Life of the Linux Newbie

OK: it's not a proper blog. For a start, there's no link-farming. Second, no plagiarism (bloggers often don't dig ideas like "fair use" and "attribution". For them, it's about hitrates: whatever gets clicks is good). And third, I promise to try and offer moderately readable articles.

Mostly I'll be talking about telecommunications, sometimes computing, sometimes life in general.

But first, I want to talk about my life with Linux. Since I've just set up on my own, I had to find a low-cost way of doing what I wanted to do, and that meant finding a laptop that could support Grass-GIS, my favourite mapping and geographic analysis system. Having tried to get it running on Vista and failed, and having run it on Windows but worried at low speed, I decided to give Linux another spin (my third attempt since about 2000).

I fear my lessons can't be taught. You have to feel the pain yourself. Still...

Lesson 1: Research

All smug Linux experts, please leave the room now. Yes, I know you have to find out in advance whether your laptop will run with Linux. That's easier said than done, since models turn over faster than pancakes, and different models get different monikers in different countries, and even the claim that “this laptop will run Linux” can't always be taken at face value.

So I bought an Acer Aspire 5315: cheap and low-powered, but most of what I do doesn't need muscle, and I didn't buy this little box expecting a multimedia powerhouse.

The problem is that the Acer Aspire 5315 has an Atheros chipset for which Linux doesn't really have decent driver support yet, so I have no wireless networking. And its sound system doesn't seem to like Linux, so I have a silent machine. More on this in a minute...

Lesson 2: The Distribution

It might sound easy: choose your distribution carefully. But there are still way too many distos, and Linux distribution research is difficult. You may as well say “buy a dictionary and choose the word that suits your needs”. Choosing words comes naturally if you're a native of the language you're using. Choosing a Linux distribution comes easy if you're intimate with Linux. For second-language people, in computers as in conversation, the right choice is not second nature (the fact that every Linux disto believes itself to be the best is no help at all. Could we leave the marketing-speak over in the world of commercial software, please?).

After trying and failing to make a sensible choice of distribution, I decided to waste some CDs and take a more active approach. The end result is that I'm using Freespire, but there were some burns along the way.

My favourite distribution is actually Puppy Linux (http://www.puppylinux.org). The problem is that Puppy would not find any networking of any sort – not even the wired Ethernet would come alive. I wandered around somewhat, searched for drivers, downloaded various extra packages to try and install them, and achieved nothing. Perhaps I'll give it another swing some other day, but this time around I had to give up.

Next, I investigated Knoppix. I quickly gave up on that line of investigation. The problem with Puppy, I reasoned, was that nobody had caught up with the laptop's Ethernet drivers yet, and the latest build of Puppy was only a few weeks old. As far as I could tell, all the Knoppix distributions I could locate were more than a year old (this was just before the 5.8 release was posted, as I have just discovered). I couldn't see it likely that older software would have out-of-the-box support for a newer driver, so I moved on.

Next came Ubuntu. I decided to go for an install to the hard drive, intending to use the boot loader to twin-boot the box, but I was never offered a Windows boot again. The Windows directories and partitions were still in place (as I discovered later), but the machine simply skipped through to booting Ubuntu without asking my opinion on the matter. This may not have mattered, but for one thing: Ubuntu would not boot.

Not at all.

It just hung during the boot cycle.

Overnight is long enough to wait, so when I came out in the morning to a machine that still hadn't booted, I decided that Ubuntu wasn't what I wanted. So I downloaded a Freespire Live CD ISO to test that one – and somewhere around this time, I noticed the aforementioned no-Windows issue. This, I must say, brought me out in a bit of a sweat. I didn't relish the idea of reinstalling Vista from cold, but I was worried that whatever had happened to Ubuntu might also happen to other Linuxes.

Thankfully, Freespire did boot, and it booted with Ethernet if not with wireless, so it's been Freespire that I've stayed with.

If you're just a user – and yes, I am just a user – you shouldn't have to burn midnight oil just to get to the starting gate.

Lesson 3: The Application Question

Thankfully, Freespire will run Grass-GIS (given a certain amount of bloody-mindedness. Fortunately, I found some lying around in the shed...). But getting the installation happening was

very

very

painful.

You see, Grass-GIS is not offered on Freespire's preferred software installation site, CNR.com (which, by the way, needs more consistency: what's the point of offering software for installation, only to give the user the message “not available for your distribution”?).

I started by asking myself “what's the underlying distribution beneath Freespire?” and, since the answer seemed to be Debian, I tried installing the Debian port of Grass-GIS. This went very, very badly, because Grass-GIS needs lots of supporting libraries, some of which were difficult to locate “the Debian way”, and others of which seemed to dislike the versions of themselves installed by Freespire ...

So I broke the installation and had to go back to scratch. When things were working again on a clean install, I made a list of the libraries Grass-GIS needed, installed as many as possible from CNR, got others direct from their source rather than via the Debian repositories, and ended up breaking everything again.

Oh.

Next, I picked the computer up off the road and glued it back together – OK, that's exaggeration – I re-installed Freespire again, and decided that I didn't want the Debian port after all. Would the Ubuntu port work?

Yes, it would. Not only that, but once I'd let the computer know where to download libraries from, I managed to get the libraries installed in only a couple of steps, Grass-GIS in a couple more steps, and away we went.

Other things are less forgiving – by which I mean that instead of a painful process with success at the end, some software declines to run at all under Freespire, even when the brain-dead CNR.com installer thinks (a) the software is available and (b) the installation went just wonderfully well, thank you.

Things that don't work include Google Earth (which induces a complete and catastrophic crash – all the way back to the user login); the MySQL query browser (thankfully I can run MySQL from the command line – and before you ask, I have the database sitting behind the geographic stuff), the Navicat database query application, the Seamonkey browser, and various HTML editors offered on the CNR.com Website.

So I can't really recommend Freespire on any basis other than “at least it boots”, which has to be the lamest recommendation I can imagine.

Lesson 4: Some Things Work Well

I'm glad I don't really care about sound, because I would be really upset if I had a sound-crippled laptop when sound really mattered to me. I'm a little less pleased about the wireless, but thankfully I was able to pull an Ethernet cable to the right part of the house, and with any luck it won't get rat-bitten.

But there are upsides, and the best one of all is in Grass-GIS.

Geographic information systems can be pretty demanding applications. Back in an office environment, before I struck out on my own, I was accustomed to running Grass-GIS on a very high-powered MacBook Pro carrying as much memory as you could install. I was also accustomed to Grass-GIS being so demanding that some maps might take half and hour to display on the screen (which made me handle the mouse with care: accidentally reloading a map could mean “we're staying late at the office tonight”).

Grass-GIS on Windows machines could be even worse, because it had to run under the Cygwin libraries. So you have an operating system running an emulation layer for another operating system, and on top of the emulation layer you are running Grass-GIS itself. Doing things this way requires very serious grunt.

But Grass-GIS on Linux is so fast that my first response was “what happened?” – things happened so fast. Here is a box which, compared with its predecessor, is little better than a cripple both in processing power and in memory, Moreover, it's running both the GIS system and the MySQL database feeding it, yet it cruises along.

So after the pain, there has been a payoff. All I need next is to find out why there's no sound and wireless...

No comments: