# The &kpackage; Handbook

## Introduction

&kpackage; is a &GUI; interface to the SMART package manager. &kpackage; is part of the K Desktop Environment and, as a result, it is designed to integrate with the &kde; file manager.

## Onscreen Fundamentals

&kpackage; has two panels. The left panel displays a tree of the installed and available packages, the right panel displays information on the packages.

### The Main Window - Package Tree

When &kpackage; is started normally (that is it has not been invoked via drag and drop and has not been given any parameters) it displays two panels with the package tree on the left, this tree shows installed and available packages.

&kpackage; Left Panel Left Panel - Package Tree

Left Panel - Package Tree

The left panel displays the list of packages

The Search: line filters the package tree so that only those packages whose name or summary contains the search string are displayed. The columns that are searched can be changed by a menu that can be brought up by clicking the &RMB; on the search line.

Next to the search line is a pull down menu that filters the displayed packages based on status:

- Installed Packages - Show packages that have been installed

- New Packages - Show uninstalled packages that are new or have been updated

- Updated Packages - Show installed packages for which newer versions are available

- Available Packages - Show uninstalled packages

- All Packages - All packages

The package tree is based on the sections of the distribution and shows summary information about the packages:

- Package - Name of the package

- Mark - Shows a tick if the package has been marked. Marking allows multiple packages to be installed or uninstalled at once using the buttons located below the package tree.

- Summary - A short description of the package.

- Size - The package size

- Version - The package version

- Old Version - If the package updates an installed package, the version of the old package

The packages have graphical labels to indicate their state, an image representing the package type means an installed package, a N indicates an available package and a U means a package that can upgrade an installed package.

A single package is selected by clicking on the name. Clicking on the dot in the Mark column marks the package with a tick, a second click unmarks it, while &Shift;left click can be used to mark a range of packages and &Ctrl;left click can be used to add and remove marks on packages.

Selecting a package from the tree displays information about it in the right panel.

### The Main Window - Package Information Panel

The right panel has tabs for displaying four different types of information about selected packages

- &kpackage; Right Panel - Properties Right Panel - Package Properties

  The Properties tab which displays information on the selected package.

- &kpackage; Right Panel - Dependencies Right Panel - The Depenencies for the Package

  The Dependencies List tab shows the Dependencies and Provides for the package.

- &kpackage; Right Panel - Files Right Panel - The Files in the Package

  The File List tab shows the files in the package and for installed packages (provided the information is available) shows the state of the files. Files that exist are marked with a tick, those that are missing are marked with a cross.

- &kpackage; Right Panel - Change Log Right Panel - The Files in the Package

  The Change Log tab shows the change log for the package.

### Installing Packages

To install a package you can

- locate the package you wish to install in &konqueror;, drag it onto a running copy of &kpackage;

- click on a package file in &konqueror; and start a new copy of &kpackage;

- use on the Open menu items in &kpackage;

- selecting an available package in the package tree

For a selected package, use the Install button pops up the installation window.

For marked packages, use the Install Marked button on the left panel, which pops up the install window.

&kpackage; Install dialog Install Dialog

Install Dialog

The Install dialog lists the packages to be selected to be installed in a panel in the top left as well the packages needed to satisfy any dependencies. The selected packages have check boxes that allows their installation to be disabled.

The Install button will start the actual install. Normally the install window will be deleted after a successful install but if the Keep this window check box is selected the window will stay around.

The panel on the right is an integrated terminal window in which the installation programs are run, for interactive installation programs the interaction is done in this window.

### Uninstalling Packages

A selected package can be uninstalled by using the Uninstall button in the right panel, the Uninstall Marked in the left panel can be used to uninstall marked packages. The buttons bring up the Uninstall dialog.

&kpackage; Uninstall dialog Uninstall Dialog

Uninstall Dialog

The Uninstall button in the window causes the packages to be uninstalled, and the right panel provides an integrated terminal window for the uninstall program.

### Searching

#### Package Search Line

&kpackage; Search Line Search Line

Search Line

The Search line filters the package tree so that only those packages whose name or summary contains the search string are displayed.

#### Find Package

&kpackage; Find Package Find Package

Find Package

The Find Package dialog searches the names of the packages in the package tree and moves to the next matching package. If Sub string is not set then it will find only exact matches against packages names. If Wrap search is not set the search doesn't wrap around the end of the package tree.

#### Find File

&kpackage; Find File Find File

Find File

The Find File dialog searches for files the names of which contain the search string. The columns in the display are:

- Installed - Ticked if it is an installed package.

- Type - The type of the package.

- Package - The name of the package

- File Name - The name of the matched file

Only the files in installed packages are shown unless Also search uninstalled packages is set, this will only work if the `apt-file` command is installed. The database used by the `apt-file` command is updated by the Apt-File Update menu item.

### Misc

