Archive for January, 2014

Nepomuk Manual Update: KDE 4.11

January 16, 2014

Update: Nepomuk in KDE 4.11

Due to the fact that my previous manual is already getting a bit old (it was for KDE 4.7 and KDE 4.8), I decided to write an update about my experiences with Nepomuk in KDE 4.11. This article is meant as an addition to the other manual, but I try to point out the differences and provide references in order to use it as a manual to set up Nepomuk in KDE4.11 without having done it before.
If you never used Nepomuk before, read my previous manual first:

In order to avoid having to read all if you are nearly there, here is a summary of the most important points of the update:

  • Choosing tags in the side panel was removed, instead you can browse them by entering “tags:/” in Dolphin, och choose them by entering “tags:/tag1/tag2/…”
  • The find button opens a search bar, which behaves differently depending on if you open it form an indexed or from a non-indexed folder. In non-indexed folders the options are deactivated and the search is a simple GNU find or GNU grep search.
  • Tags, comments and ratings are seen as “content”-search
  • Nepomuk Cleaner can be used to clean up your database

The reference system is as tandard installation of OpenSuSE 13.1, but as far as I know every bigger distribution already provides a functional Nepomuk in their standard software choice together with KDE. At least in my case I didn’t have to install any additional packages. Anyhow, the amount of possible packages seems to have reduced since 4.7, but these packages seem to be necessary:

  • nepomuk-core
  • libnepomukwidgets4
  • python-kde4-nepomuk
  • strigi
  • libstrigi0
  • virtuoso-drivers
  • virtuoso-server

1) Searching in Dolphin

The first start of Dolphin offers not too many surprises. The “Add Tags”, “Add Comments” and Rating fields are present in the sidebar (press F11if you can’t see it, or, if you can see the side panel but not the information, right-click in the side panel and choose “configure”to enable the information). That means, Nepomuk is already active.You can verify (or enable) it by starting the Desktop Search application (just search for “Desktop Search” in the Start Menu, or choose it in the system settings)and see if “Enable Nepomuk semantic desktop” is active.

Go to the configuration here:


Or here:


to arrive here:


I could not find the system tray icon anymore (but the new indexer is fast and silent, it happens much less often that it has to be suspended).

The biggest difference is the way to perform a search in Dolphin. Before (Chapter 3 of the documentation for KDE 4.7), there were a “Search” and a “Find”button in Dolphin that opened the search bar and the search panel respectively. These buttons were merged into the “Find” button(the “Search” button does not exist anymore).

If you don’t see the find button, right-click on the toolbar and use “configure toolbar” to add “Find” to the the current actions.

The following picture shows the find menu in Dolphin when the find button (Strg+F) is pressed.


As you can see, all the options are grayed out. See Chapter 1.3 for more information about that.


1.1) Simple semantic and non-semantic search in Dolphin

Just opening the find menu in Dolphin (Find-button or Strg+F) and entering a search word performs a simple filename or content search, but only if indexing is disabled or the folder is not among the indexed folders (see Chapter 1.3 for information on indexing). It doesn’t matter if other folders are indexed or tags/comments exist in other folders,even if the everywhere-option is activated. You can see if a folder is not indexed if the other search options (document type,rating,…) are deactivated. In this case, tags, comments and ratings are neglected, and every folder is scanned (even those which are not indexed).

To make a long story short, this is the behaviour of the “Everywhere” option:

  • Search started from a non-indexed folder (grey search options) performs normal filename (GNU find) and/or content (GNU grep) search over all files and folders (indexed and non-indexed)
  • Search started from an indexed folder (search options active) performs filename and/or content search in the Nepomuk file index and – if content search is enabled – also in the tags and comments. All results come from the index, even the filenames can only be found if they are in indexed folders. (see Chapter 1.3 on indexing)

The following picture compares the two search modes. In both cases, content search is enabled (necessary to search in comments and tags).


