Tuesday, April 18, 2006

It's Alive: Turning a rev.a 1998 iMac into a Kubuntu box

The situation: Single mom in her early 30s has a hand-me-down first-generation G3 iMac with OS X 10.1 and IE 5.2 still on it. No suitable FOSS that's compatible with 10.1.

Bad news: Oldest iMac ever (tray-loading, IR port on front, no DVD, CD-ROM only). OS X refuses to recognize a partition larger than 8Gb. Internal clock battery died years ago. The infamous round single-button mouse.

Good news: previous owner pimped drive up to 16Gb, RAM to to 512Mb and original 233MHz G3 to Sonnet Harmoni 500MHz G3 upgrade which also included FireWire. The original Apple iMac service manual is available online. Prognosis: an acceptable candidate for desktop Linux.

After backing up all the original data (which consisted of OS X, a slew of ancient Classic Adobe applications and a dog's breakfast of MP3s), it was time to figure out if the box could actually run a modern Linux distro for PPC.

PowerPC leaves you with few choices for distros, and they all divide between Debian and RedHat variants. The latter are provided by Yellow Dog Linux, and my feeling is that spending money on a port of a free x86 distro rather than RHEL is money not well spent.

The "customer" doesn't know OS X deeply and doesn't need to. The behavior she expects is that when she turns it on, the machine boots and logs in for her, no password needed. For this reason, I chose Kubuntu. Ubuntu because of its OS X-like single-user mode, and Kubuntu because KDE's behavior is a smaller learning curve for someone coming to Linux from Win/OS X. In a moment of stupidity I chose Dapper Flight 6, but later reinstalled Breezy 5.10.

Ironically, the Ubuntu PPC installers are peaches and cream compared to their liveCD counterparts which have issues with recognizing some less popular hardware. OS X's 8Gb maximum partition nonsense is a limitation of 10.1 on these iMacs, not Open Firmware, so it was a joy to let the partitioner blow away the entire HD and redo it as one large ext3 partition and a few tiny swaps. Breezy went from booting the CD to first GUI desktop login in less than 60 minutes. Realistically the only shorter install time I've had is from the install DVD and it isn't dramatically so.

Now, the real work. Since the user is not a computer expert and has no reason to become one, the interface needs to be finessed back to what she expected from OS X. KDE's defaults (and Kubuntu's) are well-intentioned, but not ideal for a switcher. What I won't be doing is theming the distro to an imitation of OS X. Nor will I try to move all the menus back to the top of the screen a la OS X's implementation of Fitts' Law. Gnome apps might comply with that setting, but many others don't, and this is a KDE installation. The other KDEisms need tweaking, though.

UI behavior. By default, Kubuntu uses single-click to open icons (as does Knoppix), and its UI leaves scrollbars with both arrows at one end (which is configurable in OS X but not usually default). These are reset.

As an experiment, I replaced KDE's use of DejaVu Sans everywhere with a generic TrueType version of Lucida Grande (OS X's system font), only to discover it looked too tiny and the letterspacing was too wide. Moreover, DejaVu Sans is the master Unicode font for Kubuntu the way Arial Unicode MS and the "real" Lucida Grande are for Win/OS X respectively. Back to DVS.

Single user mode. Into User settings, the single user was set to the default login, "no login" mode. I hear you pulling your hair out there; you can stop now. In order to change any setting or install any software, she will have to first enter her password into a dialog (a la OS X), which the other members of her household will never see. sudo without the CLI.

Real world interoperability. This reminded me; a basic desktop user really can't thumb their noses at the base Microsoft fonts if they expect to share office documents. On x86 platforms, this is usually a matter of installing the msttcorefonts package from your choice of apt manager. Enter adept, Kubuntu's alternative to synaptic. As it so happens, OpenOffice.org is smart enough to detect that you've installed the MS core fonts and quietly resets its default fonts to Times and Arial.

Media players need to be configured to permit browsers to handle embedded movies. mplayer is my weapon of choice here, and fortunately Breezy makes its installation less painful than Dapper's. A blog entry explains that an "ugly" gstream library makes it possible for rhythmbox to play MP3s and it's installed without incident.

