On-demand package installation in openSUSE 11.3

You most probably have already run into this at least once. You use the computer, try to do something and you get an error message saying "sorry, application foo is not installed", "the required plugin bar is not installed" or similar. And that's it, there it stops. You have to find out what package the required functionality is in, install it manually and try again. Like if the computer couldn't ask "but maybe I can install that, do you want me to try?" and handle it itself.

And that's what my goodie for this openSUSE release is about. I've been examining a bit about what various parts of the desktop could do this and there indeed are some cases. For example, clicking in Dolphin on a file that has no associated application installed usually results in the "Open with?" dialog. And that dialog has nowhere in it the option "the application that can open it, silly". Especially given that if the installation medium is accessible (i.e. usually if the network connection is up), it's rather easy to find out the right application for the file and install it:

KSUSEInstall #8

This specific case is actually a bit tricky. The file, example.kvtml, is a file with pairs of words or expressions that e.g. KWordQuiz can use for teaching (words for language lesson, for example). The problem is that technically the data is stored as XML and the mimetype (file types) specification has a concept of subclasses that is and in not useful depending on how you look at it. A C++ source file is a subclass of a plain text file, so you can edit it just like a plain text. Good. An XML file is also a subclass of a plain text file, so you can view XML as plain text. Good? I'm not quite sure on this one, since while XML is human-readable, any decent up-to-date XML is certainly not human-understandable anyway, so I fail to see the point. But, since .kvtml files are XML files, they are a subclass of them, and that means you can view them just like a plain text.

KSUSEInstall #7

Good??? Probably not. They are supposed to be opened in an application that can show the lesson nicely, who'd be crazy enough to decipher it from the XML? Well, but that's the reason for the dialog looking this way, the above is what the dialog is trying to tell you. Sorry :). This should get eventually sorted out somehow in the mimetype specification, but for now I had to go with this.

The short version is: Just say you want an application that can handle exactly the file type, that's usually the right choice here. And if there are more applications that can handle it, you'll get a choice:

KSUSEInstall #9

There is another, rather obvious case, where this can be useful. Amarok on its first start usually likes to complain about lack of support for certain well-known and widely used multimedia format and 11.3 will be no different. However, Amarok has also some support for solving this problem and has this dialog:

KSUSEInstall #1

And that is where the new feature comes into play.

KSUSEInstall #2

This time, however, there is the usual problem: The openSUSE distribution is not allowed to include the necessary support, because <a lot of ugly legal babble that causes headache>. Some distributions may try to include it and hope that residing in a country without such laws solves the problem. Or, even better, not having a load of money in bank avoids a lot of trouble too (what's the point of sueing somebody who can't pay afterwards, these merry patent folks don't do it just for the sports). That doesn't quite work for openSUSE, being supported by Novell, and I bet every big company has been already sued for much more stupid things than this, just in case it'd work out. So openSUSE simply can't include the support and can't even really tell you where to get it. As long as the world is the way it is, there can't even be any "install all I need" button in openSUSE. Sorry. That's the way it is :(.

So what happens in this case it that the required packages will not be found. However, there are many repositories for openSUSE not provided by openSUSE, and you can add the right one and try again (BTW, the URL in the link doesn't work yet, that will be fixed in time for 11.3).

KSUSEInstall #3

Choosing to enable additional repositories will simply launch the YaST module for configuring repositories. And, as I said, it cannot point you "here" and tell you which repository to add (because, if nothing else, it doesn't know anyway). But adding a repository is not really that hard.

KSUSEInstall #4

After adding the right repository it will proceed with installation. Again, the usual allmighty YaST. Nothing hard about it, and this part should be mostly automatic anyway.

KSUSEInstall #5

There it is. As simple as possible (sigh) and now it's ready (but the dialog is actually right, restart is required for technical reasons).

KSUSEInstall #6

There of course can be more places where this could be useful. The crash handler has already support too, so generating proper bugreports with full backtraces should be now much simpler as well. This is so far just experimenting with the feature and seeing how it works out, if it works well, even more can be added after 11.3.


Very nice. I remember seeing this in the opensuse-kde mailing list but it all makes much more sense seeing the screenshots. Some of the dialogs look a bit uncelar though. How about using a set of QCommandLinkButtons on the dialog in the first screenshot: one for use generic application, one for install specific application and maybe also one for bringing up the traditional choose application dialog?

By Matt Williams at Mon, 05/24/2010 - 16:28

There's never a choice from 3 options - one is always install, the second is either generic application or open with dialog, can't be both.

By Lubos Lunak at Tue, 05/25/2010 - 07:55

Why does the YaST repository manager use Cancel/OK button order? Can YaST not use QDialogButtonBox so that the button order is consistent with the desktop used?

By cdrummond at Tue, 05/25/2010 - 12:39

YaST GUI is modelled in a way that it feels a lot like working with a wizard dialog, so the button order actually feels kind of right.

By Lubos Lunak at Tue, 05/25/2010 - 13:39

I use openSUSE at home and work - and the 'Cancel/OK' and 'Cancel/Accept' just seem, and feel, very odd to me. Especially when dialogs have (e.g.) 'Abandon/Cancel'. One app mixing two different button orders just does not feel right.

Not a big deal either way, I was just curious. (The whole of YaST could do with a make-over in the looks department anyway)

By cdrummond at Tue, 05/25/2010 - 13:58

looks really nice! should help smooth out a number of wrinkles for people using openSuse and i'm ooking forward to trying it out in 11.3.

one small suggestion: remember to change the text of the buttons in the dialog from "Yes" and "No" to something descriptive like "Configure Repositories". i see that some of the dialogs have been so altered, but not all of them. :)

it's also unfortunate that the whole codec thing can't be bridged any more effectively. :/ i keep dreaming of a day when openSuse has a license to ship mp3, etc. codecs :) probably will be dreaming for a while, but dreaming can be nice ;)

By Aaron J. Seigo at Tue, 05/25/2010 - 21:36

This feature is pretty cool :-) I did find the "add repositories" dialog confusing. I was like.. hmm. now what? There is no guidance from there, or a hint on what to do next.
Could the MP3 question prompt also direct you to the one-click installer at: ?

I also think the "generic type" / "specialized type" dialog needs some rewording. Information scientists get the "subtype inheritance" idea, but I doubt normal users will. I think the second paragraph could be omitted completely, at least in the case of "application/xml".

By vdboor at Wed, 06/02/2010 - 11:09

The crash handler has already support too

that would be really helpful!! sometimes it can be really difficult to find the right package.

By mxttie at Mon, 06/07/2010 - 18:07