Apper, KPackageKit reworked – part II – The Session Interface for Applications

Hi all!

Apper has greatly improved since my last blog post, still some issues to fix before releasing but major changes are finished for now. I changed the UI a lot, and in this blog post I’m going to show what I had wanting to do a long time ago. Hope you all enjoy it.

PackageKit is a project which includes a DBus session interface so that “non-package manager” applications can ask for package management operations. For example you click on an video file and dolphin opens, now GStreamer can’t handle that file because it misses codec for that kind of file, instead of worrying which package the GStreamer has to install in *each* distribution, it just says: Hey I need a codec for mpeg 4. The PackageKit helper that sits on your DBus session will listen to that and inform the user.

This feature was already included in KPackageKit, but as I coded this on hurry to make feature parity with gnome-packagekit this interface was a bit ugly, the main problem of the implementation was that it used KMessageBox for the questions thus making a lot of popups coming up, so you click search the message box hides, the transaction shows, it then finishes and hide, and another UI to review the changes show up and so on… Apper now has custom KDialog that show all the stuff inside it, so no more pop ups!

Now that you got the idea of how this works, let’s let the screen shots talk:

Gstreamer Instalation:

Old GStreamer Installer
New GStreamer Installer

Package Installation by Package Name:

Old Install Package by Name
New Install Package by Name

Install Package Catalog:

Old Catalog Installation
New Catalog Installation

Install Font Resources (I need to confirm if okular is using this afaik only a gnome doc viewer uses this):

Old Font Resource Installer
New Font Resource Installer

Install Package that provide some file:

Old Provides File Installer
New Provides File Installer

Mime Type Installer:

Old Mime Type Installer
New Mime Type Installer

My favorite! This is available in KDE 4.7, you go to K menu, right click on an application and select “Uninstall”, with Apper you can even drag more items from Kickoff and drop on the Apper Uninstaller!

Old Plain Boring Uninstaller
Cool new Uninstaller

After you click Continue on any of the above dialog the result was/is:

Old Query Transaction
New Query Transaction

Then you will see the confirmation dialog:

Old Review Changes
New Review Changes

Transaction installing/removing packages:

Old Transaction Installing / Removing Packages
New Transaction Installing / Removing Packages

And at the of an installation (be it by the package file or by any other means), you will have the confirmation and in case some application was installed you will be able to launch it right away (yes I need to add the K menu path…).

New Transaction Finished Dialog

As you can see the new dialog act like a wizard improving the user experience by providing a consistent look. And yes the blue title bar was inspired on K3B 😀

Now in your app you need some resource or package the session interface is described in:

The doc is not very complete but should be able to get an idea of what is possible to do with that.

Hope you all liked these changes!

Apper, KPackageKit reworked – part II – The Session Interface for Applications

