Monday, 11 October 2010

Is Maverick a perfect 10?

Yesterday was the much-vaunted 10.10.10: October 10, 2010. The folks at Ubuntu went all out and released the next Ubuntu version, 10.10 "Maverick Meerkat," yesterday instead of the usual end of the month.

This may very well be the first time, since adopting Ubuntu as my primary operating system, that I will successfully resist the push to upgrade immediately, for two reasons.

First, I simply don't have the space for it. If I can back up 40 GB of data and clear it off my system, then I can consolidate my files and use an older hard drive as a scratch partition or two, for trying out various distros. Until then, I'm stuck with what I've got.

Second, until I've had a chance to test it out - by which I mean more than test-driving a live CD - I'm not swapping Lucid for Maverick. I'm having issues with Lucid, not the least of which is the quality of full-motion video. My previous distro was Jaunty, which worked just fine. However, in the meantime, something has changed - I assume the default video driver for Radeon video cards is to blame. Until I see evidence that this has improved, or I upgrade to a better PC, I'm not taking a chance on worse performance than I already have.

In the meantime, I'm reading reviews and comments in the blogosphere. Right now, they seem to range anywhere between "best Ubuntu ever" and "worst Ubuntu ever." So time will tell.

Wednesday, 1 September 2010

Why is it there are 299,792,458 media players for Linux . . .

. . . and no decent blogging clients?

For the past while, I've been using ScribeFire to post to my various blogs. It's got all the features I want, but it's a bit of a resource hog, which is a concern when your computer is seven years old. Back in my Windows days, I used to use Windows Live Writer, one of those rare good Microsoft applications. However, I didn't succeed in installing it under Wine, and I have yet to find anything even vaguely comparable (apart from the aforementioned ScribeFire).

