2007-10-17 09:46:06 -07:00
< html >
< head >
< title > PackageKit< / title >
< 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" / > < / td >
2007-10-17 10:06:35 -07:00
< td width = "95%" valign = "middle" > < p class = "title" > How do I use PackageKit?< / p > < / td >
2007-10-17 09:46:06 -07:00
< td > < img src = "img/packagekit.png" / > < / td >
< / tr >
< / table >
< p > Back to the < a href = "index.html" > main page< / a > < / p >
2007-10-17 10:06:35 -07:00
< h1 > How do I use PackageKit?< / h1 >
2007-10-17 09:46:06 -07:00
< h2 > Using the command line< / h2 >
< p >
The < code > pkcon< / code > text-mode program allows you to interact with
2007-10-17 13:03:50 -07:00
PackageKit on the command. For example:
< 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 >
2007-10-17 09:46:06 -07:00
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
2007-10-17 10:49:49 -07:00
automatically updating your computer and installing software.
See the < a href = "pk-screenshots.html" > screenshots page< / a > for more details.
2007-10-17 09:46:06 -07:00
< / 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.
2007-10-17 10:49:49 -07:00
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" > online< / a > .
2007-10-17 09:46:06 -07:00
< / p >
< p > Back to the < a href = "index.html" > main page< / a > < / p >
< / body >
< / html >