/home/avaidya

Nov 22, 2012

Adding PPA's to Raspbian

So, I’ve gotten interested in my Raspberry Pi again, and I’ve been wondering how to install my favorite theme Salience through its development PPA.

Raspbian

My current Raspberry Pi setup is a mostly up-to-date version of Raspbian, a slightly modified version of Debian Wheezy. Since Ubuntu is also directly based off of Debian, we can take advantage of this to be able to use our PPA. The Ubuntu version that is based off of Wheezy is 12.04 Precise Pangolin, and that happens to also be an LTS (long term support) release, which means that we’ll be able to use this for five-ish more years.

/etc/apt/sources.list

The first step is to edit the /etc/apt/sources.list file, which contains all of the locations of the package sources for the Raspberry Pi. We need to first see what the URL for the package list is, so we’ll head on over to the PPA’s web page. In this case, it’s https://launchpad.net/~salience-team/+archive/salience-devel-ppa.

We need to get the source entries to put in sources.list, so we’ll head over to the PPA page and scroll down to where it says “Adding this PPA to your system”. Click the dropdown menu that says “Technical details about this PPA” to get all of the information we need. It’ll have the source entries and the GPG key. Then, select “Precise (12.04)” from the dropdown menu.

Now we need to copy the part that says:

deb http://ppa.launchpad.net/salience-team/salience-devel-ppa/ubuntu precise main
deb-src http://ppa.launchpad.net/salience-team/salience-devel-ppa/ubuntu precise main

Back up /etc/apt/sources.list (with the date in the filename):

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak-$(date +%m-%d-%Y)

… and paste the sources into the end of /etc/apt/sources.list:

sudo nano /etc/apt/sources.list

Add a new line, then do Control+Shift+V (in GNOME Terminal and LXTerminal) to paste it.

Now, my file looks like this:

deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi

# Salience development PPA
deb http://ppa.launchpad.net/salience-team/salience-devel-ppa/ubuntu precise main 
deb-src http://ppa.launchpad.net/salience-team/salience-devel-ppa/ubuntu precise main

The # Salience development PPA line doesn’t do anything; it just tells us what these entries are for.

PPA Signature

Now that we got that nasty part out of the way, it’s pretty much a breeze from here. Now we need to import the PPA signing key. Back to the “Details” section of the PPA page, we need to copy the part under “Signing key” and copy that. So, that would be “1024R/80CDD9B7” for Salience.

Now, take everything after the slash (so 80CDD9B7 for Salience) and run it after replacing it with $SIG in this command:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $SIG

Now we just need to install Salience! :D

Installation

This part is pretty easy. First, update the package lists:

sudo apt-get update

and then install the theme itself:

sudo apt-get install salience-theme

… and we’re done! You’ve got a self-updating PPA package on your Raspberry Pi! :)

Just make sure to run

sudo apt-get upgrade

to keep it up-to-date!

References