Unfortunately, this strategy is a bit confusing, because the results depend on the folder from which the search is started, even if the search is performed over the whole system (“everywhere”). It would be more comfortable to have a check-box in the search tool to turn the indexed search on and off (like Kfind offers). More info about how to index folders can be found in Chapter 1.3.


1.2) Tag search and viewing semantic information in Dolphin

If you have already tagged some files, you might notice that that tags for the file types(Documents, Images, Audio Files, Videos) are present, but no user-generated tags are visible (as they were as seen in Chapter 3.1in the KDE 4.7 Manual).

Honestly, I haven’t found a comfortable GUI-way to choose from the available tags of the system in Dolphin.

[1] Suggests entering the command


in the address bar of Dolphin (or Konqueror) lists all tags and allows browsing in them,but it is not as comfortable as the check-boxes of KDE 4.7/4.8, and it doesn’t allow combining it with the advanced search (like rating and keyword search).

A workaround to list all your tags with one click is to add a shortcut in the places panel that opens the url



However, an advantage this handling is that tags can be treated like directories. Right-clicking on them offers some interesting options:


Creating a new file does not really make sense, apparently KDE doesn’t know where to save it and tags the template file instead. But “Add to places” creates a virtual folder for this tag (see Chapter 3.1 of KDE 4.7 for virtual folders). “Start a slideshow” opens Gwenview and starts a slideshow with all files of this tag. The “copy” and “move” operations copies or moves all the tagged files to the given place (copying removes the semantic information of the destination file). You can rename the tag, and all the tagged files automatically get the new name as a tag instead (but the bookmark in places gets not updated. so if you rename a tag, delete the old bookmark and add it again).

To view files with a certain tag, enter


into the Dolphin address bar, where “tag” is the tag name. Be aware that tag search is case sensitive! You can combine tag search (AND-operation) by typing


All files with both tags are listed.

Anybody who knows how to do an OR-search, to get files with either tag1 or tag2?

Another way to search for tags is to clicking on a tagged file and then clicking on a tag in the side panel. All the files having this tag will be listed.


In order to search for a tag using the Find-menu in Dolphin, the folder has to be indexed (see Chapter 1.3).


1.3) Indexing and advanced search in Dolphin

Advanced search is performed via the Find-Button (Strg+F) in Dolphin.

Unfortunately, the tag search via “tags:/” seems to be the only search type that is available without having indexing enabled. As you can see in the picture, all the search options were grayed out in this non-indexed folder:


The reason for this: The search can only be started from folders that are checked in the Desktop Search Configuration as indexed folders. To activate it, go into the desktop search configuration (“Desktop Search” in the start menu or in system settings) and check “Enable Nepomuk file indexer”. Then click on the “Indexing” tab. With “Customize Folders” you can choose which folders should be searchable (see Chapter 1 for the configuration of Nepomuk).

Entering a keyword into the search bar of an indexed folder performs a search within the index of this folder. To include semantic information (tags, comments) in the search, make sure “content” is enabled. Otherwise, only the filenames are searched. The search within the index is explained in Chapter 1.1.


1.4) Viewing semantic information in Dolphin

To include tags, ratings and comments in the view modes of Dolphin, you can configure the view modes by clicking on the Dolphin option menu and choosing “Adjust view properties”, choosing a view mode and clicking on “Additional information”. You can check tags, ratings and comments. In the detailed view, you can even right-click in the title bar (Name, Size,Date,…) and check the desired fields.


In order to be able to turn the view on and off on the fly, right-click in the Dolphin toolbar and choose “Configure toolbars”. You can add Tags, Ratings and Comments to the current actions, and they appear in the toolbar. But beware, at least in my system every entry appears 2 times in the available actions, but only one of them works, you have to try out which one it is. I assigned the icons myself. Originally, neither of these options had an own icon.



1.5) Clean up Nepomuk database