23 thoughts on “Apper, KPackageKit reworked – part II – The Session Interface for Applications

  1. Beat Wolf says:

    Nice work.
    I wonder if you could adress the reasons that led to the fact that kubuntu no longer uses kpackagekit. I honestly have no idea what those reasons are, but perhaps you known more?

    I really enjoyed the fact, that kde has the same package manager on all distros (or most), without kubuntu (which is a big proportion of all kde installs), the whole unified package manager idea makes much less sense.

    1. dantti says:

      Well, after talking to a friend from Kubuntu, he told me that one of the reasons was that they wanted a package manager that was more close to the distribution, something like as they don’t fell confident about PackageKit.
      Apper will still be available there but not as the default one. But he told me that for the next releases they might reconsider the change. From my point of view the good thing about the change for them is that Moun integrates better with ratings, comments and all that Ubuntu Software Center stuff. And Apper didn’t has this yet simply because I haven’t found time enough for all of this. Now imo instead of yet another Application Manager the author could be helping have a cross distro application in a better shape, instead of quadruplicating the work (packagekit, aptdaemon, smart, qaptdaemon).
      But as long as we are free to chose I don’t really care.

  2. Luis Román says:

    Hi! I think there are a few problems with the “cool new uninstaller” dialog:

    * The text “An application is asking to remove an application” is quite odd and confusing.
    * The text “Do you want to remove the following application?” is confusing, as applications are listed above the text, not under it.

    In all dialogs, the “hightlighted” text in white with a blue background… well, it doesn’t seem that this kind of “header” is used in any other KDE app and thus I think that it should be avoided.

    Otherwise great work, but here is my constructive criticism 🙂

    1. dantti says:

      Yes, I couldn’t find a better text to 1 😛
      for 2. yes, it’s not used in all of KDE, but K3B uses it and it’s nice, and I think it makes the dialog less boring, kde doesn’t have a ‘cool’ class for wizards so I tryied my best to make a sort of one..

      1. Amarok also uses the blue-background-white-text thing for the bottom toolbars in its panes. My only complaint with it is consistency – if it were more universal, problem solved!

        So my advice isn’t, “Don’t use it because nobody else is”, it’s, “It looks good so everyone should use it”.

      2. dantti says:

        sure, looking good is the main idea 😀
        IMHO if you avoid doing something cool because it will look different of the other stuff then you are killing ideas, some cool widgets are found in amarok which can’t be found else where in KDE and that makes the app cool..

      3. Luis Román says:

        Well, you are the app’s developer so it’s your call. But consistency is a form of beauty. It makes the desktop look proffesional and polished, elegant and streamlined.

        Of course Amarok has custom widgets, but are application-domain specific, and besides, media applications tend to be less restricted by GUI guidelines, as their point is usually to resemple physical interfaces found in HI-FI systems, so it’s not a very good example IMHO to compare with a package management application.

        I think that the process should be: stick to the GUI guidelines, and if you don’t like the guidelines, still stick to them, but propose improvements to the guidelines, so they are “enforced” in all KDE apps, if the changes are found to be actual improvements. This is not killing ideas, but sharing them and discussing them, and promoting wider adoption, which is GOOD(tm).

        If a single developer start making “beautiful” interfaces that are not found anywhere, then KDE will return to the dark days of inconsistent interfaces, which in the long run could evolve into a Windows-like situation, in which even applications that are made by the own Microsoft look all different. And that is usability hell.

        But as I said, it’s your call 🙂


  3. Thanks a lot for all of the redesigns! Looks great.

    Where is packagekit-qt2 hosted? I looked on and I cannot find it. Is it possible to build Apper on Ubuntu Natty?

  4. BajK says:

    Wow. Wow. Wow. I am so impressed by the changes 🙂 Can’t wait to get the new version. I was kind of upset when I first read that they use Muon (which yes has this nice rating and “app store like” stuff but Apper will hopefully gain this? :P), but as long as it is in the repositories, okay… and nothing speaks against git clone, cmake, make, make install 😀

    But honestly, I do not like those blue bars on top of every dialog, sometimes they are okay but I think they make the progress dialogs (Removing …) too crowded.

    The new user interaction dialogs are so much better and less geeky. Can you still show a full list of all packages instead of just the “nice labled ones” (or did you just choose applications and not plain packages?)?

    And would you mind adding some additional command line parameters? I’d love using Apper in bash scripts to do stuff like “apt-get remove fgrlx amdcccle” and install/remove multiple packages and deal with it in a nicer graphical way. Together with my minor enhancements to kdialog, it makes easy, non-geeky bash scripts easily achievable.

    1. dantti says:

      Yes, Apper will soon have rating & friends, it’s been a long time I was willing to add this but first had to improve the UI.
      And Yes, the blue bar on the installing dialog is not nice, but removing the blue bar looked even worst, my first idea was to move the animated icon and the text beside it to the blue bar, but I’m not sure this will look nice still..
      Yes the Apper idea is to serve packages and applications in the same UI, IMO the concept of opening another application to browse packages is just wrong. But Apper still need to improve the way it does it now. The rationale is simple: you say to you mom to install Firefox and she will also need a java plugin, now isn’t it worst to tell her to open another UI just to get that plugin?
      Well Apper command line is pretty much what is exposed in PackageKit Session Interface, so it would be even better calling DBus instead of apper as you will get results like “user canceled the dialod”. But if need something more to this interface we can see if we add it.

  5. BajK says:

    Oh, and one question: Is it just me or does that auto-update feature not work anymore? Whenever I start my mother’s PC and do apt-get update && apt-get upgrade I get lots and lots of updates (about 250 today …) and well, she should not care about updates. I set “Install all” and “Check daily” but it doesn’t work I think. And once I have done apt-get update and am in the middle of downloading the upgrades, then the “New updates” icon appears (probably because I did the apt-get update?)

    But it does not work properly here 😦
    Do you also have an icon of the other tray icon statuses? Like “New updates available” or something? It should be prominent red or something 😀

    1. dantti says:

      Yes, it’s buggy, it’s actually what is now missing to be fixed so that Apper can be released, but I’m super busy these days…

  6. BajK says:

    On my machine I modified the apper tray icons a bit (getting used to Inkscape) so it somehow mimics Kubuntu’s email notifier.
    I changed the arrow when there are updates into this green glow (like the mail notifier) so it is more visible. The red dot icon is now completely covered in red, so the entire logo is red, so it sticks out easily.

    The colors look a bit washed out or intense when viewed in inkscape but I think it really looks nice in the system tray

  7. BajK says:

    Bad news there 😦 In Oneiric Beta 1 there is no longer KPackageKit or Apper in the repository.
    Fortunately I could compile Apper from GIT and now I have a great Package Manager again.
    Muon is… well… let’s just say if I enter “Networkmanagement” it finds stuff like Skype, Super NES Emulator and Co.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s