Saturday, 23 February 2008

Adding the Google Linux software repositories

Google are pretty good for Linux support, so in this tutorial we're going to add support for their Linux repository. This includes Picasa and Google Desktop. Unfortunately, neither is as good as its Windows equivalent (Google Desktop lacks gadgets, and Picasa is actually the Windows version running in , not a native application). But it's still an easy way of keeping track of new versions of these applications.

Follow this link to get to the Google Linux Software Repositories page. If you're using Ubuntu and want to add the new repositories from a graphic user interface, follow the instructions for GUI configuration (don't worry that is says Ubuntu 7.04, I've used it in Gutsy without any issues). Xubuntu should be identical, but Kubuntu will be slightly different as that uses Adept Package Manager instead.

Once the key has been downloaded, Kubuntu users should open Adept Manager as usual, then once it has started, open Adept>Manage Repositories. Then click on Authentication and the Import Key File tab, and select the key file to import it. Then go to Third-Party Software and click on the Add... button. Paste in the text provided (which is actually the URL of the repository) and click on OK. Then close it. You should be prompted to reload your repositories. Once you have done this, the new applications will be available from Adept or apt-get.

But let's use the command line instead - that gives you more of an insight into what's going on, and is desktop-agnostic, so if you can do this in Ubuntu you can do it in Kubuntu as well.

Open the command line and enter the following:
wget -q -O - | sudo apt-key add -

What this command does is that wget downloads a file from a URL you enter (so if you find a link on the Internet to download something, you can copy the link address by right-clicking and selecting Copy Link Location, then open a terminal and enter wget, then paste the URL in, it will download it for you). The command sudo apt-key add - then installs this as a key in apt-get so it can authenticate packages downloaded from the repository. You may notice that the instructions Google give are slightly different - this is because not all distributions use sudo - users of Debian, for instance, would log in as root before they did this, as this needs root access.

Then enter the following:

sudo apt-get update

That's just to update the system. Now, you need to add the repository to your list of available repositories. This is stored in a text file, so it's easy to edit. The file is under /etc/apt/sources.list, so to open it in nano, enter the following:
sudo nano /etc/apt/sources.list

Don't feel forced to use nano! Use any text editor you wish. Now, enter the following at the end of the text file, starting on a new line:
# Google software repository
deb stable non-free

These need to go on two separate lines as the text "Google software repository" is commented out so it will be ignored by the system - if the 2nd line was placed on the same line as the first, it too would be ignored. Press enter to start a new line, then save and exit.

Now you just need to enter the following:

sudo apt-get update

And you will update apt-get. Now you should be able to download and install Google Desktop and Picasa without any problem using apt-get as normal!

1 comment:

Nathan R. Hale said...

I'm pretty sure the Google Earth for Linux project is pretty nice, as well.