Core apps. Regionalization was fine tuned, time servers pointed at, a network printer created and tested, and now it's time for the apps Kubuntu forgot to install: GnuCash, Gimp, Inkscape, Firefox, vlc. The Ubuntu team ships OOo with ambiguous, indistinct application icons for reasons I don't understand but assume are similar to Firefox being installed with the generic Deer Park logo. Those of you who point out that Kub has bitmap versions of the correct logos are advised to consider what happens when you put apps with those bitmaps on the Kicker and mouse over them: a grainy lo-res version appears in the tooltip. Bad marketing, no finesse.

We can fix that by getting SVG versions of those application logos. Doug Schepers redrafted the classic Jon Hicks Firefox logo in Illustrator and exported it to SVG. Downloaded and sudo mv'ed to a new /usr/share/icons/ directory, we can choose it as the K menu icon and then drop it into the Kicker. OpenOffice was a more troublesome beast: finding SVG versions of the apps logos eventually yielded a single SVG with all application icons in one document. If it weren't late at night I'd probably have found them in separate documents somewhere, but I couldn't, so I used Inkscape to split them into individual compressed SVGs and moved them to the same custom /usr/share/icons/ directory.

vlc is a more problematic beast, which surprised me considering the number of x86isms that mplayer requires and vlc doesn't, but it should be done soon. Flash is a problem because Macrodobe isn't shipping a PPC plugin for Linux yet and may never do so at this rate. Development of OSS SWF players has stagnated.

Summary: if you want to switch a user, make them comfortable first and preach FOSS later. This means the following:
  • Crap-ugly Bitstream serif fonts are a non-starter. Get fonts they're familiar with, because they'll be working with them sooner or later.
  • A basement-dweller's conception of what makes a better default UI is alienating. Single-clicks to select, double-clicks to open. If I wanted to sell GNOME, I'd install Ubuntu not Kubuntu.
  • Installers don't get everything right. Clean up font smoothing, check localization, make icons familiar. Set energy saver modes and put in a basic screen saver.
  • Install media players and hook them up to the browsers.
  • Pretest their hardware. Put in the most obscure music CD you can find and see if it plays and if the OS can guess what the title is. Repeat with DVD. Burn a data CD with K3B, then an audio CD. Check onboard microphones, IR, wireless, Bluetooth, etc.

Wednesday, April 12, 2006

A couple good things to say about Ubuntu as well.

As Debian distros go, it's the easiest and fastest to install from an installer CD. Least number of irritating questions about hardware, and I was able to go from boot to go in 60 minutes.

edit: The installer seems smarter in some cases than the liveCD when it comes to detecting hardware. Older iMacs have a few distinctly different hardware configurations/chipsets than later G4/G5s, but they're IMO the most likely PPC candidates for Ubuntu and detection of their hardware should be a higher priority than comments to the effect of "well, they'll all be dead in a few months anyway, why bother."

In particular, booting an Ubuntu liveCD on an older iMac means having to CTRL-ALT-F1 to stop the X server, edit xorg.conf to change the horiz/vert sync settings, and manually restart the display manager.

Once you're there, if your network card wasn't detected properly, you have no eth0 at all. You'll have to drop down into the kernel's /modules/devices/net directory, guess which .ko to insmod, and then dhclient to rebuild the network devices before you can so much as ping your router.

Insofar as a liveCD is supposed to A) impress people with your platform and B) predict whether a given computer can run that distro, this is short-sighted to say the least.

Monday, April 10, 2006

Cringely Pinches His Loaf

Columnists and pundits in the computer industry are somewhere near snot in the great scheme of things. You know it serves a purpose but you have a hard time explaining what it is, even to yourself.

Columnists divide among predictable lines.

The Lickspittle. Paul Thurrott, railing against IE7 one minute as if he were web standards' Joan of Arc -- but as soon as he gets an exclusive on the Beta 2 preview, conveniently forgetting every critique.

The "Consultant." Rob Enderle, making predictions which have no foundation in reality or precedent, but whose outcomes invariably favor his clients and his own stock portfolio, if the two can be considered separate entities.

These two are maddening because reading their idiocy, you get the impression they genuinely believe what they write, despite the absence of facts or a frightening inconstency with what was said just a week before.

