Apt Repositories

PaulStimpson's picture

Adding Apt Software Repositories to Ubuntu Hoary Hedgehog and Installing Software

A new Ubuntu user recently said:

I have also ubuntu 5.04 up and running, and would like to explore the music/MIDI side, but unsure how to add them....Indeed I'm not really using linux much, due in part to the effort it takes to get a grip on things. All I can say is it works and I can surf the web, print and do e-mails. But I'm 90% using Windows, because I understand the settings that bit more and have an active firewall (Zone Alarm) which I don't get on the basic Firefox. (this needs updating, although I understand another version is due for release quite soon. ). It lacks Java so some web-site behave oddly and I've not worked out(had the time) to fix it.

PaulStimpson offered the following advice:

Ubuntu's automatic package installation system will either take software from the CD-ROM or download it from one of a list of "software repositories" which you can modify. Ubuntu are very strict about which software packages they allow into the standard "restricted" software reposotories. Ubuntu aim to make sure that there is no non-free software in them (so the discs can be freely copied) and that all the software there is supported by Canonical Ltd (their paid support people.) They also strictly enforce Debian's (IMHO over-cautious) policy on what is considered "stable" software.

Fortunately we're not stuck with this restricted set of software. There are other repositories that contain non-free and "unstable" software. Don't be scared by the term "unstable"; It doesn't mean that the software is faulty or will destabilize your machine. It just means that Ubuntu haven't tested it and that Canonical don't support it if you have a paid support contract. Ubuntuguide.org had some instructions on how to add these extra repositories but their website seems to be down so I've pasted my /etc/apt.sources.list file at the end of this email. Make a copy of your /etc/apt/sources.list file then replace the contents of your file with the one at the end of this email. After that you will need to update your repository data to bring down the new package descriptions. You can do this by pressing "Reload" in Synaptic Package Manager or by using "apt-get update" from a root terminal. You will then find there are far more packages to choose from and some newer versions of the ones you already have. I would then recommend that you do a full upgrade by clicking "Mark All Upgrades", "Smart Upgrade" then "Apply" on Synaptic or by using "apt-get upgrade" from a root terminal.

If you choose to use a terminal rather than Synaptic the following commands may be useful:

apt-get update Load latest package data from repositories
apt-get upgrade Bring all installed packages up to the latest version.
apt-cache search [term] Show all known packages whose data contains [term]
apt-cache show [name] Show data for the package called [name]
apt-get install [name] Download and install the package called [name]
apt-get remove [name] Uninstall the package called [name]
dpkg -l | grep -i [name] Search the list of installed packages for [name]
dpkg -L [name] Show all the files contained in installed package [name]
dpkg -i [filename] Install a .deb package you downloaded or made yourself

You can search for items by using the search control in Synaptic. You will need to decide whether you want to just search the package names or whether you want to search the descriptions or other properties. A "names and descriptions" search for "midi" or an "apt-cache search midi" should give you some music stuff to start with. Try any other search terms that take your fancy and enjoy! :o)

You are correct that Firefox doesn't contain a firewall. A firewall should be a separate product so that it can protect your whole machine and not just one program. Linux has a firewall called IPTables built in. You just need to configure it. You can do it by hand or you can use a program to configure it with a setup program (like I do!) It won't be as easy as Zonealarm and you will have to tell it what to permit and what not to yourself but you will get the added benefit of knowing exactly what it is doing. A popular program to configure the firewall is firestarter; Install it with Synaptic or "apt-get install firestarter" and you'll find it in the Applications>System Tools menu.

There are two basic ways of installing software: Build the software from the source code or install a pre-made "package" somebody else has already made. There are two types of package RPM and DEB. The choice of which to use is made for you by your distribution. You will use the same system as your distro. Red Hat, Fedora, SuSE, Mandrake and their derivitives use RPM; Debian and its derivitives (including Ubuntu) use DEB. Fortunately there is a package called "alien" you can install that lets you convert packages from one type to another. I usually try to find the program I want in a repository then try finding a DEB to download. If I can't I will either convert an RPM or build the program from scratch.

You need to download Java from Java.com. You can download it as an installer or a self-extracting RPM file which you can convert to a DEB file that Ubuntu can install. alien -d [RPM_filename] will make a DEB file from an RPM.

---/etc/apt/sources.list follows--- Note: I have disabled the CD-ROM as a source as I have broadband and prefer to download. If you want to use it remove the # from the first line. Once you have made the file you can switch each one on and off or add extra ones with Synaptic in the Settings>Repositories menu.

#deb cdrom:[Ubuntu 5.04 _Hoary Hedgehog_ - Release i386 (20050407)]/ hoary main

## Uncomment the following two lines to fetch updated software from the network
deb http://us.archive.ubuntu.com/ubuntu hoary main restricted
deb-src http://us.archive.ubuntu.com/ubuntu hoary main restricted

## Uncomment the following two lines to fetch major bug fix updates produced
## after the final release of the distribution.
deb http://us.archive.ubuntu.com/ubuntu hoary-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu hoary-updates main restricted

## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://us.archive.ubuntu.com/ubuntu hoary universe
deb-src http://us.archive.ubuntu.com/ubuntu hoary universe

deb http://security.ubuntu.com/ubuntu hoary-security main restricted
deb-src http://security.ubuntu.com/ubuntu hoary-security main restricted

deb http://security.ubuntu.com/ubuntu hoary-security universe
deb-src http://security.ubuntu.com/ubuntu hoary-security universe

deb http://archive.ubuntu.com/ubuntu hoary multiverse
deb-src http://archive.ubuntu.com/ubuntu hoary multiverse

## Backports
deb http://ubuntu-backports.mirrormax.net/ hoary-backports main universe
multiverse restricted
deb http://ubuntu-backports.mirrormax.net/ hoary-extras main universe multiverse

deb http://download.skype.com/linux/repos/debian/ stable non-free
#deb http://download.kde.org/stable/3.4.1/kubuntu hoary-updates mai