New contacts service watching folders in KMail

Currently I am thinking about how notifications for the user could be done within the contacts framework. What kind of messages there are, what they need, etc. Symbols for contacts/people have a lot in common with symbols for other things, like windows, files, devices, tools, etc. In the end there may even be a ui framework which treats all the same at this layer.

To gather some experience/ideas I created a new status service which should get a lot to notify me about. This service watches KMail folders for new emails and notifies about changes. It does so by using a mapping of email addresses to KMail folders. For this an extra entry in KAddressbook is created, which has a syntax like



Ingo Klรถcker and Allen Winter on mailinglist kde-pim helped me to get the DCOP interaction with KMail going. I thanked them with triggering a bug. ๐Ÿ˜‰ Starts me to wonder how many out there are including unit tests on signals? I didn’t too often before, too.

While I was at it, I added an action service to open the assigned folder of an email address, so unread emails are only one/two clicks away. See it’s menu entry and all of the above in the screenshot below:

How to add support for the service watching KMail folder

Looking at Konqui’s kicker button, it’s obviously really time a solution is found which is capable to deal with too many states to show. Just add the Has-birthday state, the chat state, and some more, and the head will not be visible anymore. Ouch.

Apps, programs, services, …

Ever wondered why apps are called “apps”? Sure, because it’s a abreviation of “application”. But why the term application? Application of what?

Ancestry research for terms can sometimes help to understand things. So many describing terms lost their meaning and transformed in labels, carrying semantics of their own, usually quite blurry. I think “application” is one of those. And the authors of the wikipedia entry for Application_software seem to agree a little:

Application software is a loosely defined subclass of computer software that employs the capabilities of a computer directly to a task that the user wishes to perform.[…]

[…]The term application refers to both the application software and its implementation.[…]

[…]The exact delineation between the operating system and application software is not precise, however, and is occasionally subject to controversy.[…]

I would like to add to this controversy. By claiming that with KDE, GNOME, Windows and all other multitasking operating systems with a GUI the desktop (environment) is the application today. All the so-called apps are “programs” of another type (of whatever definition).

Take KMail. An application? Or just a rich plugin to the Qt/KDE framework/desktop? It sets up itself in a separate process, but passes over control to the framework (eventloop) and the environment (signals from operating system and other processes). It integrates, not uses.

I see this especially with the contacts framework I am working at. As a usage example I did a contact cards server which shows cards with details of a contact as windows. What type of software is it? It is running in it’s own process. But it cannot be started from the “application menu”, only by commandline (e.g. done on demand by services for the framework). The user can interact with the cards, issue commands, but new cards can be only opened from remote (DCOP), e.g. from a contact button on Kicker. Some commands, dependant on the installed service plugins, call programs like KAddressbook, Kopete or KMail to do something, “degrading” those to simple services. So is KMail an application, some program, a service, something else, or all together?

I think this aspect should have a stronger influence on the overall design and implementation. Perhaps it might make sense to have a deep look at CORBA, Openstep and other architectures for composed systems.

All apps would accept that they are just plugins/programs. And behave that way ๐Ÿ™‚ Like registering as a service for others with a central server which starts and ends them on demand. Like out of process KParts. With DCOP/D-Bus the infrastructure is already present.

See on Planet Gnome Steve Frรฉcinaux asking the question
What about speeding up opening documents using D-Bus?“. I very much welcome something along this idea, not only because I proposed something
similiar* some years ago. ๐Ÿ™‚
* BeOS appserver is rather something like X, isn’t it?

I have not seen a lot of DCOP calls, but they usually first check for their target running, then calling it. Like this async call:

if( !kapp->dcopClient()->isApplicationRegistered("kaddressbook") )
KApplication::startServiceByDesktopName( "kaddressbook" );
DCOPRef( "kaddressbook", "KAddressBookIface" ).send( "showContactEditor(QString)", Contact.uid() );

Why does one need to ensure the recipient (server) running yourself? And need to know whether it is a unique application or not? Why doesn’t the bus do it? Like this:

if( kapp->dcopClient()->isApplicationRegistered("kaddressbook") )
DCOPRef( "kaddressbook", "KAddressBookIface" ).send( "showContactEditor(QString)", Contact.uid() );

Or simply (here with the contactcards server):

DCOPRef( "contactcards", "ContactCardsIf" ).send( "showCard(QString)", Contact.uid() );

Food for thoughts. Could someone please go to dinner? ๐Ÿ™‚

Dropping WXPP, back to KDE4

When I bought my laptop two years ago it had the obligatory MS tax for XP included. People report that one could successfully claim that tax back if insisting enough. But as I wanted to get some knowledge about that “industry standard” (to be able to help family and fellows) I kept it installed, at least in some first few GB of the hard disk.
Some other GB at the end of that hard disk have been also still occupied, by some fancy thing called PreDesktop area. This is the result of a funny idea of some people at IBM, who thought that the recovery CDs could be included right with the hard disk. So the assistent out of office does not need to call the technical service, but can simply press that big special “Access IBM” button on the keyboard and have his system restored to the default. Oh well, what a perfect operating system it is which needs a recovery option always present.