#### Root Access

&kpackage; requires `root` access for installing/uninstalling packages, this can be can be done by running &kpackage; as `root`, say by using &kdesu;.

Alternatively, if &kpackage; is running as a normal user it will try to run the install/uninstall programs as root by logging in to a pseudo terminal, it will use either `su`, `sudo` or `ssh` to do this and if needed it will pop up a prompt window where the `root` password or `ssh` key can be typed. For this to work the root prompt has to end in `#` . The Remember password option causes &kpackage; to remember the password that is entered.

&kpackage; Password prompt Password prompt

Password prompt

#### Drag and Drop

&kpackage; makes use of the &kde; Drag and Drop protocol. This means that you can drag and drop packages onto &kpackage; to open them. Dropping a file onto the Find File dialog will find the package that contains the file.

## Menus

This describes the &kpackage; menus.

### File Menu

The items in the File menu are:

&Ctrl;O File Open...

- Brings up file selector for local and &FTP; files

File Open Recent

- A list of the most recently open package files

File Remote Host...

- Starts another copy of &kpackage; to manage another system remotely using ssh

File Recent Remote Hosts

- A list of the most recently accessed remote systems

File Update

- Update `apt` indexes from package repositories.

File Upgrade

- Upgrade the Debian installation to the latest versions of all the packages.

File Fixup

- Attempt to fixup dependency problems

F5 File Reload

- Reread the package data and rebuild the package tree

&Ctrl;Q File Quit

- Quit &kpackage;

### Edit Menu

The items in the Edit menu are:

&Ctrl;F Edit Find Package...

- Search the installed package list for a package, the name of which contains the entered string

Edit Find File...

- Produces a list of packages that contain the entered file name, selecting a line will display the information on that package. It behaves slightly differently for RPM (where you have to enter the exact file name) and DEB (where you can enter a regular expression).

Edit Apt-File Update

- Searching for uninstall files uses the `apt-file` command, this updates the database that `apt-file` uses.

### Packages Menu

The items in the Packages menu are:

&Alt;Left Packages Back

- Back button for navigation using the links in Properties entries in the right panel.

&Alt;Right Packages Forward

- Forward button for navigation using the links in Properties entries in the right panel.

Packages Expand Tree

- Fully expands the packages tree

Packages Collapse Tree

- Collapses the package tree so that only the tree structure is shown

Packages Clear Marked

- Unmarks all packages

Packages Mark All

- Marks all packages that are members of the selected view

Package Install

- Install the currently selected package

Package Install Marked

- Install all marked packages

Package Uninstall

- Uninstall the currently selected package

Package Uninstall Marked

- Uninstall all marked packages

### Settings Menu

The items in the Settings menu are:

Settings Show Toolbar

- Toggle displaying the toolbar

Settings Save Settings

- Save options immediately

Settings Configure Shortcuts...

- The standard &kde; dialog for setting shortcut keys

Settings Configure Toolbars...

- The standard &kde; dialog for configuring tool bars

Settings Configure &kpackage;...

- The configuration dialog of &kpackage; has two pages:

- Command

- How to Execute Privileged Commands

- Use `su`, `sudo` or `ssh` to run privileged commands for such things as installing and uninstalling packages, The default is `su` but some systems such as &ubuntu; requires the `sudo`. For running privileged commands on remote hosts `ssh` is always used.

Misc

- Verify List of Files

- If set the list of files in the package is checked to see if they are actually installed

### Help Menu

The items in the Help menu are:

&help.menu.documentation;

### Toolbar

- Open

- Back

- Forward

- Expand Tree

- Collapse Tree

- Find Package

- Find File

- Update

- Upgrade

- Reload

## Credits and Licenses

&kpackage;

Documentation copyright 2005 Toivo Pedaste toivo@ucs.uwa.edu.au

&underFDL; &underGPL;

## Installation

### How to obtain &kpackage;

&install.intro.documentation;

For information on how to obtain and compile it see http://techbase.kde.org/Getting_Started

There is more information on compilation at http://techbase.kde.org/Getting_Started/Build/FAQ

There is a web page at http://www.general.uwa.edu.au/u/toivo/kpackage

### Requirements

For installing &kpackage; you need:

- &Qt; 4 and &kde; 4

- SMART package manager

For listing Debian packages no other software is needed but to install and uninstall the packages you need:

- the `dpkg` package manager or

- `apt-get` and `apt-cache`

For BSD packages you need the package management programs:

- `pkg_info`

- `pkg_add`

- `pkg_delete`

For Slackware packages you need:

- `installpkg`

- `removepkg`

For dealing with Redhat packages you need:

- `rpm`

For &kpackage; to work correctly with RPM packages the RPM database must be initialized. If typing ``rpm` `-qa`` gives an error about `unable to open....` then try ``rpm` `--rebuilddb``.