Saturday 26 June 2010

Lucid Lynx, two months later

Ubuntu basically has two release cycles for its desktop products: there are the regular releases, every six months in April and October, and then these include the Long Term Support (LTS) releases, which come along every two years. The regular release cycle tends to include new features and new technology, while the LTS releases tend to be more tried-and-true, and as the name suggests, are supported for three years after their release instead of the usual 18 months. Ubuntu 10.04, Lucid Lynx, is an LTS release. After the travesty that was my upgrade to Ubuntu Karmic last October, I couldn't wait for Lucid to come along.

I learned two related lessons thanks to Karmic: first, don't rely on the upgrade-in-place option to work, and (since it might not) keep your home directory on a separate partition from your root file system. After downgrading back to Jaunty from Karmic, I implemented these ideas about halfway: that is, I kept my home directory where it was, but moved my data onto a different partition. This time around, I was ready to finish the job: I copied all my data over to that other partition, then reorganized it in a /home/ransom directory hierarchy.

Then, I downloaded and burned the ISO image for Lucid. My third lesson learned was not to upgrade instantaneously. I waited two days. I guess I have a bit to learn yet. (By the time Maverick Meerkat comes out this fall, I'll also have a "scratch" partition I can use for playing with new releases without risking damage to my default setup.)

As usual, the installation from CD-ROM was simple and uneventful, and there were no issues to deal with before restarting my PC and booting into my beautiful, new, eggplant-coloured installation of Lucid. Then the hard job, customizing and configuring, began.

Viva la resolution

The first snag I hit was with my screen resolution under GNOME, my preferred desktop environment. This came as no surprise. I own an Acer 22" flat panel with a native resolution of 1680x1050. I've never seen any driver for my antique Radon 7000 AGP that supports that resolution out of the box - in any operating system, even though it is technically capable of it. Ubuntu defaults to a lower resolution and an incorrect aspect ratio, which is hard on the eyes. Previously, I've been able to fix this by adding a new video mode to Xorg.conf (the main configuration file for X Windows), but either Lucid doesn't use it anymore, or it's been buried so deep that it's impossible to find. Fortunately, after a little googling, I found a workable solution, which I'll detail in a separate post in a few days.

Bring out the Gimp!

After the base installation was complete and GNOME was a little easier on the eyes, the next step was to reinstall my applications. Thanks to Larry Bushey of Going Linux, I learned a straightforward way to migrate all my applications after a clean Ubuntu install.

  1. Before doing the install, start a terminal window and type:
    dpkg --get-selections > installed-pkgs.txt
    This will save a list if your currently installed packages to a text file named installed-pkgs.txt. Save this file somewhere safe (like a USB drive).
  2. Install the new version of Ubuntu as usual.
  3. Once the install is finished, copy installed-pkgs.txt back to the system (for example, to your home directory), start a terminal and type:
    dpkg --set-selections < installed-pkgs.txt
    This command tells the package manager to install the packages listed in that file.

You can hear Larry explain this himself, on his 12th appearance on Computer America, in Going Linux Episode #61. He also warned me via email that this process may not install everything on the list (so it is necessary to install some packages manually), and that this is more likely while downgrading than upgrading.

I opted not to do this at all, as my return to Jaunty was intended to be transitional, and the number of applications I'd actually installed between January and April was minimal. So I did the whole thing manually. First and foremost amongst my preferred applications is the Gimp. This brings me to my first pet peeve with this Ubuntu release.

Canonical, in their infinite wisdom, has decided not to include the Gimp on the Lucid CD. I question the rationale behind this. Granted, most people don't need such a powerful graphics tool when all they really want to do is get rid of redeye in their photos or post cheesy home videos to YouTube. Hence they have included F-Spot for digital photos and Pitivi for video editing. Personally, I have no use for the former and will likely never use the latter. Also granted, the Gimp is readily available from the repositories. However, this was the "killer app" that pushed me toward wanting to move to Linux in the first place - even though it wasn't too long before it was ported over to Windows anyway. Relegating the Gimp to the repos means it's no longer part of that user experience when someone boots up that live CD for the first time.

But one little pet peeve wasn't about to stop me from forging ahead. However, an issue with the Synaptic Package Manager, threatened to do that. Every time I tried to search for packages, Synaptic would commit suicide. Ugh. Fortunately, there's more than one way to download and install packages, and the new Software Center rescued the situation. (And since my next reboot, Synaptic has been perfectly stable, which made me happy, since it is my preferred package management tool. Meanwhile, the Software Center seems to have gone all flaky. Go figure.)

But apart from that, the upgrade went pretty well, and here's the happy result. new Linux, new look, new Doctor, new wallpaper:

Kicking the tires

For some reason, the decision to move the window buttons in the new default Ambiance theme to the left of the title bar instead of the right has generated a not inconsiderable controversy around the Linux blogosphere. I quite like the new theme, and haven't bothered to change back to Clearlooks, which I've been using since 2007. At work, I'm accustomed to using both Windows (buttons on the right) and OS X (buttons on the left), so I didn't see that it made any difference what side the buttons were on. I felt the whole controversy was a tempest in a teapot.

However, after the first month, I still found myself habitually aiming for right-hand buttons. So, based on a tip from the OMG! Ubuntu! blog, I installed Ubuntu Tweak and used it to move them over to the right. Now, after another month, I ironically find myself habitually searching for them on the left. I can't win. But it's still a tempest in a teapot.

More serious is my degraded video performance. With Jaunty, full-motion video (at a typical resolution of, say, 640x480) played back smoothly at any size, including fullscreen. Now, it seems that only a small display window will show full-motion video smoothly. Anything else is choppy, and anything approaching fullscreen resembles a slide show more than a movie. This is true of all video players that I have tried: Totem, VLC, MPlayer, and xine. To make matters worse, switching Totem to fullscreen mode actually scrambles the entire display - unrecoverably. It's necessary to get out of X entirely and restart it. I can find no help for this situation online, and if it's an unresolved bug, I don't know enough about the process yet to file a report. If anyone has an answer, please feel free to offer a suggestion. This is a major annoyance, as I like using my great big monitor to watch DVDs.

If I can find a fix for that one thing, though, I'll be quite happy. Lucid Lynx seems to be a good, solid release. Just for the record, I'm approaching 14 days, 6 hours of continuous uptime, which must be some kind of personal record.

My next post will detail my video resolution fix. After that, I'll stop talking upgrades (at least for the next four months!) and discuss some of the other issues I've had to resolve, as well as some of the software applications I use regularly, and why.

Monday 21 June 2010

My Karmic Upgrade Travesty

Since I first installed Ubuntu "Feisty" on this PC, I've pretty much kept the OS current thanks to the in-place upgrade option that regularly appears in the Update Manager whenever a new version of Ubuntu is released. The nice thing about a free, downloadable operating system is that there's no risk, so you have nothing to lose by keeping it up-to-date.

Or so I thought, up until 8 months ago.

Late last October, Ubuntu 9.10 "Karmic Koala" arrived. Since I'd heard good things about it, I was more eager than ever to move on from Jaunty. Little did I know at the time that I was just one click away from about two months of hardship. Some of the changes to the OS were just a little too drastic for my aging PC.

Amongst the tragedies I had to endure:

  • Most obviously, compiz-fusion desktop effects wouldn't work for me. Actually, they did work - but at the expense of being able to see my desktop wallpaper, which was hidden behind a big black rectangle. I knew it was supposed to be there, because a tiny stripe of it was actually visible behind my semi-transparent, top GNOME panel. My best guess is that my old ATI Radeon 7000 AGP video card (a component so old and obsolete that it cannot be replaced, and if it fails will force me into completely replacing this system) was no longer supported by Karmic's kernel. Consequences: In addition to losing some striking desktop eye candy, neither dock application that I had been using, awn and Docky, would work without a compositor. Solution, take 1: I tried switching to Metacity instead of compiz. While it worked, it ran so slowly by comparison that the computer was next to unusable. Solution, take 2: I turned off compositing entirely. Apparently I had to make the choice between rotating cubes and drop shadows on the one hand, and a Doctor Who-themed desktop on the other. I opted for the latter. In place of Docky or awn, I quickly mocked up a "dock" with another GNOME panel and a bunch of launchers.
  • Crashy, crashy, crashy. Karmic's default 2.6.31 kernel locked up totally about once a day - sometimes more. Consequences: Unnecessary downtime. Endless disk integrity checks. Impatience and frustration. Solution, take 1: I tried downgrading to Jaunty's kernel, which I had not uninstalled, thank goodness. It was rock solid, which meant I could do my thing without fear of losing my work unexpectedly, although it would not play any audio. Solution, take 2: I somehow hit upon the idea of upgrading to a development kernel (at the time, 2.6.32), which worked fine for me until Karmic's normal updates got to 2.6.31-17, at which point everything seemed to be back to normal.>
  • "Broken" fonts. And when I say "broken," I mean that for some reason I never ascertained, the default UI font actually rendered with bits missing, like someone had taken a hammer to a typewriter. And the longer the PC was on, the worse the problem Got. Consequences: Over time some drop-down menus became very difficult to read. Solution: I changed the display font to Liberation Sans. No big deal; on the contrary, it was a big improvement, and something I might have done anyway if I'd known.
  • My iPod Nano was no longer recognized as a media player: Karmic mounted it like it was just a USB drive. Consequences: Most media players no longer recognized that there was an iPod mounted, and consequently would not allow me to transfer files to it. Hence I lost the use of Amarok 1.4, my preferred media player. Solution: Fortunately, gPodder and gtkpod didn't seem to care. I use and love gPodder for managing podcasts, and although gtkpod is far from perfect, at least it allows me to move music on and off the iPod.

Those were the major annoyances. Apart from those, there were a number of other irritating little quirks that eventually wore me down from thinking I could just ride it out until Lucid came along, to deciding to take the drastic step of downgrading back to Jaunty.

Now I was caught with another problem: there's no way to do an in-place downgrade. It would be impossible to install an older version of Ubuntu without completely erasing my existing Linux drive partition. And since the majority of my personal data and music were sitting on that partition, this was obviously not an option. I had to rework how my data was organized.

Fortunately, GParted allows existing partitions to be resized, so all I had to do was "walk" it from one partition to another while incrementally sizing each. This was a simple enough task but I wasn't expecting it to take two days. One resize took literally 21 hours to finish, and I was a hair's breadth away from thinking something had gone wrong. Fortunately I had a little faith left that all was going as intended, as aborting the job would probably have been catastrophic.

After that, the downgrade went just fine. There were a few things I missed: the newest versions of some of my favourite applications (such as Firefox or OpenOffice) weren't in the Jaunty repositories and it took me a little while to figure out how to upgrade those. (I actually started using regular builds of the development versions of Mozilla Thunderbird and Firefox, amusingly codenamed Shredder and Namoroka, rather than stable releases. Let's just say there's a good reason you're warned not to do that on a production system, and leave it at that.)