And then there's The Dvorak School of faux rockstar gonzo journalism. Bloviate as outrageously as possible as often as possible and your editors will be too afraid to fire you for incompetence. Politics without the risk of accountability. Unfortunately guys like Dvorak don't have the balls to eat a shotgun like Hunter Thompson did when he realized he peaked years ago.

Cringely started out reasonably scholarly, but realized that these days farting gets attention. This week's elevator SBD is no exception. Boot Camp works, nothing useful to write about it because it works, just a plethora of assholes posting photos of XP and Vista running on iMacs. Think think think Cringely, the PT Cruiser isn't paying or itself.

Wait! Got it. Predict that Apple will turn around and sell OS X for whiteboxes. Never mind the fact that we all know Microsoft and Linux have had to spend decades working against guessing what the hardware can and can't do. Forget everything we understand about Apple's only economic model, the one they founded the company on and the one which has sustained the company through three turbulent leaderships and two platform changes.

Here's what Robert X. Cringely knows, but also knows he can't sell columns telling you:
  1. Apple makes its profits selling hardware bundled with software. The clones were killed when it became clear the cloners were directly competing with Apple's desktop market instead of filling the server market they were chartered to make affordable.
  2. Apple sells only enough software to demonstrate proof of concept (barring niche video apps) and allows third party vendors to build their empires writing the killer apps. The number of third-party software packages Apple's poached over the years is miniscule compared to Microsoft's seemingly insatiable need to fill and dominate every Windows market.
  3. Apple avoids any distribution channels which don't show instantaneous and accurate sales figures. iMacs left Sears, iPods left HP, and Apple would rather pay the most outrageous storefront leases than trust another company to sell their products again.
  4. Apple's hardware partnerships are complex and many-reasoned, but largely depend on what it does for Apple's margins. IBM might have been able to deliver a laptop G5 by 2007, but they could never fab entire laptops for what Intel was offering. And Lenovo was the writing on the wall for IBM's future as a hardware company.

The above can be summarized as follows:
  • Entrenchment is more important than short-term growth.
  • Depend totally on no one else's frameworks, technological or economic.
  • Let your product differentiate itself and others will evangelize it for you.
  • Smile a lot.

Dear "Bob," let's cut to the chase. The Internet is a completely valid medium for doing what you're doing right now. The part you're missing is that usually, a webcam and a credit card are involved, and you're expected to lick the jizz off your fingers afterward.

Sunday, April 09, 2006

Love Letter to Dapper Flight 6 team

Preface: this distro is supposed to be finalized in less than sixty days. Were this further in the future, my comments would be less barbed.
  1. A liveCD which can't manage to load the most common wireless chipset on the PPC platform (Broadcom aka Airport) is a lousy demonstration of "it just works."
  2. While the default behavior of the trackpad being a click device in Flight 5 was difficult for some iBook users, at least the tracking was comparable to OS X/Windows. Flight 6's tracking on PPC is ridiculously slow and inexplicable compared to the x86 Flight 6 Ubuntu release. Knock it off.
  3. Kubuntu's default text rendering is the blockiest possible for LCD displays; replace it with regular aliased bitmaps or get a clue.
  4. The Kubuntu wireless configurator fails on both platforms (x86/Intel Pro chipsets, iBook/Broadcom); it momentarily enables eth1 and then disables it immediately afterward.
  5. If you can't get Espresso out of the gate for Kubuntu, put a more informative message at startup that this isn't even fractionally functional compared to the same app in the Ubuntu release, not a copy of the same message (FYI the Ubuntu Espresso is fully functional on x86).
The above can be summed up thusly:
  • The most common hardware for a platform should be anticipated and implemented first, not promised later.
  • A distro release's interface using the same libraries should behave the same on two different platforms.
  • Linus was right about Gnome. Implementing Kubuntu in a half-assed way years after Slax, Knoppix and others finessed KDE live distros says more about Ubuntu's politics/technical skills than KDE's relative merits as a windowing environment.

Either buy into the idea of "the customer's always right" re: platforms and windowing managers or stop paying lip service to the idea of Ubuntu as something other than an x86/Gnome distro.