All pastes #591303 Raw Edit

Something

public text v1 · immutable
#591303 ·published 2007-06-27 03:34 UTC
rendered paste body
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" 
	"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % globalent SYSTEM "../../../libs/global.ent">
%globalent;
<!ENTITY % cdo-C SYSTEM "../../../libs/cdo-C.ent">
%cdo-C;
<!ENTITY % gnome-menus-C SYSTEM "../../../ubuntu/libs/gnome-menus-C.ent">
%gnome-menus-C;
<!ENTITY % xinclude SYSTEM "../../../libs/xinclude.mod">
%xinclude;
<!ENTITY language "en">
<!ENTITY ubuntu '<phrase>Ubuntu</phrase>'>
]>
<article id="add-applications" status="draft">
	<articleinfo>
	<title>Adding, Removing and Updating Applications</title>
    	&legalnotice;
	</articleinfo>
	<para>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.</para>
	<section id="add-applications-introduction" status="draft">
		<title>What is a package manager?</title>
		<para>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.</para>
		<para>There are three main package managers you can use in Xubuntu:</para>
		<itemizedlist>
			<listitem><para><link linkend="gnome-app-install"><application>Add/Remove Programs</application></link> - The easiest way to install and uninstall programs.</para></listitem>
			<listitem><para><link linkend="synaptic"><application>Synaptic</application></link> - Advanced control of software and other system components.</para></listitem>
			<listitem><para><link linkend="apt"><application>Apt</application></link> - If you prefer using the Terminal.</para></listitem>
		</itemizedlist>
		<note>
			<para>If you open more than one of these programs at once, they may not work. Close them all, and open just one.</para>
		</note>
		<para>You need administrative access to use any of these programs. See <ulink type="help" url="ghelp:administrative">Administrative Tasks</ulink> for more details.</para>
	</section>
	
	<section id="extra-repositories" status="complete">
		<title>Software repositories</title>
		<para>A software repository is a place from which you can download and install software over the Internet.</para>
		<para>There are thousands of programs available to install on Xubuntu. These programs are stored in software archives called (<emphasis>repositories</emphasis>) 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.</para>
		<para>To organize the software, Xubuntu repositories are categorized into four groups: <emphasis>Main</emphasis>, <emphasis>Restricted</emphasis>, <emphasis>Universe</emphasis>, and <emphasis>Multiverse</emphasis>. 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 <ulink url="&ubuntu-philosophy;">Free Software Philosophy</ulink>.</para>
		<para>The standard Xubuntu Install CD contains some software from the <emphasis>Main</emphasis> and <emphasis>Restricted</emphasis> categories.</para>
		<para>If your system is connected to the Internet, many more software programs are made available for installation. For example, the <quote>Universe</quote> and <quote>Multiverse</quote> repositories are only available over the Internet.</para>
		<warning>
			<para>The <emphasis>Multiverse</emphasis> repository contains software which has been classified as <emphasis>non-free</emphasis>. 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.</para>
		</warning>
		<para>You can find more information about the Repositories available <ulink url="&ubuntu-components;">on the Ubuntu website</ulink>.</para>
	</section>
	
	<section id="extra-repositories-adding" status="complete">
		<title>Adding extra repositories</title>
		<para>It is possible to add extra repositories, such as those provided by third parties or those for older versions of Xubuntu.</para>
		<warning>
			<para>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.</para>
		</warning>
		<procedure>
			<step>
				<para>Open &software-properties; and press <guilabel>Third-Party Software</guilabel>.</para>
			</step>
			<step>
				<para>Press <guibutton>Add</guibutton> to add a new repository.</para>
			</step>
			<step>
				<para>Enter the <emphasis>APT line</emphasis> for the extra repository. This should be available from the website of the repository or similar, and should look similar to the following:</para>
				<screen>deb http://ftp.debian.org etch main</screen>
			</step>
			<step><para>Press <guibutton>Add Source</guibutton> and then click <guibutton>Close</guibutton> to save your changes.</para>
			</step>
			<step><para>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.</para>
			</step>
			<step><para>Once you have downloaded the GPG key, import the key by selecting the Authenticate tab, and clicking on <emphasis>Import Key File...</emphasis>, and then selecting the GPG key to be imported.</para>
			</step>
			<step><para>Click <guibutton>Reload</guibutton> in the package manager to update the list of available packages.</para>
			</step>
		</procedure>
		</section>
  <section id="gnome-app-install" status="draft">
		<title>Add/Remove Applications</title>
		<para>With the <guimenuitem>Add/Remove&#8230;</guimenuitem> item in the <guimenu>Applications</guimenu> menu, you can install programs to do new things with Xubuntu. You can also remove programs you don&#8217;t want. You need administrative access to use <application>Add/Remove Programs</application> (see <ulink type="help" url="ghelp:administrative">Administrative Tasks</ulink> for more details).</para>
		<para>If you know the name of a program you want to install, enter it in the <guilabel>Search</guilabel> field. Otherwise, begin by choosing a software category on the left.</para>
		<para>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.</para>
		<para>When you click <guibutton>Apply</guibutton> or <guibutton>OK</guibutton>, 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.</para>
    <para>Some software cannot be installed or removed using <application>Add/Remove Applications</application>. If you cannot find the package you are looking for, start the advanced package manager <application>Synaptic</application> (see <xref linkend="advanced"/>).
		</para>
	</section>
	<section id="advanced" status="draft">
		<title>Advanced package management</title>
			<para>Several other package managers exist in Xubuntu. These contain more advanced features than <application>Add/Remove Applications</application>.</para>
	<section id="synaptic" status="complete">
		<title>Synaptic Package Manager</title>
		<para><application>Synaptic</application> is an advanced package management application that can install and remove every package available to your system. The interface is graphical like <application>Add/Remove Applications</application>, but presents much more information and gives you complete control over the software on your computer.</para>
		<para>To launch <application>Synaptic</application>, from the <guimenu>System</guimenu> menu choose &synaptic;.
			You need administrative access to use <application>Synaptic</application>. See <ulink type="help" url="ghelp:administrative">Administrative Tasks</ulink> for more details.</para>
		<para>If you know the name of the package you want to install or remove, click the <guibutton>Search</guibutton> 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 <quote><wordasword>arcade</wordasword></quote> or <quote><wordasword>mathematics</wordasword></quote>).</para>
		<para>Use the categories on the left to filter the list of packages. To return to the list of categories after doing a search, click <guibutton>Sections</guibutton>.</para>
		<para>To install a package, click the box next to it and choose <guimenuitem>Mark for installation</guimenuitem>. If you change your mind, choose <guimenuitem>Unmark</guimenuitem>.</para>
		<para>To remove a package that is already installed, choose <guimenuitem>Mark for Removal</guimenuitem>.</para>
		<para>When you&#8217;ve finished, click <guibutton>Apply</guibutton> and Ubuntu will make the changes you selected. If you don&#8217;t want to make any changes, close the window instead.</para>
	</section>
	<section id="apt" status="draft">
		<title>Command-line package management with APT</title>
		<para>If you are comfortable using the Terminal, you can use <application>apt</application> (Advanced Packaging Tool) to install or remove software. You need administrative access to use <application>apt</application>. See <ulink type="help" url="ghelp:administrative">Administrative Tasks</ulink> for more details.</para>
		<para>To update the local list of packages, enter in a Terminal:
			<screen>sudo apt-get update</screen>
			Note that this command only updates the package <i>information</i> on your system. It does not install or update the actual software packages.</para>
		<para>
			To install all available updates for currently installed software:
			<screen>sudo apt-get upgrade</screen>
		</para>
		<para>
			To search for a package:
			<screen>apt-cache search <emphasis>package</emphasis></screen>
		</para>
		<para>
			To install a package:
			<screen>sudo apt-get install <emphasis>package</emphasis></screen>
		</para>
		<para>
			To remove a package:
			<screen>sudo apt-get remove <emphasis>package</emphasis></screen>
		</para>
		<para>
			To list other <application>apt</application> commands and options:
			<screen>apt-get help</screen>
		</para>
		<para>For more information, see <ulink url="&debian-apt;">Debian&#8217;s <application>apt</application> manual</ulink>.</para>
	</section>
