Hot on HuffPost Tech:

See More Stories
Free Switched iPhone app - try it now!
AOL Tech

Flipping the Linux switch: Disturbingly easy installs, now with sound and action

w32codecs ftw!Last week, we walked through installing Ubuntu Linux.
It's not a particularly hard process, and Ubuntu is great because it clearly illustrates the basic steps every Linux distribution goes through when it installs on a hard drive. Even if you don't use Ubuntu or a derivative, just looking at the installer screenies gives a nice story arc to a generic Linux install.

New users often find the first time they log in to their shiny new Linux desktop that not only are many things they need installed and ready, but a few things they really want aren't. They'll have a browser, but the Flash plug-in won't be activated. They'll have a media player, but it won't play .mp3 or .wma files. It won't play DVDs. What's up with that?

The main reason this happens is due to licensing, copyright and distribution issues. It will vary from distribution to distribution a little bit (Puppy Linux usually includes Flash with its browser, and Xandros usually peppers in a few media codecs), but for the most part, the free (as in speech) aspect of the software is kept separate from the proprietary. Legality is the major player, but there are quite a few open source folks out there who like to keep their machine free of the proprietary stuff on principle.

That's totally fine, we say. To each his own. But we have this movie we want to watch right here, right now.
Hold up. Let's say a few things about the following bit of exposition. It is based on Ubuntu (mainly because it's what's currently on the menu here), so repositories will be different and package names may vary slightly if you're using another distro. The general concepts, however, can be applied across distributions, and we're going to try to include alternate information (as much as we can) about other distros.

First things first, we log into our new desktop. As we explore, and our eyes travel around the screen, we discover a funny little icon in the task bar. The icon varies depending on distribution and desktop environment, but if we hover on it the tool tip will tell us we have system updates.

In our case, the icon is a little box with the alarmingly red triangle. In most distributions, clicking on the icon will launch the installer application. Though it is possible to install all your extra applications at the same time you update everything, we find it's a lot more likely for something to get borked in the process. So we're just going to install our updates.

It's a good opportunity to take this time to get out, exercise, and get some fresh air. Or just take a nap. It usually takes a bit to do the updates, anyway. You can use the computer while it is updating if you want. We just really like naps.

When the updates are done, we start with the fun stuff. We usually start with Flash, because honestly (no, really!) it's quick and easy. There are several ways to install Flash. We could fire up Firefox, and install it from the "Missing Plug-ins" bar. Truth be told, this causes us problems about half the time. We could go to Adobe's site and try a manual install from there. They offer non-platform-specific binary installs and .rpm installs, but we've also found that this is more work than we'd like.

We have the most luck (with any distribution) searching the repositories for a package named flashplugin-nonfree. It's quick, it's easy, and because it's packaged for our distribution, if anything gets mucked up or upgraded, the installers going to know about it and fix us up.

Puzzling to many is the fact that .mp3 support is not always available right out of the box with Linux. Depending on your distribution and chosen media player, this could be a big annoyance or a minor hiccup. Today we're using Kubuntu, which uses Amarok as the primary audio player.

Amarok alerts us when we start that it can not, as yet, play .mp3s, and asks if we'd like to enable this ability. We click, it fires up the installer, and here we go.

If you don't use Kubuntu, or Amarok, and don't get such a prompt, fear not. There are a number of packages you can install to get .mp3 playback (and a few other goodies) working, much like Kubuntu and Amarok do. Installing LAME and ffmpeg is where we usually start. Depending on our desktop environment, we might install gstreamer and the associated plug-ins. This usually will pull in packages such as mpeg2dec, imlib, faad2, faac and libdvdread as dependencies, and we should be good to go.

Now that we've got our music in action, let's move on to the last bits: DVD playback and codecs.

There are a few ways to give our Linux install the ability to play DVDs. We covered one such way back in February. It works, but there's an easier way that lets us kill several innocent birds with one huge stone, at least in Ubuntu.

Enter the Medibuntu repositories. The Ubuntu wiki has a perfectly good (and quite detailed) how to on installing the repositories and appropriate packages. Without too much repetition, the procedure is this:

Add the repositories to your sources.list file. You don't have to do it via command line. You could do it through Synaptic, or Adept, or by editing the file by hand. This is pretty quick and easy though.

Next you'll add the GPG key. Now your installer knows this is a safe and trusted repository, and won't bite your head off every time you update.

Now the fun stuff. Let's fire up our installer, and refresh the repository list. The package we want to add is libdvdcss2. The development files are usually unnecessary for the average user.

Make your kids, husband, wife, or significant other go make some popcorn. We'll be over in a few to watch a movie with you. But before we get there, there's one more thing...

There are other media formats. What about .wma, or .wmv, for instance? No worries. You've installed Medibuntu repositories, and it's easy to get these working as well. The packages you'll want are the codec packages. They are dependent on chip architecture. If you installed an x86 version of Ubuntu, you'll want w32codecs. If you installed a different version, you'll want the codec package that corresponds to the architecture name (w64codecs, or ppc-codecs),

That's very Ubuntu specific. We know. We apologize. Fans of other distributions need not worry. If all else fails, you can get the latest libdvdcss from the developers, in both .deb and .rpm formats. You can also pick up codecs from the MPlayer site (and be sure to read the README!) Chances are very good, however, that even the most obscure, specialized distros have had someone package the codecs and put them on a trusted repository. So save yourself some time in the long run, and do a bit of preliminary searching if you can't find your packages in the usual places.

Is installing media packages in Linux a bit of a nuisance? Well, yeah, totally. We admit it. There is a time investment (though not as much as you'd think, usually). Keep in mind, though, it's not particularly a weak spot of the operating system so much as a legal snafu. And you've got to admit, it's pretty cool to watch at least the first instalment of the Matrix trilogy on a Linux box.

Tags: howtos, libdvdcss2, linux, linux-switch, media, multimedia, opensource, packages, ubuntu, w32codecs