Except for some Delphi development these GBs of the hard disk were never used but missed for my daily work with the real operating system. For sure one never has enough memory. So this monday I decided to reclaim those space back and wipe both XP and the PreDesktop area. Before doing so I wanted to make a backup of XP, after all I paid for it and might find some use somewhere sometime. Newer thinkpads have a windows tool with them to create the recovery CDs from that area at the end of the hard disk. Mine is older, it doesn’t. And as I missed to call the IBM service within 30 days after purchase to get a set of real recovery CDs for free, I would now have to pay some 30 EUR for it. Money I wanted to save. And some hints on the internet told me it was possible. Well, only a day later I really knew how. Money saved, time lost.

  • Backup all your data.
  • Get some free GB on a FAT partition; if there is none, create one:
    • Resize some partition to gain free 4 GB.
    • Create a new FAT partition of the gained space (becomes C: for me)
  • Unhide the predesktop area in the bios.
  • Start the “Recover to factory”.
  • Press F3.
  • fwbackup size=640 file=C:\IMGSET
  • Wait two hours…
  • Backup restoration tool: a:; cd recovery; copy fwrestor.exe c:
  • Reboot into an operating system
  • Move the created files somewhere safe.
  • Disable the predesktop area in the bios.
  • On the full hard disk install a fresh operating system, now we are at it.
  • Restore your data.

Quite easy… if one would have known it in advance.

Now with the new kdelibs policy, which started on july 17th, it is time (and possible ๐Ÿ™‚ ) again to follow development on trunk.
Somewhat following the instructions on the KDE wiki I soon could login into a KDE4 session and… could see that not much has changed on the surface in the last months. But things are changing. Just look at the mass of commits. And see how clean the build of kdelibs and kdebase already goes, only a few “deprecated” messages. The end of the tunnel may be coming, a usable environment for basic tasks may be not far away. Thanks to all who are driving the transformation through the dark!

Time to start the port of the contacts framework and prepare the integration with Akonadi etc…

Cleanup your tests, too

Heard a talk about Test-driven development the other week. To get acknowlegded what I have read here and there. But learnt something new: Once the code is stable, one should cleanup the tests, too. And document them like the real code.

Seems useful.

But now I wait for someone who demands that the tests should be also tested. And then those tests. And those. And …, hm, there is something in it. Perhaps tests can be woven such that they give each other the test feedback?

“Former KDE developer”

Imagine a university department having it’s celebration day and hosting a speaking guest from the industry. In the introduction of the speaker his bio is shortly mentioned:

“…, former KDE developer, …”

Wouldn’t it be nice? Oh, just happened here today.

Who? Well, it was Chris Schlรคger of AMD, visiting the Department of Computer Science at the TU Dresden. He is still looking for skilled Linux developers for the Operating System Research Center (background).

Passive session

We wanted to watch the the soccer worldcup finale yesterday at home. Having no TV set around (cannot afford to loose more brain) some old computer hardware including a lend tv-card was reactivated and had a Opensuse 10.1 smoothly installed (well, installation started in time). After we had managed to get the terrestrial tv signal using some metres of garden wire (including the obligatory “Alright, please keep your position now”) and thanks to the made up antenna then had choosen between some color and sharpness we felt like watching TV in the 60ies: rather black/white and blurred picture (HDTV to PAL to 1024x768x16bit). The rather jerky movement of the french players only added up to that. KWinTV played perfectly and didn’t cause any headaches (neither chestaches… :P).

I was satisfied showing my friends how easy such a quick and complete setup worked with this free software distribution. ๐Ÿ™‚ But I omitted that I was not really satisfied. I miss some support for these kind of setups. Like a package set in Yast. Or some KMC (K media center) session or alike available in the login manager.

But I see it’s coming:

  • There is the SoC project for Advanced Session Management with KDE by Will Entriken which hopefully brings the ability to setup some profiles for e.g. a media center like session.
  • Rasterman shows with Rage (against the machine) why waiting for Enlightenment 0.17 is better than waiting for Godot. (Watch the “video shot”!)
  • And Christian Schaller just today blogs about the first release of Fluendo’s Elisa Media Center. Well, it seems to lack support for television but that should be solvable. Okay, then I understand why one would ignore television…

Like someone on proposed already two years ago: The (KDE) programs are there. It just needs someone to put them in a shell.

So hopefully things will be ready for 2010… ๐Ÿ™‚

Framework for contacts and services slowly getting shapes…

They call it evolutionary prototype, I think. Starting from the Contacts menu for Kicker the code is steadily evolving into a general framework for properties of a contact and services upon them. It’s still based upon KDE3, but once the architecture looks okay I hope it can be integrated with Akonadi and what there will be else. Concerning Akonadi I am already bugging Tobias now and then, thankfully he is always present at the meetings of the LUG Dresden. ๐Ÿ˜‰

Like I wrote in a recent blog entry I very much favour a plugin approach for all properties of a contact. This approach is deeply reflected in the framework. So if one likes to add a new property and to have it and services on it appear in all programs, now, all she would need to do is adding:

  • a property service for en-/de-coding the data from the db* and display it
  • optionally some action services for performing something based on the property entry
  • optionally also some data action services, which offer service for given data, like from a drop
  • optionally also some status services, which show some state in systems using the given property

* For now via KABC::Addressee::custom().

For testing the framework a lot of property types and services are already in place (for the price that framework changes are heavy work). Sending a link or a file to a friend already has become dragging it to his card or kicker contact button and choosing whether to do it via email or im for me ๐Ÿ™‚

Going the way of plugins enables everyone to do quick additions:
Are looking for a property describing the login name for shells and showing the login state? Two plugins, a custom entry with KAddressbook, and soon it is supported everywhere, like in a contact card:
Before: konquicard1.png After: Contact card for Konqui

Interested to play with it? Please go ahead and get the code from “/trunk/playground/pim/contactsapplet”. For doing your own property type and services see “contactproperties/example/” for some templates.
Yes, Josef, also you. I am waiting for your plugins for the GGZ Gaming Zone ๐Ÿ™‚

Update: For your convenience the source is also available at

Everybody’s feedback is very much welcome!

I am especially interested what kind of notifications are needed and how they could be done/integrated with KDE’s notification system. E.g. I would perfectly like it to have Kopete’s bubble “Susi says: Marble…” coming from Susi’s kicker contact button…