Hacking Linspire

102

Author: Preston St. Pierre

Linspire 5.0 (Five-0) is a Debian GNU/Linux-based distribution with a pretty interface, proprietary video drivers and browser plug-ins, and a pricey desktop software subscription model. If you like Linspire but hate the company’s Click N Run pay-as-you-go software service, here’s how to disable and circumvent CNR and switch to using standard Debian packages and the Synaptic package manager. I’ll also show you how to set up your system for watching DVDs without Linspire’s proprietary DVD player software.

Of course, I’m not sure why you’d want to pay $50 for Linspire only to disable its crowning feature. If that’s your goal, you might be better off trying a different Debian-based distribution such as Ubuntu Linux or SimplyMEPIS, both of which cost less, are more freedom-friendly, and have more traditional APT-based graphical software management tools. What I’m going to show you in this article is how to make Linspire more like these distributions in terms of software management. Don’t attempt these procedures without having made and verified backups of your important data.

Sid + Synaptic = Debspire?

You can make Linspire Five-0 into a standard Debian Sid (unstable) system by adding your own sources to APT. By default, Linspire has two entries for the Debian Sid package repositories in its /etc/apt/sources.list, but they are commented out. Simply edit the file with a text editor and take out the # comment marks in front of the Debian Sid addresses, then save and close the file.

Run apt-get update and let Linspire update its sources. You can now add standard Debian packages from the command line using APT. If, however, you’d like to install a graphical APT front-end and package manager, type apt-get install synaptic at the command line to install Synaptic on your computer.

Linspire will usually create K menu entries for each program you install through Synaptic or apt-get, but sometimes you’ll need to restart the system for the menu to be properly updated. You’ll find Synaptic in your Utilities menu under the name Package Manager. Its operation is fairly intuitive — select or find the package you want to install, mark it, then click Apply.

DVD playback

If you aren’t interested in paying for Linspire’s “legal” DVD player, you can use libdvdcss to play DVDs through MPlayer, Xine, or Ogle. Here’s how:

Add these sources to your /etc/apt/sources.list on their own separate lines:

deb http://download.videolan.org/pub/videolan/debian sid main

deb-src http://download.videolan.org/pub/videolan/debian sid main

Then type this entry at the command line:

apt-get update && apt-get install wxvlc libdvdcss2

The packages apt-get will install will give you the ability to decode encrypted DVDs. You’ll still need a video player, though, and the KPlayer application that comes with Linspire didn’t work very well for me. I tried to get MPlayer to install, but after a half hour of searching and installing, I gave up. Ogle would read the DVD, but then errored out trying to access the sound device. The only player I got to work reasonably well with DVDs was Xine, but your experiences may be different. MPlayer is installed in Linspire by default, but only in command-line mode. You can try to run it from the command line if you wish, or try one or both of the other options:

Xine:apt-get install xine-ui
Ogle:apt-get install ogle-gui

Or, if you installed it earlier, just use Synaptic to find and install Xine and Ogle via the package names in the commands above.

If Linspire fails to add these programs to your K menu (as it did not add them to mine), you’ll have to add them yourself or run them from the command line. Although the package names are xine-ui and ogle-gui, you run them by simply typing xine or ogle into a terminal window and pressing Enter.

Goodbye autorun

Among the more annoying qualities of Linspire Five-0 is its autorun feature. Put a DVD into your DVD-ROM drive and if you don’t have Linspire’s commercial DVD player installed, a Konqueror window opens up and informs you that you’ll have to pay Linspire to play DVDs. This message comes up even after you’ve added DVD support through libdvdcss2 as described above. You’ll also notice that every time you put in a program CD, such as Unreal Tournament 2004, StarOffice 7, or Microsoft Office XP, you get a similar friendly pop-up from Linspire reminding you that you could be paying them money instead of doing things your own way. To disable them once and for all, delete the /etc/autorun/autorun.conf file. I tried to hack it to use Xine instead of Linspire’s DVD player, but every time I restarted the system it would reset to the default settings. Deleting the file makes it go away permanently, so when you insert a CD or DVD, you’ll have to manually start the program you want to use with it, even though the disc is automounted.

Disable CNR

Disabling CNR and its associated programs is simple: right-click on the green CNR icon in the lower right, then click on Configure in the pop-up dialogue. Go through each of the sections, marked by tabs on the left side, and un-check each of the checked boxes. Then click on OK. When the window closes, right-click on the CNR icon again and click on Quit in the pop-up dialogue. All Click N Run services will be disabled but not removed, so if you want to re-enable them at some point, you can.

Upgrading

There are two ways to upgrade applications: through the command line and through Synaptic. I found the Synaptic upgrade procedure (click on Mark All Upgrades, then Apply) to work quite well. You’ll definitely want the Smart Upgrade option, which attempts to conquer dependency problems in the upgrade process. This is probably how you should perform your software upgrades on Linspire if you’ve installed Synaptic.

Running apt-get upgrade from the command line was somewhat of a disaster for me during my testing period. Most packages would upgrade properly, but I had some trouble with kdelibs-data, which interfered with a Linspire-authored package called los-additional-mimetypes. My solution was to remove the latter package and then upgrade the former. The end result was a successful upgrade and a K menu that looked a little bit more like KDE than what Linspire originally provided. Afterward, I didn’t see any problems with the system despite having removed one of its packages.

In order to ensure that KDE would not interfere with my upgrade, I edited /etc/inittab and switched the default runlevel to 1, which boots Linspire into single-user mode. Upon rebooting, I performed the above procedure from the command line. It took a lot longer than I’d anticipated because the los-additional-mimetypes package had its fingers in so many related packages. There were many configuration dialogues; I chose the defaults for all of them.

In a previous installation, I tried ignoring kdelibs-data and restarted the system when it got as far as it could. What I saw after the KDM login greeter was a Linspire wallpaper screen with a terminal window in it in place of the KDE desktop. For the heck of it, I tried apt-get dist-upgrade to see if I could either fix it or break it more. To my surprise, there was no change — the process didn’t get very far before it failed on the same KDE package that the previous attempt choked on. That’s as far as I went before I proclaimed this the incorrect upgrade procedure.

Upgrading is a process that varies a lot from system to system, and it’s likely to become more of a problem as time goes on and the base Linspire system gets older and requires more updates. The tips I’ve outlined here should serve as a starting point to upgrading your software. Keep in mind that upgrades of this nature can result in an unstable or unusable operating system, so be sure to make verified backups of your important data before you try this, and be prepared to reinstall the operating system if it gets wrecked.

The upside is that after the initial upgrade wrestling matches are over, the process will probably go much more smoothly, as over time you’ll have replaced most of the initial Linspire packages with standard Debian Sid programs.