Friday, December 02, 2005

Knoppix to the rescue

My work Optiplex GX260 finally got corrupted while I was in the process of removing old applications and crap from it; my XP upgrade is nigh and it was time to take account of all the useless stuff. While searching my email for something, the PC gave me a BSOD and this time, I was greeted with NTDETECT failed after the Dell splash screen.

Not good. The utility partition AFAIK exists for no reason except to give me serial numbers to read to someone in Bangalore; it doesn't restore NTDETECT and it doesn't restore an MBR. Way to go, Dell. Moreover, the IDE check utility option incorrectly fails to detect the HD.

Fortunately the BIOS allows me to boot CDs, and Knoppix 4.0.2 came to the rescue. It has no difficulty detecting the HD or its partitions. There's a test XP PC next to mine which was being used to evaluate our department's needs; I logged in, created a shared folder, and then...

Well, at home the networking seems more straightforward. Look for the nearest WORKGROUP or MSHOME and dive down. On campus it's a little more complex. KDE's stuff didn't seem to do a good enough job of detecting what I needed. LinNeighborhood OTOH, fed the PC's IP number, was amply capable of finding and mounting the shared folder for me.

Much as I love SLAX and other micro-distros, when you're packing Knoppix, you're pretty well covered on certain networking needs.

Make older Firefox extensions work with 1.5

A number of older FF extensions haven't been updated to work with Tuesday's release of Firefox 1.5 (aka Deer Park RC3). Unfortunately, there's nothing wrong with more than a few of them, but the MoFo Brave New World hype for 1.5 led many developers to play it safe and restrict their extensions to working inside the 1.0.* version range.

Checky, Wayback, FoxyVoice, FireSomething... none of these are dependent on the difference between the 1.0.x and 1.5 cores. How do you fix it?

The developer of Checky explained it for me, and here's the formula you need if you can't wait for your favorite developer to update the extension. As usual, you're taking your computer into your own hands, the secretary will disavow all knowledge, yada yada yada.

First, open Firefox 1.5. Open the Extensions window and visit each of the uncooperative extensions' websites (right-click each to do this). Download the extensions' .xpi files instead of installing them (right-click not left-click) and save them to the desktop. (or, alternately, download them from addons.mozilla.org)

Once they're all downloaded, uninstall the troublesome extensions from FF, and quit, leaving no windows open (like extensions, downloads, etc.). Restart FF and check the extensions to make sure they're gone, and if so, quit again. There's a chunk of file maintenance going on in the background here you don't want to skip.

.XPI files are zipfiles. Here's the process for fixing the "planned obsolescence" built into them.

Change the extension on one of the .xpi files to .zip and unzip it to a folder using your favorite utility (preferably one which retains directory structures). Inside the folder you've created, there'll be an install.rdf file. This is the culprit.

Install.rdf is the file that FF uses to deploy an extension. It tells FF what files there are and where they go, the text and icon of the blurb you see in the Extensions window, etc., etc. It also tells FF which versions of FF it's compatible with, to prevent older versions from installing incompatible extensions and to prevent future versions from installing possibly incompatible ones.

Edit install.rdf in a text editor (not a word processor or WordPad), and search for the following string: ec8030f7
<em:targetapplication>
<description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:maxversion>1.0+</em:maxversion>
<em:minversion>1.0</em:minversion>
</description>
</em:targetapplication>
The em:id refers to Firefox's own UID, {ec8030f7-c20a-464f-9b0e-13a3a9e97384}. As you can see from the maxversion value in this example, the maximum compatible version is "one point zero with at least one extra character after the zero." Regular expression nerds can guess what's coming next.

Change the "1.0+" to "1.+" and save the file. Recompress the folder back to another zipfile (with a slightly altered name) and rename the zipfile's extension to .xpi.

Don't double-click it. Open Firefox first, and then open the new .xpi file from Firefox's Open File... You'll still have to wait to verify installation, but the process is the same. Exit Firefox and restart it to see your extension back in business.

And if it crashes your browser, impregnates your girlfriend and makes your dog hate you, at least you were warned.

If you have reason to think that MoFo's going to release a wildly incompatible browser between 1.5 and 2.0, you could change "1.0+" to "1.5+" to make it expire as soon as 1.6 comes out.