packagekit/docs/html/pk-using.html

92 lines
3.4 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>PackageKit</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<link rel="stylesheet" href="style.css" type="text/css" media="screen"/>
</head>
<body>
<table align="center" class="title">
<tr>
<td><img src="img/packagekit.png" alt="[img]"/></td>
<td width="95%" valign="middle"><p class="title">How do I use PackageKit?</p></td>
<td><img src="img/packagekit.png" alt="[img]"/></td>
</tr>
</table>
<p>Back to the <a href="index.html">main page</a></p>
<h1>How do I use PackageKit?</h1>
<h2>Using the command line</h2>
<p>
The <code>pkcon</code> text-mode program allows you to interact with
PackageKit on the command. For example:
</p>
<pre>
[hughsie@laptop ~]$ pkcon get updates
normal powertop i386 1.8-1.fc8 fedora Power consumption monitor
security kernel i386 2.6.23-0.115.rc3.git1.fc8 installed The Linux kernel
security gtkhtml2 i386 2.19.1-4.fc8 fedora An HTML widget for GTK+ 2.0
Runtime was 0 seconds
</pre>
<p>or</p>
<pre>
[hughsie@laptop ~]$ pkcon search name power
installed powerman i386 1.0.25-2.fc7 installed PowerMan - Power to the Cluster
installed powertop i386 1.8-1.fc8 installed Power consumption monitor
installed gnome-power-manager i386 2.20.0-5.fc8 installed GNOME Power Manager
available kpowersave i386 0.7.3-0.2svn20070828.fc8 development KPowersave is the KDE frontend for powermanagement
available kadu-powerkadu i386 0.5.0-4.fc8 development Powerkadu module for Kadu
available powermanga i386 0.90-1 development Arcade 2D shoot-them-up game
Runtime was 2 seconds
</pre>
<p>
The <code>pkmon</code> program allows you to monitor what PackageKit is
doing on the command line and is mainly used for debugging.
</p>
<h2>Using graphical tools:</h2>
<p>
<code>gnome-packagekit</code> provides a rich set of GTK tools for
automatically updating your computer and installing software.
See the <a href="pk-screenshots.html">screenshots page</a> for more details.
</p>
<h2>Using libpackagekit:</h2>
<p>
The libpackagekit gobject library wraps the DBUS interface in a nice
glib-style API.
This makes designing programs that use libpackagekit can concentrate on
core functionality rather that the DBUS and PackageKit internals.
PkClient in libpackagekit can be used as easily as:
</p>
<pre>
PkClient *client;
client = pk_client_new ();
pk_client_install_package (client, "openoffice-clipart");
g_object_unref (client);
</pre>
<h2>Using the raw DBUS API:</h2>
<p>
Using the DBUS methods and signals directly means that no glib or
gobject dependency is needed, although this means you will have to
manage the transaction_id multiplexing in any client program.
This is not difficult, although does require more code than just using
libpackagekit.
The latest interface is available in the source tree or <a href="http://gitweb.freedesktop.org/?p=packagekit.git;a=blob;f=src/pk-interface.xml">on-line</a>.
</p>
<p>Back to the <a href="index.html">main page</a></p>
<p class="footer">
Copyright <a href="mailto:richard@hughsie.com">Richard Hughes 2007</a><br/>
<a href="http://validator.w3.org/check/referer">Optimized</a>
for <a href="http://www.w3.org/">standards</a>.
</p>
</body>
</html>