Lessons learned

First: don't be so quick to jump on the latest upgrades. This is Linux: the computer will not blow up if you hang on to the old version a while longer until some lingering bugs are worked out on the new one. OK, I didn't really learn this lesson. I resisted the upgrade to Lucid for two whole days. But I was a little smarter about it.

Second, don't use the option to upgrade in place. I had had no problem with this previously, but it's taken just one bad experience to change my mind. In the long run, a fresh install is probably the safer option.

Third, it pays to have your home directory stored on a separate partition from the root directory. That way, you can clear your root partition without worrying about your data, and whenever you reinstall a new OS, you can simply mount the data partition as /home. Another nifty side effect is that all the configuration files for your applications are preserved, too. Supposedly if you re-create your user accounts in the same order as the originals, even permissions will be preserved, although I have not been able to experiment with this on my single-user system.

Better yet, put your root and home partitions on completely different physical drives. That way, if the drive containing the root partition ever blows up, it won't take your home directory with it.

My Jaunty downgrade was meant to be transitional, so I didn't go all the way with these changes. But when Lucid finally came out in April, I was ready for it.

Thursday 17 June 2010

How I Went Linux

Like most people of my age, I grew up with the venerable Commodore 64 video game console personal computer, which I used for writing essays, some telecommunications, and yes, occasionally playing a video game or two. But after a few years of programming Commodore BASIC on school PETs, I was also intrigued by the C64's built-in programming languages. I learned a few interesting tricks in both basic and assembly language, but not much - and what ability I had, is long gone.