If you think your Nepomuk database is already messed up (for example, files sometimes appear several times in the search results, when the tag database and the index both return a hit) or you are not satisfied with the results, you can try to clean up the database. The Nepomuk developers offer a comfortable cleanup tool called Nepomuk Cleaner. You can easily start it by searching “nepomuk” in the start menu or going to All Applications -> Utilities -> Archiving”.


Just click on “Start” to clean up



1.6) Krunner

Krunner (Alt+F2 or just write something on the plain desktop) is a very powerful tool, but in my opinion it has a big disadvantage as a search tool: The number or results are limited. And I still haven’t found a way to raise it. Point 10 at [2] does not really give hope for this question: “There is no paging support for results: runner plugins simply return their whole data set and we simply hope that they don’t return too many. In fact, the current KRunner UI just drops everything after the first 50 (this because of QGraphicsView and no model).”

You can limit Krunner to Nepomuk, which makes the search results more specific (though the search is not full-text), by assigning a global shortcut to it.


If you are lucky, Krunner gives a tag as a result, which allows to do a full tag-search with one click.


Otherwise, there is no guarantee that the list of search results was complete (again, corrections and suggestions highly appreciated!)


1.7) KFind
Unfortunately, I have no idea how this tool should work. Can anybody explain it to me? I don’t get any results.

2) Indexing E-Mail in KMail

The desktop search configuration also offers to index E-Mails in KMail, so I gave it a try and clicked the checkbox “Enable Email Indexer” in the Nepomuk configuration (see Chapter 1 for the configuration).

A note on KMail: Be patient with it. KMail is a great email client with indefinitely many options, but it has its problems, especially when getting started. I finally got it working both with POP3 and IMAP and indexing, but I had to do it this way:

  • Set up your accounts when you have a stable and fast internet connection (i.e. at home and not in the train).
  • Wait until really all folders are synced. Do not interrupt the syncing. Best is leaving it over night if you have a big mailbox.
  • Configure the sent-mail (settings – identities – advanced) and trash folders (settings – accounts – receiving – advanced for IMAP) correctly (so that one account do not use the folders of the other account).
  • Use server side subscriptions (if supported) to remove the folders you do not want to see/sync. (right click on your account). Do not forget to include the main inbox folder and the trash
  • Add your own email address as custom sender addres in IMAP (settings – accounts – sending – advanced)
  • When everything is synced, choose disconnected mode and automatically compact folders (settings – accounts – receiving – advanced) for IMAP.
  • Close KMail before you start the first indexing, and leave it alone until it is finished (best over night too).

If it happens that your IMAP account is constantly offline, restart the agent for your IMAP mailbox in Akonadi. Open the akonadiconsole (command “akonadiconsole” in a terminal), look for the agent that has the same name as your mailbox, and restart it.


You have to wait until all the emails are indexed before KMail lets you use the search


There is a search bar in KMail, which works really well for most searches (even of mail contents), so it mostly satisfies the needs. The advanced search tool can be used for a really fine grained search (more than one criteria) or to search within attachments.



Just like the search within dolphin, the search in KMail needs some special treatment to get the right results. At first, I got no results att all, no matter which search team I used, until I figured out you have to follow these rules:

  • New messages (messages you received after starting Nepomuk email indexing) will be added directly to the index (also if they are still unread).
  • Old messages (you had before starting indexing) are not in the index until you have actively read them (clicked on them, in POP), or if you download all the mails with content (disconnected IMAP mode of KMail). You have to wait until all the mails of a newly added mailbox are downloaded, and then wait until the indexing is finished.
  • After clicking on them, it takes some time until they are in the index.
  • The search has to be refreshed. It worked best by clicking on “Search in all folders” and then on “Search only in” again. Suddenly, the mails were in the index.
  • Indexing only runs when the power adapter is connected. Reading mails with a laptop on battery will not them to the index instantly.
I you liked this article, feel free to leave comments, suggestions, etc. and share. The unawareness of the positive aspects of Nepomuk is one of its biggest problems.