Monday, May 4, 2009

Nepomuk + Strigi --> Resolving the mystery

Well, last week, I installed Fedora-11-preview on my computer. It was the KDE-Live-CD. The 4.2 interface looked quite impressive.

As I started configuring the Nepomuk search with Strigi indexing in System Settings, all I could found was "Strigi service not running". It took a lot of time to get it work. I googled things but there was not much of help available. So, after I could get the strigi working properly, I decided to write it down, so that others can find it helpful . Here it goes...

NOTE: the # prompt means superuser mode and the $ means normal user mode.

At first, you need to install the strigi. It is not shipped with Fedora-11's KDE Live CD.
"# yum -y install strigi" should do the job.

Now, check if the Nepomuk server is active or not. "$ ps -A|grep nepomuk" should output two processes: (1). nepomukserver and (2). nepomukservices.

These processes are started by default when you log into the KDE. If these are not already running, start it manually:
(1). "$ nepomukserver &"
(2). "$ nepomukservicestub nepomukstrigiservice"

You also need to start the strigi daemon manually by "$ strigidaemon &". As a back check, confirm it by "$ ps -A|grep strigi".

After finishing all these startups, go to System Settings--->Advanced---->Desktop Search, and check the box there saying use nepomuk with strigi for search...and hit the apply button in the bottom. You will see an error message there stating as if strigi service is not running....or something similar.

This is where it sucks and I'll tell you why...

Oversimplifyingly speaking, the default file-manager, Dolphin, uses Nepomuk to manage the matadata to tag and comment on files. The Strigi is used to index the tags, comments, filenames and content of the files. To use strigi's indexed data for searching, the Nepomuk needs some library/backend. It has two available options: Sesame or Redland. However, there are some associated problems with both.

The Sesame is fast but needs all those Java development packages, which is perhaps 200MB+ in size. Given limited space available in the Live-CD release, it can't be included.

The second option, Redland, is ridiculously slow with the strigi's indexed data, but small in size. That's why, the packagers decided to include it with the Live-CD release as the backend for tagging/commenting the files in Dolphin under the Nepomuk layer. However, it is not allowed to fraternize with strigi's data. That's why, you'll see "Strigi service not running"-type of error, even if the strigi services are running actually.

Well, now comes the fixing....and this is where things get crucial a bit...

Install the Sesame package. You can download the source rpm packages and specs from here and build it for your own distribution.

I have build it for the Fedora-11 and you can download it from here. Of course, the easiest way to install it is to issue the yum: "# yum localinstall soprano-backend-sesame2-2.2.3-2.fc11.i386.rpm". It'll take care of all the dependencies as usual.

You can either leave the Redland package installed on the system or remove it, doesn't matter much. The Nepomuk starts using sesame once it finds it.

After all these, you need to reboot your box.

But before doing that, I just got a very interesting stuff for you. Check out Naomi Letizia, the girl who put Silvio Berlusconi's wife out of humour to refresh yourself (-__<).

Well, after the reboot, check the Desktop Search section in the System Setting. It should now show the strigi running and indexing the files. Give it some time. Initially, it will consume some of your CPU % but once done, it behaves very gently and mostly sits idle unnoticed.

To search your files, you can either fire the krunner (Alt+F2) and start typing your keywords. Or, in the Dolphin location bar, type "nepomuksearch:keywords". After hitting the Enter key, it will show the items it has found for you.

I hope this helps. If you have any further questions or comments, plz leave it here.

And yeah, I too find this word, Nepomuk, very odd. This is German(?)!

4 comments:

Silver Knight said...
This comment has been removed by the author.
Silver Knight said...
This comment has been removed by the author.
Silver Knight said...

My apologies for removing and reposting this comment TWICE, but I guess I just have to learn to accept that Blogger's comment system currently kinda blows.

Blogger happily chose to mangle the formatting of the comment (without warning) after clicking publish on BOTH previous attempts (even after editing to account for the initial error on Blogger's part) even though it displayed exactly as expected in the comment preview.

I will report the bug to the folks at Blogger after ONE more try at this comment
...

We now return you to your originally scheduled comment...

shekharc said:

"And yeah, I too find this word, Nepomuk, very odd. This is German(?)!"

Silver Knight responds:

While researching Nepomuk I found this wiki page which has a picture (acronym.png) embedded near the top claiming that NEPOMUK stands for:

Networked
Environment for
Personal
Ontology-based
Management of
Unified
Knowledge

Sounds kinda "buzz-wordy" to me, but I guess that's the world we live in these days. ;)

Unknown said...

thanks it worked. Now I can search my desktop. Krunner does not work with Strigi, but Strigi does work with Dolphin. Type 'nepomuksearch:/ file-to-find' into dolphin's address bar. Hit Ctrl+L to toggle crumb and address mode.