I started serious computing when I reached university, and bought my first PC in 1991 - a 386/25 with a whopping 4M (yes, megabytes) of RAM and what was then a huge, 80M hard disk. (I own a 2003 vintage PalmPilot that outperforms that baby today.) I maintained this system throughout most of my university years, and in addition to the usual productivity, I bought various site licenses for the programming languages needed for my coursework (particularly Watcom FORTRAN). I also ran a FidoNet "point" system for online messaging. Due to a need to automate various tasks related to Fido, I learned enough DOS batch programming and Awk to run these tasks and generate reports.

Amongst my friends in math and computer science, I began to notice a growing trend of using Unix or Unix-like operating systems on their own PCs. While some of these may very well have been FreeBSD implementations, around 1993, boxes of diskettes containing Slackware Linux were also starting to make the rounds. About a year later, I was in my first tech position (by trade I'm a technical writer) at a Toronto-based software company. Although the shop was Unix-based, everyone had DOS/Windows PCs on their desktop, even if their primary function was to be a terminal to the Unix consoles in the lab. Soon I noticed many of the developers running Motif-like graphical user interfaces on their systems: Slackware had made it into the office. After eight months of working with Solaris and HP-UX, I was intrigued, and hoped that it wouldn't be long before this was something I could do on my own. Meanwhile, of course, I was still in the middle of an English degree and it was more important that my computer could run WordPerfect 5.1 than, say, gnuplot.

In 1995, however, I did make the switch from Dos/Windows to OS/2. I was still running the same system I had bought in 1991 (apart from adding a SoundBlaster, CD-ROM drive and a larger hard drive), and although it would have been underpowered for Windows 95, Warp actually worked really well and probably extended the system's useful life by a year.

Finally, in 1997, I switched out the motherboard for a 100MHz Pentium, then a 266Mhz AMD K6 in 2000. This time, I switched back to Microsoft (specifically, Windows 98), because I felt like spending a good portion of my superfluous free time playing games.

Around this time I also began experimenting with Linux on my own, when I was given a demo CD of the SuSE distribution. When I first installed it on my K6, I got it working with relatively little pain, considering that no distribution was exactly known for user-friendliness at that time. However, X didn't get along terribly well with my 14-inch, fixed-frequency VGA monitor, so for a few years my Linux partition was just a toy that I pulled out and tinkered with every so often.

But in 2003, when I bought my current PC, a 1.8 GHz AMD Athlon, that changed. Much to my chagrin, Windows 98 just wouldn't work well on this system: there seemed to be numerous incompatibilities with both software and hardware. My friend Iain loaned me a CD-ROM of Red Hat Linux 9. Installing Windows had been like pulling hens' teeth, but installing RH9 was as smooth as glass. For the next year and a half, that was my primary operating system. By now X was the default user interface instead of the command line, and it worked much better with my then-current hardware (my battered old VGA monitor, the only remaining original equipment from my 1991 purchase, having finally given up the ghost). Best of all, thanks to then-new productivity software such as OpenOffice.org and the GIMP, and some useful Internet tools, you could actually do something with Linux now, instead of just endlessly grinding out shell scripts.

Red Hat remained my exclusive OS until I moved. At my new address I needed wireless Internet access, which was virtually unsupported by Linux. This forced me to switch back to Windows (XP) again.

In the meantime, Iain had moved back to Ottawa, and through him I heard of a relatively new distribution called Ubuntu, which was then gaining a good reputation for user-friendliness. I was quite impressed with what I saw on the live CD, so I partitioned off some hard drive space and installed Ubuntu 7.04 "Feisty Fawn." Unfortunately, Wi-Fi support was still a bit sketchy, so other than lugging my PC upstairs once in awhile to do upgrades via an Ethernet drop, Linux was again hobby software rather than something I could use seriously. However, when Ubuntu's hardware compatibility finally coincided with my own hardware requirements, Windows XP finally took a back seat to Ubuntu 8.04 "Hardy Heron" as my primary operating system once again, though I continued to dual-boot XP from time to time. And with the recent failure of my original hard drive, this system is now, again, running Ubuntu Linux exclusively.

I'm not the rigid, doctrinaire type of free/open source advocate. I tend to be the "whatever works" kind of user. There was a time, for example, that if you wanted to do any serious music composition or desktop publishing, you were pretty much limited to a Mac- or Windows-based commercial solution (in fact, the last piece of software that I actually paid for was the home edition of the Cakewalk sequencer in 2001). There are three basic reasons I've gone fully open-source these days:

  • I'm cheap. Computers are getting more economical, but software isn't, and I don't like paying for either. My experience has been that switching to a non-Microsoft operating system can extend a PC's productive lifespan by at least a couple years. This PC is now 7 years old and it was already 6-month-old technology when I bought it. It's still running just fine, although if a few critical but obsolete components ever quit on me, I'll be forced to replace the whole system. I credit the system's longevity with switching to an operating system that runs fine on less powerful hardware than any recent version of Windows could support. And why pay hundreds of dollars for an office suite, when the folks at Sun give one away that's just as good - and works almost flawlessly with Microsoft's file formats? No one ever needs to know I don't use Word.
  • I'm a bit of a geek. Not much, but a bit. For that first job as a technical writer, I spent my first night after work reading through Unix for Dummies so I could actually do my job the next day. Having seen the software developers using Linux in lieu of Windows on their desktops, I loved the thought of getting X Windows up and running on my home PC, even if I couldn't yet do anything productive with it. I can use Windows, I can be happy using Windows, and I need to use Windows in a business environment, but on my own I just like doing something else.
  • I like to tinker. When DOS was the only game in town, configuring software often meant editing configuration files in a text editor; none of this Edit > Preferences stuff. I still frequently fire up a terminal window to do stuff, even if I don't have to.

Saturday 12 June 2010

The Perpetual Newbie

Welcome! This is a new blog to deal with my user experience - as a not-quite-novice, but not-quite-power-user, too - of the Linux operating system.

Why "The Perpetual Newbie"? Because my history of computing has led me, for the most part, to switch OSes every two years or so. This isn't because I'm fickle, but because I've changed needs every so often: for example, wanting to extend the life of an older PC, or needing to do something my current OS couldn't handle.

The result has been that I'm always starting from scratch, and I'm never up to date on the latest techniques, tools, and technologies. So I always feel like I'm behind the curve when it comes to learning this stuff.

By nature I'm a problem solver, and part of my motivation stems from the frustration of trying to solve certain problems, where I can't easily find help. Thus one purpose of the Perpetual Newbie will be to chronicle, as best I can, my experiences with certain problems and the path I took to a solution. Hopefully if I find my help buried in a forum somewhere, it will make someone else's life easier to find it here. Some problems have been simply insurmountable for me, and so comments will be open to allow others to share suggestions.

By trade I am a technical writer; it does no one any good to whine about what can't be done. Why not assure people that something can be done, and then explain, as clearly as I can, how?

My posting schedule will hopefully be about one post per week. I've got a backlog of possible topics that seems to pile up faster than that, so there should be no trouble finding something to say! I'll get into my computing history a little next time, before delving into some of my current adventures.