Software management on Ubuntu 12.10

© Pei Ling Hoo, 123RF.com

© Pei Ling Hoo, 123RF.com

Today'sSpecials

Ubuntu's Software Center lets you install just about anything, including free software, purchased apps, and games.

Ubuntu includes the convenient Software Center, which provides centralized software management and allows you to search for new software and install it with a mouse click. With an Ubuntu One account, you can purchase software with a credit card.

The Debian packages (that end in .deb) that Software Center offers are actually archive files containing libraries, configuration files, and executable programs. If you install the Firefox package, for example, the package manager distributes the necessary files to the correct places in the filesystem.

Often there are dependencies, however, which means that installing program A requires that you have program B. The package manager identifies the dependent packages automatically during installation and loads them on the computer. Usually, you will notice the dependencies when you try to install a single Debian package over the Internet.

The package you are looking for, such as a video codec, may be missing in the Software Center. In this case, you can find the package in external repositories created by the software's users or developers. The repositories contain not only the software but also the packages on which they depend. (How to tap into these repositories is covered in the "What are Repositories?" section.)

Package Manager in Action

Getting to repositories and installing software often is faster from the command line; the "Quick sources" section goes into greater detail. First, let's look managing packages using Ubuntu's Software Center. To access the Software Center, press the Super key [1] and entering softw.

The start page (Figure 1) features a few What's New and Best Rated applications. Clicking More on the far right gives you additional choices. If you click Turn On Recommendations at the bottom, Ubuntu suggests opening a user account at Ubuntu One. After you do so, your computer regularly sends lists of software you've installed to Canonical and the company returns a list of recommended software that might interest you. These recommendations appear on the start page and can be deactivated with View | Turn Off Recommendations in the global menu. In the meantime, you can purchase programs using your Ubuntu One account.

Figure 1: Software Center encourages you to browse.

Use the arrow icons in the upper left to return to the start window. With the release of Ubuntu 12.10, Ubuntu developers will place ads for free and commercial software from Software Center across the broad surface of the screen under the heading Our Favorites.

The left side of the Software Center screen organizes the applications by category. Clicking a some categories opens subcategories (Figure 2). All other controls are at the top of the package management window. The All Software menu lists all the software in all the available repositories.

Figure 2: Clicking a category on the left opens up other subcategories.

If you click the little white triangle next to the menu item (Figure 3), you'll find the entries Provided by Ubuntu (the most free software), Canonical Partners (free and commercial software without source code, such as Skype and Flash), and For Purchase (commercial software, including many games). In the apps repository listed under Independent, you will find programs of all stripes that aren't necessarily subject to the classic Ubuntu application development rules.

Figure 3: Clicking on the little white arrow next to "All Applications" shows you the integrated repositories.

Clicking Installed on the menu bar at the top displays only the installed applications, sorted by category. Click the little triangle to the right to view the packages from a single source. At the far right is the History menu item that tells you which software you downloaded. Check here if an upgrade suddenly isn't working. Downgrading, unfortunately, doesn't work in Software Center; you must install the Synaptic Package Manager and specify an earlier Version in the Properties.

If you already know the name of the software, search for it in the search field at the upper right. Results come from the repository that you use for All Applications. Next to the software names are the ratings in the form of stars. Once you select a package, the More Info and Install buttons appear.

The first button leads to a detailed description of the program, often showing a screenshot (Figure 4). Look under the Add-ons section to see software that could enhance the program. Here, the People also installed section displays other programs to consider. Click the Write your own review link to evaluate the software, which requires a Launchpad account [2]. Sorting reviews by language is a new option. Finally, you can click the Install button to install the program.

Figure 4: Once you choose an installable package, you'll get further information on it: ratings, screenshots, descriptive text, and more.

The search won't find all programs. Software Center hides libraries, developer files, and even programs without graphical interfaces, such as the mplayer command interface. To install these programs, choose Show technical items at the bottom of the window or enter the full name of the software in the search field (Figure 5).

Figure 5: Additional libraries, developer files, and programs are listed as technical items.

The Software Center global menu includes other interesting options. In the File menu, you can choose Reinstall Previous Purchases or Sync Between Computers to move your package selections to other computers over the Ubuntu One cloud service. Also, you can use Edit | Software Sources to add other repositories. If you don't want to display new applications automatically in the Launcher, unmark the New Applications in Launcher check box.

What Are Repositories?

Software Center provides access to thousands of packages, but the one you want might be missing or be available only in an older version. External repositories and PPAs can help.

The Medibuntu repository [3] is one of the external repositories and provides multimedia programs that are missing from Ubuntu's standard repositories. The VirtualBox project [4] also provides the proprietary version of its own software, which supports the virtual USB 2.0 ports and Remote Desktop Protocol (RDP), from its own repository.

