September 18, 2008

Extremely easy driver installation

We have something really cool in.

How it works, usecase and experience.

The usecase. I have a webcam, but it does not work, because it requires the quickcam-kmp-default package. But I don’t know that.

The webcam](/assets/webcamphoto1-s.jpg)

Desktop](/assets/driver-install1-s.png)

You are in your desktop. You can see in the tray the applet telling you that there are security updates to install.

![Tray Icon]( http://www.suse.de/~dmacvicar/driverinstall/driver-install-tray-icon-updates….

Now I connect the webcam to the computer:

Webcam connected](/assets/webcamphoto2-s.jpg)

Notice the tray icon. It went from “There are security updates available” to a “hardware” icon (we will add a more visible notification too).

Tray Icon](/assets/driver-install-tray-icon.png)

Now you click on the icon and you see:

Install Dialog](/assets/driver-install4.png)

You click install, and after 10 seconds quickcam-kmp-default is installed.

See it live

Do you want to see it live?. I did a recording of the process as a flash movie.

Background

Since openSUSE 10.1, ZYpp has the ability to recommend packages based on drivers and other useful system information. Packages can supplement any namespace, which is in turn evaluated at solving time. This allows to automatic select drivers on installation, based on the machine hardware, for example.

You could also plug new hardware, and call

zypper up

And that would recommend you to install the right drivers.

However this functionality was not used to its own potential. What we really wanted here was to recommend packages when hardware was plugged.

With PackageKit, filling that gap was possible, as we can easily talk to ZYpp from the desktop over dbus, using an abstracted interface.

So in the last weeks, Stefan Haas implemented support for this in our PackageKit ZYpp backend. Thomas Goettlicher added the needed glue in the kupdater applet. That is, listening to added devices events, and calling PackageKit to let ZYpp recommend new hardware.

Yesterday I sat to see it working. Some small one liners prevented it to work, but after some tweaking in the PackageKit backend, it worked really well. Thanks for everyone putting the pieces together.