</section>
	<section id="install-file" status="complete">
		<title>Installing a single package file</title>
		<para>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.</para>
		<para>It is important to ensure that any files you download come from a safe source before installing them.</para>
		<para>There are many different kinds of Linux package files. Most of these are associated with the package managers of specific Linux distributions. Examples are <emphasis>Debian Package</emphasis> files (<emphasis>.deb</emphasis> files), <emphasis>RPM Package Manager</emphasis> files (<emphasis>.rpm</emphasis> files), and <emphasis>Tarballs</emphasis> (<emphasis>.tar</emphasis> files).</para>
		<para>This section deals with installing these single files.</para>
		<warning><para>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.</para></warning>

		<section id="install-deb" status="complete">
			<title>Install/uninstall <emphasis>.deb</emphasis> files</title>
					<para>These files are <emphasis>Debian packages</emphasis>. The package files associated with Ubuntu have the <emphasis>.deb</emphasis> suffix because of Xubuntu's close relations with the Debian GNU/Linux distribution. You will need administrative privileges to install a <emphasis>.deb</emphasis> file. See <ulink type="help" url="ghelp:administrative">Administrative Tasks</ulink> for more details.
					</para>
						<para>To install a <emphasis>.deb</emphasis> file, double-click on it. If you prefer using the Terminal, enter:
						<screen>sudo dpkg -i package_file.deb</screen>
						</para>
						<para>To uninstall a <emphasis>.deb</emphasis> file, deselect it in your package manager. Or from a Terminal, enter:
						<screen>sudo dpkg -r package_name</screen>
						</para>
		</section>
		<section id="alien" status="complete">
			<title>Convert <emphasis>.rpm</emphasis> files to <emphasis>.deb</emphasis> files</title>
					<para>Another type of package files is <emphasis>Red Hat Package Manager</emphasis> files which have the <emphasis>.rpm</emphasis> suffix. It is not recommended to install these on an Ubuntu system. In almost all cases, a native Xubuntu <emphasis>.deb</emphasis> package is available. However, if absolutely necessary, an <emphasis>.rpm</emphasis> file can be converted to a <emphasis>.deb</emphasis> package using the program <application>alien</application>.  The resulting <emphasis>.deb</emphasis> file will be installed using dpkg as indicated above.
					</para>
					<procedure>
						<step>
						<para>Install the <application>alien</application> package.</para>
						</step>
						<step>
						<para>
							In a Terminal, enter:
							<screen>sudo alien <emphasis>package_file.rpm</emphasis></screen>
						</para>
						</step>
					</procedure>
			</section>
			<section id="tarballs" status="complete">
				<title>Install <emphasis>tarballs</emphasis></title>
					<para>Files with the <emphasis>.tar</emphasis>, <emphasis>.tgz</emphasis>, <emphasis>.tar.gz</emphasis> or <emphasis>.tar.bz2</emphasis> suffix are package files known as <emphasis>tarballs</emphasis> which are widely used in Linux and Unix.</para>
					<para>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.</para>
						<para>The first step will be to uncompress and extract the tarball. If it is a <emphasis>.tgz</emphasis> or a <emphasis>.tar.gz</emphasis>, in a Terminal enter:
						<screen>tar -xfvz <emphasis>tarball_name</emphasis></screen>
						</para>
						<para>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.</para>
					<para>Tarballs often contain the source code of the program, and need to be <emphasis>compiled</emphasis> in order to be used.</para>
					<note><para>Compiling programs requires some packages that are not installed by default. You can install these all at once by installing the <application>build-essential</application> package.</para></note>
		</section>
	</section>
</article>