Desktop searching with Beagle on KDE

Desktop Friend


If you have given up hope of ever finding your way around the mess of data on your desktop, a desktop search engine can help you penetrate the gloom. Kerry and KBeaglebar bring the Beagle engine to the KDE desktop.

By Frank Wieduwilt

Paul Avai, Fotolia

The Beagle [1] desktop search tool creates an index of files on local drives, letting the user search for information more quickly. The program, which was written in Mono [2], uses the Gtk Sharp (Gtk#) interface, a .NET library for binding to the Gtk+ GUI Toolkit. On the KDE desktop, two programs have risen to the challenge of improving the usability of Beagle: KBeaglebar [3] and Kerry Beagle [4].

Beagle is starting to appear in more Linux distributions, so your version of Linux might already have Beagle. If not, see the September 2005 issue of Linux Magazine [5] for more on setting up Mono and Beagle. Mono is quite extensive and needs a large number of libraries. If you do not have the current Mono version, expect a lengthy download session.

KBeaglebar

The KBeaglebar applet slots into the KDE Kicker and presents a box where users can enter search keys at the press of a key or button. KBeaglebar's author plans to integrate the tool with yaBI [6] at a later stage. KBeaglebar requires a recent Mono version (1.1.10 or newer), the most recent version of Beagle you can find (0.2.1 or newer), and KDE Version 3.4 or newer.

Installation

The application is easy to set up if you already have a working Beagle installation. To set up Kbeaglebar, unpack the source code archive from [3] by entering tar -xjvf kbeaglebar-0.4.0.tar.bz2, change directory to kbeaglebar, and type ./configure to create the Makefiles required for the build. Then type make to start compiling and, when this completes, give the su -c "make install" command and provide the root password when prompted to do so.

At this stage, the program is still hidden away. To enable it, right click an empty space in the Kicker, and select Add to Panel | Applet | Beagle KDE Bar. This command puts a Beagle search button in the panel. You can then press [Ctrl]+[Alt]+[Space] to open the search key input box.

Search and Find

When you type a search key in the input box, Beagle starts to search for documents that contain the search key. KBeaglebar gives you the search results in the form of a menu (Figure 1). If a program is linked to the file type, you can just click on the search result to load the file.

Figure 1: KBeaglebar showing the search results in a menu.

By default the program just gives you five files or programs that contain the search key. The settings allow up to nine matches. As this is a fairly low number, it makes sense to define the search key as precisely as possible.

KBeaglebar simply hands search keys to Beagle, thus supporting the special formating that Beagle uses to restrict the search or exclude specific terms.

Customizing KBeaglebar

The program does not offer much in the line of configuration options. To use the available options, click the arrow to the left of the Kbeaglebar icon in the panel and select Configure Beagle KDE Bar... from the menu.

A three-tab dialog appears. You can use the first tab to configure the keyboard shortcut for launching the search window. The second tab lets you set the menu width for the search results and specify the number of matches you want KBeaglebar to display.

The third tab in the configuration dialog has a button for launching the Beagle-control program, which you can use to customize Beagle. The software displays the index status and lets you specify which directories you want Beagle to create an index for.

Kerry

The second front-end for Beagle, Kerry, originates from the Suse labs and was first released with Suse Linux 10.1. Now, the KDE development team has picked up the tool and integrated it with the KDE desktop environment. Kerry requires KDE version 3.4 or newer and the most recent version of Beagle you can find (version 0.2.1 or newer).

Unless you have the current OpenSuse 10.1, or the beta version of the imminent Ubuntu Linux 6.06 release, you will have no alternative but to build the application from the source code. The program proved to be a bit intractable: on Mandriva 2006, we had to update to KDE 3.5 to complete the build, and on Ubuntu 5.10, we had to install a new version of Mono and a new version of Beagle. Kerry refused to run with the Mono version provided by the Ubuntu backport sources.

After negotiating these obstacles, unpack the kerry-0.1.tar.bz2 archive by typing tar -xjvf kerry-0.1.tar.bz2, change to the new kerry directory, and type ./configure. Then give the make command to launch into the build, and finally type su -c "make install."

Typing kerry & in a terminal emulation window opens the main window of the program. You can use the upper text box to type a search key or search keys, and the results are displayed in the box below it (Figure 2). The program shows you preview images of known file types.

Figure 2: The main Kerry window gives you a handy overview of the search results.

You can use the Within: list to the right of the input box to restrict the search to specific file types, such as HTML pages or text documents. Clicking on More results loads the remaining matches in the program window. Right clicking the search results pops up a context menu where you can select how to sort the search results.

Just like Kbeaglebar, Kerry adds an icon to the kicker. Right clicking the Kerry icon opens a menu that lets you re-access the last five searches (Figure 3), and the program's configuration dialog is also accessible via the menu by selecting Configure Kerry (Figure 4).

Figure 3: The Kerry context menu lets you access the last five searches.

Figure 4: Kerry lets users automatically launch the Beagle search engine when they open a KDE session.

On the first tab in the configuration dialog, you can specify the keyboard shortcut for opening the search window and the order in which Kerry displays the results. The Start search and indexing services automatically option automatically launches Beagle at the start of a KDE session. The Maximum number of results displayed option allows you to customize the result overview, just like with KBeaglebar. Kerry, however, does not apply an upper limit.

Conclusions

Beagle facilitates access to files stored locally. KBeaglebar and Kerry give you seamless KDE integration and facilitate access to the stored index. However, KBeaglebar sacrifices this advantage by restricting the maximum number of search results to nine.

Kerry is the clear winner with its clear-cut search result overview and filtering support. Kerry also offers more flexible configuration options and gives you a preview of the files it finds.

INFO
[1] Beagle: http://www.beagle-project.org
[2] Mono: http://www.go-mono.com
[3] KBeaglebar: http://www.kde-apps.org/content/show.php?content=35781
[4] Kerry: http://en.opensuse.org/Kerry
[5] "Sniffer Dog: The Beagle Desktop Search Engine," by Tim Schurmann; Linux Magazine; September, 2005: http://www.linux-magazine.com/issue/58/Beagle_Search_Tool.pdf
[6] yaBI: http://www.kde-apps.org/content/show.php?content=33222