Personal Package Archives (PPAs) are special versions of external repositories that you can only find on Ubuntu's Launchpad. When experienced Ubuntu users or developers create Debian packages from their favorite software, they frequently offer them in their personal package archive on Launchpad. Using a search function [5], you can peruse the platform for new versions of current software with great success.

Complementing Package Sources

In Software Center, you can download from external repositories using Edit | Software Sources. To use the Medibuntu project's external sources, for example, click Other Software and Add, then enter deb http://packages.medibuntu.org/ quantal free non-free. This address is not the actual one; usually, the address is the website for the external repository. Click the Add Source button to accept the repository (Figure 6).

Figure 6: Obtain additional packages from external repositories.

External repositories often protect themselves from abuse with keys, and this applies to Medibuntu sources as well. Every package has a signature verified with a key, so manipulated packages with mismatched signatures will fall by the wayside. Often, you can't access a package offering without a key, but how do get one? To import the key for the Medibuntu repository, invoke a terminal through Ctrl+Alt+T and use the following command:

$ sudo apt-get update

The command updates the list of available software for Software Center and returns an error message. Next, enter the following command:

$ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 2EBC26B60C5A2783

This downloads the appropriate key and integrates it with package management. If you can't get to the keyserver, it may be temporarily overloaded. In this case, replace keyserver.ubuntu.com in the command with another keyserver, such as subkeys.pgp.net, pgp.mit.edu, or keys.gnupg.net. After entering the sudo apt-get update command, you should be able to install the software from the source. The new repository might not show up in Software Center right away.

Key Over Terminal

Importing the key can be handled another way. Most websites show a simple line that you can copy with Ctrl+C and Ctrl+V to the terminal. The line might appear as in the following VirtualBox example:

$ wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc-O - | sudo apt-key add -

This command downloads the key from the website (using wget -q {HTTP-LINK}), sends it to the console (with -O -), and passes it to the sudo apt-key add command. Next, use sudo apt-get update to update the package list and load up the VirtualBox package.

Integrating PPAs

With about 6,000 active PPAs on Launchpad, running into brand new software versions is likely. Among them are exotic programs and (unstable) developer versions of system components such as the kernel or NetworkManager. Before compiling software from the sources, first use a PPA search [5] to see whether a PPA exists for it.

The fastest way to integrate PPAs into the package manager is through the command interface because it saves you the key search. Press Ctrl+Alt+T to open the terminal and enter what usually amounts to three command lines, something like the following:

$ sudo add-apt-repository ppa:lookit/daily
$ sudo apt-get update
$ sudo apt-get install lookit

These commands mount the PPA for the Lookit screenshot solution. For other software, simply replace the parts after ppa: and sudo apt-get install. Get the text for the part after ppa: from the website (Figure 7). For the repository to appear in Software Center might take a while.

Figure 7: In this PPA, you'll find the current packages for Quantal Quetzal to install the Lookit screenshot tool.

Removing Software

To remove software, open Software Center again, search for the name of the software, and click Remove. The configuration data is thereby unaffected. The advantage is that you don't need to reconfigure the software if you decide you need it again later. If these remnants (such as you might find in the /etc or /var directories) were to disappear, use the command line to remove the package.

Quick Sources

The Software Center is a graphical interface for apt, the Advanced Packaging Tool, which manages the list of software in the repositories in the background. As already noted, you can also run apt over the command line; many experienced Ubuntu users prefer this method because the commands work with any Ubuntu derivative.

Here are four important commands:

$ sudo apt-get update
$ sudo apt-cache search (--names-only) inkscape
$ sudo apt-get install inkscape
$ sudo apt-get remove (--purge) inkscape

The first command brings the package list up to date, an important thing considering how quickly program versions change.

The next line searches for a package whose name or description includes the term inkscape. Add the --names-only option (without the parentheses) to search for the package name only if too many hits are returned. The third line installs the package, and the fourth line removes it. Use the optional --purge option to purge the configuration files in the home directory along with the package down to the local configuration that you have to remove yourself.

To remove all the packages installed through a PPA, either use Software Center and choose the PPA next to Installed or stay on the command line, install the ppa-purge package, and use the following command (for the Lookit example):

$ sudo ppa-purge ppa:lookit/daily

Single Consignments

Finally, some additional websites provide single Debian packages that you can download. To install the software, double-click the DEB package. Ubuntu then calls Software Center and recommends installing the package. Once you click OK, the package appears together with a screenshot and description in Software Center. Finally, you can download the package with Install.

Infos

  1. What are the meta, super, and hyper keys? http://askubuntu.com/questions/19558/what-are-the-meta-super-and-hyper-keys
  2. Ubuntu's Launchpad platform: https://launchpad.net
  3. Medibuntu repository: http://www.medibuntu.org
  4. VirtualBox project: http://www.virtualbox.org/wiki/Linux_Downloads
  5. PPAs in Launchpad: https://launchpad.net/ubuntu/+ppas