Saturday, September 23, 2006

Ubuntu desktop search

Since I was unable to find any straight and simple posts on desktop search in Ubuntu (or most other Linux dists for that matter) I decided to post a brief note on it here.

It seems that the only viable option today, at least if you're looking for a clean interface with enough of a powerful engine, is Beagle. The simplest way to obtain it is via an apt-get:

sudo apt-get install beagle

Now, before you start the indexing, you might want to enable extended attributes on your filesystems. Not doing this apparently slows the indexing down multifold, so it's highly recommended. This is documented somewhere on the Beagle site, but what ended up doing was adding 'user_xattr' to the options in /etc/fstabs, like:

/dev/hda2 / ext3 defaults,user_xattr,errors=remount-ro 0 1

Notice how everything else remains unchanged from the default settings. Then, I remounted the above partition using:

mount -o remount /

CAUTION: There are reports of incidents when adding extended attributes, so proceed with caution. For me it worked perfectly though.

The final thing is to start the indexing, by launching

beagle-search

and going to 'Preferences'. Under the 'Indexing' tab you can now add whichever directories you want indexed. Notice how e.g. adding a certain directory will remove any entries further down in the hierarchy, e.g. '/' will remove '/usr', since it will be included in the search anyway.

Now Beagle starts its work, and you can monitor its progress by issuing:

beagle-index-info

and to actually search, use

beagle-search

As a side note, the daemon is called 'beagled'. If anything seems fishy with your indexing, you can always try confirming your settings and manually killing and restarting the processes:

sudo killall beagled

sudo beagled --replace

That's about it. Stay tuned for more Ubuntu action.

No comments:

Post a Comment