Wednesday, February 10, 2010

Third Party Software installation on Ubuntu through PPA



For the packages supported by canonical, you can directly install them from the command line by doing this:
sudo apt-get install <package name>

But if the package is not supported by canonical (as is the case with all third party software packages), then we need to go through a few extra steps to add those packages as described below.

There are two ways, the gui way - from System->Administration->Software Sources or by editing the /etc/apt/sources.list file (in Karmic-ubuntu 9.14- they have a new command called add-apt-repository that does this from command-line. But this is not there in jaunty). Here I'm going to explain only the sources.list way as once we understand this, the gui way is fairly intuitive.

PPA: Personal Package Archive . Google to find out what this means in ubuntu. Am not going to explain it here.

The example used here is to add songbird(a very nice streaming music player) to repository:

Preparation: We need to get the ppa url for songbird. So google "ppa for songbird ubuntu". In the various search results, you need to look for something like "ppa:songbird-daily/ppa".

Now we need to tell Ubuntu's ppa.launchpad.net where to look for downloading the songbird package. We do it in this format:

deb http://ppa.launchpad.net/<the package location>/ubuntu <ubuntu edition> main

After telling where to look for, we now need to tell ppa.launchpad.net to download the source file for the respective package. So we do it this way:

deb-src http://ppa.launchpad.net/<the package location>/ubuntu <ubuntu edition> main

Lastly and most importantly, for third party softwares, we must also install the PGP key so as to be sure that the package being installed was not tampered after Ubuntu's launchpad built it. We do this by autheticating the package build via the PGP key. In most cases, this is an optional step but a good one as its important for security. We will go over this step too in installing songbird.

With the basic concepts understood, now you are all set to add songbird ppa to ubuntu jaunty (9.04):

do this at command line:
$> gksudo gedit /etc/apt/sources.list

this will open the sources.list file in gedit (you need to be logged in as root to edit this file, hence the gksudo). Now scroll to the bottom of the file and add these two lines:


deb http://ppa.launchpad.net/songbird-daily/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/songbird-daily/ppa/ubuntu jaunty main


Save the file and close it. Now we need to autheticate the package. So note the PPA key on the songbird's PPA page. When I was installing it, it was 1024R/5719E347 . Now do this at the command line:

$> sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5719E347

After this, we need to update the list of packages so that Ubuntu becomes "aware" of the new packages added to its archive. So do this at the command line:

$> sudo apt-get update

Now you can install songbird from apt-get like this (again from command line): $> sudo apt-get install songbird

No comments:

Post a Comment