I'd like to say I've come to the conclusion that no decent Linux blogging client exists after months of testing and deliberation. But the truth is, it came after minutes of browsing the repositories, followed by fail and complaining. Here's what I've tried:

  • gnome-blog supports only one blog at a time without reconfiguring it, and while it supports Blogger as well as WordPress and Movable Type blogs hosted on one's own site, it lacks support for WordPress.com. It also has a very limited feature set: bold, italic, Add Link, and Post Entry). By the time you read this, I'll have gone into Blogger's editor to add some extra formatting (like this bulleted list). However, it seems OK for quick and dirty posting of short notes or links, so I think I'll keep it around. (Update: Oh, and it mangles HTML too, now that I've seen the source code of this post.)
  • Drivel is a GNOME client that supports (amongst others) Blogger, LiveJournal, and Movable Type blogs. But I wouldn't know, because as soon as I attempted to log in to one, Drivel died.
  • BloGTK, on the other hand, didn't do that much. At least Drivel tried, but BloGTK never even started. After a little experimentation, it turns out that BloGTK depends on a package called python-html2, which is not supported in Lucid. Grr. Some googling brought me back to the author's Web site, where I was able to install BloGTK 2.0 from his PPA (Ubuntu's repos only offer version 1.1). So far I've tried to set up an account for my main blog, but BloGTK wants to grey out and freeze up when I try to retrieve posts from it. While that's a little better than 1.1 did, I still don't know whether to be optimistic or annoyed.

In the meantime, ScribeFire still works, albeit slowly. But I've come to the conclusion that Linux developers must not blog, otherwise someone would have tried to make life easier for himself.

Here is my wish list:

  • support for Blogger, WordPress, WordPress.com are essential; Drupal, b2evolution, and Nucleus would be nice as well
  • support for multiple blogs
  • blog post tagging/categories
  • cross-posting to multiple blogs

Any suggestions?

Saturday, 14 August 2010

Five ways to move applications between workspaces (and one that doesn’t work)

From a productivity standpoint, one of the things I love most about the Linux desktop environment is the ability to have multiple desktops that I can spread my running applications across. This function has been standard for centuries on any UNIX-like operating system running an X Window GUI. On the other hand, while it’s supported in Mac OS X via Spaces, it isn’t configured by default, and switching desktops isn’t possible at all in Windows without a third-party utility. So the standard way of working with applications in these OSes is to cram all your windows into one screen, or minimize them to the taskbar or dock. Even when I had no other choice or didn’t know any better, I’ve always found this to be a very cluttered way of organizing windows. If you tend to have a lot of things running - as I usually do - you spend a lot of time sorting through all the clutter on your screen, trying to find the window you need.1

With a virtual desktop environment, you can spread your windows out over multiple workspaces. While only one workspace at a time is usually visible, the rest are accessible with a mouse click.2 I usually have four workspaces configured, and I tend to organize applications between them according to function: usually Internet, multimedia, graphics, and word processing. I’m not too anal about this, because not everything I do falls neatly into those categories, and there are times when you need to see your Web browser alongside OpenOffice. But, generally speaking, I don’t have to think too hard about where I left a certain application running: Firefox is usually on desktop 1, the Gimp on desktop 3, and so forth. It certainly beats Alt-Tabbing through a dozen open windows until you find that letter you were writing.

If you click the Window Menu icon (the icon in the top left corner of the window) of a GNOME window, it displays the Window Menu. This menu gives various options for manipulating windows: moving, resizing, and so forth. (Ubuntu’s new default Ambiance theme has no Window Menu icon. Right-click on the titlebar to get the menu.) If you’re a past Windows user, you’re probably familiar with this. However, a GNOME Window Menu has several additional options that its Windows counterpart does not, because of the multiple workspaces. You can move a window to any specific workspace, or have it appear on all workspaces simultaneously. You can even have it stay on top, so it doesn’t disappear behind other windows when you change tasks. Because of the way I use my workspaces, the most important of these options for me is Move to Another Workspace. For example, if I am working on a letter in workspace 4 and want to listen to some music, I can start Rhythmbox, my media player, and move it directly to workspace 2 (where I prefer to keep multimedia applications).

Unfortunately, when I upgraded to Lucid, I became a little frustrated when I found out this function no longer worked! To be precise, it works just fine in GNOME, but not when running the compiz window manager. Apparently, this is a known bug in compiz. I could use another window manager such as metacity, but there’s no way I’m giving up my 3D eye candy. So I started looking for alternative ways of quickly sorting my windows. I found five.

Note: My desktop environment consists of Ubuntu 10.04 running GNOME 2.30.02 and compiz 0.8.4. Your mileage may vary.

Use the keyboard

Choose the window you want to move by clicking on it, then press <Ctrl>-<Alt>-<Shift>-<Left> or <Ctrl>-<Alt>-<Shift>-<RIght> to cycle it through adjacent workspaces consecutively.

If you don’t mind taking your hand off the mouse (and any hotkey combination with three modifier keys is definitely a two-handed operation), this is probably the quickest way to move your windows around.

Move it one workspace at a time

The Window Menu has two options that do pretty much what they say on the label: Move to Workspace Left and Move to Workspace Right. Choosing these options will move the window one workspace left or right. There’s no rule that says you can’t do this more than once, but if you have a long way to go it can get a little repetitive, and unfortunately it won’t “wrap” to the other end when you reach the extreme left or right, so there's no shortcut.

Put it everywhere first

Choose Always on Visible Workspace. Again, this menu option does exactly what it says: when you switch workspaces, the window comes with you. Then, switch to the workspace you want the window on, open the Window Menu again, and choose Only on This Workspace.

I call this the "Infinite Improbability" option, because the window passes through every point on your desktop simultaneously before reaching its final destination.3 It’s a bit of a cheat. But it takes no more work to move a long distance than a short one.

Drag it between workspaces

That compiz bug might have crippled the most useful function in GNOME's Window Menu, but compiz still has a few workarounds of its own. If you haven’t already done so, install the CompizConfig Settings Manager via your preferred method of package management (the package name is compizconfig-settings-manager). Once installed, you’ll find it under System > Preferences > CompizConfig Settings Manager.

"Edge flipping" simply means that when you drag a window to the edge of one workspace, it will "flip" into the adjacent one. Thus you can position a window anywhere using just the mouse.

To enable edge flipping, open CompizConfig, then select the Desktop Wall plugin (which you will find under “Desktop”) by clicking on its icon. Then, choose the Edge Flipping tab. Check the Edge Flip Move box and the Enable Desktop Wall box.

Now you can drag windows between workspaces. As with Move to Workspace Left/Right, however, this is most useful when you are moving short distances.

Get the big picture

There’s one method left, and it’s the most spectacular of the five. It uses another compiz plugin called Expo.

Open CompizConfig and select the Expo plugin (again, found under “Desktop”). Under the Bindings tab, take note of the hotkeys to enable Expo, or change them to something else that you prefer. On my system, I use <Super>-e (that is, hold down the Windows key and type e) on the keyboard, and <Ctrl>-Button2 on the mouse. The Behaviour and Appearance tabs contain options for Expo’s appearance. If you want, experiment with them until you see something you like. Since I run an older system, a lot of visual effects are wasted, so I’ve pared them own.

Check the Enable Expo box and close CompizConfig. Now, when you press the hotkey to toggle Expo, you see something like this:

I'm a musician. I can only count to 4.

Expo zooms out and shows you a bird’s eye view of all your workspaces at once. Better, it’s not just an abstract representation: it updates all the windows in real time so you can see what’s going on. You can’t work with them, but you can drag them around, even between workspaces. To switch back to a usuable workspace, just press your hotkey again, or double-click on some empty desktop, and Expo will zoom back to the workspace you left. You can also single-click on another desktop to make it current, and Expo will zoom back to it instead. Finally, you can double-click on an application window you want to work with, and Expo will zoom in to the workspace it is on.

Personally, I feel that using the Window Menu to select a specific workspace is the easiest and most direct way to accomplish this task. Every time I download updates to GNOME or compiz, I check to see if it’s been fixed yet. Unfortunately, it hasn’t. But happily, it’s Linux’s nature to have many ways of doing the same thing.

Footnotes

1 Underfootnote: Much like my literal desktop, for that matter.

2 Unambiguous footnote: A friend of mine thought this meant you could have two or more instances of the operating system running concurrently, and asked whether he could have Linux on one desktop and Windows on another. No. It’s one OS with much more desktop real estate than your monitor can display at once, so you choose which screenful you want to see. Though this seemed obvious to me from the start, apparently that isn't the case with everyone.

3 So Long, and Thanks for All the Footnotes: With apologies to Douglas Adams.

Monday, 2 August 2010

Add support in Ubuntu Lucid for 1680x1050 displays

I said it would be a "few days" until I posted this; four weeks later, all I'm going to say in my own defense is that I didn't say how few days.

In my previous post, I noted that I had had some initial difficulty in configuring my primary display widescreen LCD monitor. My new Lucid install started with an initial resolution of 1365x768. Since the native resolution my monitor is 1680x1050, naturally this looked both stretched and blurry.

The original solution to this problem was to edit Xorg.conf, the main configuration file for the X Window System, the software that provides the GUI for UNIX and UNIX-like operating systems. However, after Jaunty, Canonical has changed the way Ubuntu configures X: either Xorg.conf is gone, or it's been buried so deeply that even Indiana Jones couldn't dig it up. After a little googling, though, I found a workable solution, which I hope is helpful to others as well.

CAUTION: This solution requires the use of a terminal window. This might seem like a daunting proposition to someone whose computer experience is largely limited to 1995 or after. But keep in mind that prior to Windows 95, you pretty much had to work off the command line for something. Plus, for certain kinds of tasks, the command line can be faster and more powerful. It's always worth your effort to familiarize yourself with the terminal.

I use the GNOME desktop environment, so I start start a terminal window by choosing Applications > Accessories > Terminal.

To add 1680x1050 support to X

This procedure uses the Xrandr utility to add a new video mode to your system. Xrandr (which stands for "X Resize and Rotate") is a command-line utility for setting the size and orientation of an X Window output. It's capable of all sorts of interesting things, most of which I don't understand, but for our purposes here we're simply interested in its ability to create a new, usable resolution for your default monitor. (Note also that while in X, a technical distinction is made between, say, a monitor, screen, or display. I am using these terms informally and interchangeably, meaning the display hardware connected to your PC and the image shown upon it.)

  1. In the terminal window, type: xrandr

    This command will display some information about your screen configuration, such as:

    Screen 0: minimum 320 x 200, current 1024 x 768, maximum 4096 x 4096
    VGA-0 connected 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
       1360x768       59.8  
       1024x768       60.0* 
       800x600        60.3     56.2  
       848x480        60.0  
       640x480        59.9     59.9  
    DVI-0 disconnected (normal left inverted right x axis y axis)
    S-video disconnected (normal left inverted right x axis y axis)
    

    VGA-0 is the default VGA display on my PC: what this says is that this video adapter is capable of displaying images as small as 320x200 (which I don't think I used even back in 1991!) or as large as 4096x4096, it is currently (for the purposes of this demonstration) set to 1024x768, and it is capable of a number of different resolutions and aspect ratios - none of which is the one I want.

  2. We want to add a video mode to this list, so now type this at the command prompt: cvt 1680 1050

    cvt stands for Coordinated Video Timing. This command calculates a new "mode line," which is a line of code to configure X to display an image at a specific resolution. It outputs something like the following:

    # 1680x1050 59.95 Hz (CVT 1.76MA) hsync: 65.29 kHz; pclk: 146.25 MHz
    Modeline "1680x1050_60.00"  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync
    
  3. For instant gratification, we can add this new mode to the server now, by using Xrandr and the new modeline we just generated, like this:

    xrandr --newmode "1680x1050_60.00" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync

    The part in quotation marks ("1680x1050_60.00" in my case) is a name for the new mode, which we'll be using again.

  4. Now, associate this mode with the correct output device (in my case, VGA-0):

    xrandr --addmode VGA-0 1680x1050_60.00

  5. Finally, tell the server to display this new mode:

    xrandr --output VGA-0 --mode 1680x1050

    Congratulations! X can now produce output at the native resolution of your monitor. If you open the Monitor Preferences application (System > Preferences > Monitor), you should be able to find this mode in the Resolution drop-down list.

    However, this is only a temporary solution. It will disappear the next time you have to reboot. To make the change persistent, we have to add the above three Xrandr commands to the default initialization script for GDM (the GNOME Display Manager).

  6. Type the following:

    sudo gedit /etc/gdm/Init/Default

    Since this is a system file, we have to use the sudo command to edit it as a superuser, and the system will ask for your password before proceeding. If you prefer another text editor to gedit, just substitute the appropriate name, but keep the location of the Default file the same.

    In the text editor, find the two lines that read:

    PATH="/usr/bin:$PATH"
    OLD_IFS=$IFS
    

    Underneath them, add the above three Xrandr commands (your own version, of course), in the same order. Save the file and exit the editor. Now, a 1680x1050 mode is available every time you start X.

On the downside, this feels like a jury-rigged solution compared to the old way of just adding the modeline to the Xorg.conf file. X isn't permanently configured with this mode; it's just fixed every time the computer starts. It makes me wonder whether it's a contributing factor to my current inability to watch full-motion video smoothly on this system.

To give credit where due, I adapted this solution from this thread on the Ubuntu Forums. Your mileage may vary, so if you try my instructions and have no luck, some of the other posts in the thread might be helpful to you. For my part, it worked on the first try with no further problems.

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.