%globalent; %cdo-C; %gnome-menus-C; %xinclude; Ubuntu'> ]>
Adding, Removing and Updating Applications &legalnotice; In this section you can learn how to use a package manager to add or remove software in Xubuntu with a few clicks. You can also learn about more advanced techniques of managing applications and discover some optional applications to add to Xubuntu.
What is a package manager? A package manager is a program that installs and uninstalls software, and keeps track of the components each piece of software needs to run. The package manager will also download the applications from the Internet and install them. There are three main package managers you can use in Xubuntu: Add/Remove Programs - The easiest way to install and uninstall programs. Synaptic - Advanced control of software and other system components. Apt - If you prefer using the Terminal. If you open more than one of these programs at once, they may not work. Close them all, and open just one. You need administrative access to use any of these programs. See Administrative Tasks for more details.
Software repositories A software repository is a place from which you can download and install software over the Internet. There are thousands of programs available to install on Xubuntu. These programs are stored in software archives called (repositories) and are made freely available for installation over the Internet. This makes it very easy to install new programs on your system, and it is also very secure, because each program you install is built specially for Xubuntu and checked before it is installed. To organize the software, Xubuntu repositories are categorized into four groups: Main, Restricted, Universe, and Multiverse. The rationale used to determine which software goes into which category is based on the level of support that software development teams provide for a program and the level of compliance the program has to the Free Software Philosophy. The standard Xubuntu Install CD contains some software from the Main and Restricted categories. If your system is connected to the Internet, many more software programs are made available for installation. For example, the Universe and Multiverse repositories are only available over the Internet. The Multiverse repository contains software which has been classified as non-free. This software may not be permitted in some jurisdictions. When installing each package from this repository, you should verify that the laws of your country permit you to use it. Also, this software may not include security updates. You can find more information about the Repositories available on the Ubuntu website.
Adding extra repositories It is possible to add extra repositories, such as those provided by third parties or those for older versions of Xubuntu. Be careful when installing software from third-party repositories. Software from third-party repositories is not supported by Xubuntu. The software they contain may not have been tested with Xubuntu, and could cause your system to break. Open &software-properties; and press Third-Party Software. Press Add to add a new repository. Enter the APT line for the extra repository. This should be available from the website of the repository or similar, and should look similar to the following: deb http://ftp.debian.org etch main Press Add Source and then click Close to save your changes. Most software repositories use a GPG key to digitally sign the files they provide, which makes it easy to check that the files haven't been tampered with since their creation. In order for apt to be able to check this, you need the public key that corresponds to the signatures. The key should be available for download on the repository's website. Once you have downloaded the GPG key, import the key by selecting the Authenticate tab, and clicking on Import Key File..., and then selecting the GPG key to be imported. Click Reload in the package manager to update the list of available packages.
Add/Remove Applications With the Add/Remove… item in the Applications menu, you can install programs to do new things with Xubuntu. You can also remove programs you don’t want. You need administrative access to use Add/Remove Programs (see Administrative Tasks for more details). If you know the name of a program you want to install, enter it in the Search field. Otherwise, begin by choosing a software category on the left. Programs that are already installed begin with a check mark next to their name. Uncheck a program if you want to remove it from your computer. When you click Apply or OK, any new software will be downloaded from the Internet, and Xubuntu will make the changes you selected. If you have not activated the online package archive, you may be asked to insert your Xubuntu CD-ROM to install some packages. Some software cannot be installed or removed using Add/Remove Applications. If you cannot find the package you are looking for, start the advanced package manager Synaptic (see ).
Advanced package management Several other package managers exist in Xubuntu. These contain more advanced features than Add/Remove Applications.
Synaptic Package Manager Synaptic is an advanced package management application that can install and remove every package available to your system. The interface is graphical like Add/Remove Applications, but presents much more information and gives you complete control over the software on your computer. To launch Synaptic, from the System menu choose &synaptic;. You need administrative access to use Synaptic. See Administrative Tasks for more details. If you know the name of the package you want to install or remove, click the Search button, and enter the package name or a short search term. You can also search for packages by description (for example, you can find all packages mentioning arcade or mathematics). Use the categories on the left to filter the list of packages. To return to the list of categories after doing a search, click Sections. To install a package, click the box next to it and choose Mark for installation. If you change your mind, choose Unmark. To remove a package that is already installed, choose Mark for Removal. When you’ve finished, click Apply and Ubuntu will make the changes you selected. If you don’t want to make any changes, close the window instead.
Command-line package management with APT If you are comfortable using the Terminal, you can use apt (Advanced Packaging Tool) to install or remove software. You need administrative access to use apt. See Administrative Tasks for more details. To update the local list of packages, enter in a Terminal: sudo apt-get update Note that this command only updates the package information on your system. It does not install or update the actual software packages. To install all available updates for currently installed software: sudo apt-get upgrade To search for a package: apt-cache search package To install a package: sudo apt-get install package To remove a package: sudo apt-get remove package To list other apt commands and options: apt-get help For more information, see Debian’s apt manual.
Installing a single package file The preferred method of installing programs is via the package managers described in this chapter. However, although the Xubuntu package archives are very large, it is possible that you may wish to install a package that is not available in the Ubuntu archives. If this happens, you can also download and install files from websites. It is important to ensure that any files you download come from a safe source before installing them. There are many different kinds of Linux package files. Most of these are associated with the package managers of specific Linux distributions. Examples are Debian Package files (.deb files), RPM Package Manager files (.rpm files), and Tarballs (.tar files). This section deals with installing these single files. It is not guaranteed that these files will be compatible with your system and you will not receive security updates if you install these files. For these reasons, if you wish to install a program, always use a native Ubuntu package of the application available through a package manager, if there is one available.
Install/uninstall <emphasis>.deb</emphasis> files These files are Debian packages. The package files associated with Ubuntu have the .deb suffix because of Xubuntu's close relations with the Debian GNU/Linux distribution. You will need administrative privileges to install a .deb file. See Administrative Tasks for more details. To install a .deb file, double-click on it. If you prefer using the Terminal, enter: sudo dpkg -i package_file.deb To uninstall a .deb file, deselect it in your package manager. Or from a Terminal, enter: sudo dpkg -r package_name
Convert <emphasis>.rpm</emphasis> files to <emphasis>.deb</emphasis> files Another type of package files is Red Hat Package Manager files which have the .rpm suffix. It is not recommended to install these on an Ubuntu system. In almost all cases, a native Xubuntu .deb package is available. However, if absolutely necessary, an .rpm file can be converted to a .deb package using the program alien. The resulting .deb file will be installed using dpkg as indicated above. Install the alien package. In a Terminal, enter: sudo alien package_file.rpm
Install <emphasis>tarballs</emphasis> Files with the .tar, .tgz, .tar.gz or .tar.bz2 suffix are package files known as tarballs which are widely used in Linux and Unix. If there is no native Ubuntu package available in any of the Ubuntu repositories, you can use the command line to install or uninstall the tarball file. The first step will be to uncompress and extract the tarball. If it is a .tgz or a .tar.gz, in a Terminal enter: tar -xfvz tarball_name Then it will be necessary to follow the instructions that come with the package. These are generally located in the extracted tarball in a file called README or INSTALL. Tarballs often contain the source code of the program, and need to be compiled in order to be used. Compiling programs requires some packages that are not installed by default. You can install these all at once by installing the build-essential package.