Efficient Desktop Searching with Beagle

964

 

 

The ability to efficiently (and reliably) search your desktop computer for files and folders is a key aspect of the modern desktop. Without this ability, the average user (especially the ones who are organizationally-challenged) will find themselves working far more than they should to locate the files and folders they need to use. And when something really gets misplaced? LOOKOUT!

Naturally the various Linux distributions come with search tool aplenty – most of which are in the form of command line tools. Obviously the new user has no desire to get to know the CLI (Command Line Interface) and would rather have a fancy graphic tool to use. Guess what? Linux distributions have, at their fingertips, plenty of outstanding graphical search tools just waiting to be used. One of those tools is Beagle. 

 

 

Beagle is a very powerful indexing search engine for the Linux desktop computer. But before we get into the Beagle, let’s examine just what an indexing search engine is. Unlike most searching tools (that go through your directory hierarchy, searching file by file) and indexing search engine collects data about your files/folders and, using the Lucene Indexing System stores the information about the data so it can be quickly retrieved. But Beagle doesn’t just search file and directory names. Beagle searches meta-data and tags so everything (even email) is searchable. And, best of all, this all happens in the background and changes to files are updated in real-time (including email indexing upon arrival, and chat conversations indexed as they occur). In this tutorial you will learn how to install and make the best of the Beagle Search tool on your Linux desktop.

Installation

Beagle was designed to be desktop-indpendent. So you can use Beagle on GNOME, KDE, Enligtenment, and more. For the purposes of this article, I will use the GNOME desktop running on top of Ubuntu 9.10. In order to install Beagle in this environment you simply have to follow these steps:

  1. Open up the Ubuntu Software Center.
  2. Search for “beagle” (no quotes).
  3. Click on the Search entry.
  4. Click the Install button.
  5. Enter your sudo password.

Optionally you can go back and install the Beagle Extension for Firefox, which will index web pages visited. Once installed you will find Beagle in your Applications > Accessories menu. If you look you will actually find two “search” entries (“Search” and “Search for files…”). The entry you want is “Search”. But before you open up the Beagle search tool, let’s take care of a few configurations first.

Configuring Beagle

Beagle is not just a user-friendly graphical tool. Beagle also has a daemon that runs in the background and stays busy searching for your data and many more tools. In fact, if you open up a terminal window, type “beagle” (no quotes) and then hit the Tab key you will see nineteen beagle tools. From this list, there are really only three tools you will need to worry about:

  • beagle-settings: The graphical configuration tool.
  • beagled: The Beagle daemon.
  • beagle-search: The Beagle search tool.

Beagle PreferencesThe first thing you need to do is configure Beagle. If you go to the Applications > Accessories menu and open up the Beagle Search tool (click the Search entry) the Beagle main window will open. From this window you take care of all of your searching, but you also have to open up the Preferences window (the beagle-settings command if you’re curious.)

To open up the settings window select Search > Preferences and a new window will open (see Figure 1). In this new window there are four tabs:

  • Searching: General options
  • Indexing: What directories to include and exclude.
  • Data Sources: Which data sources (Email, files, web pages, addres books, etc) that you want to include in the searching.
  • Network Options: You can enable a web interface for local search as well as allow external access (currently experimental).

Let’s walk through the options you want to visit in the Preferences window, tab-by-tab.

Searching

In this tab you want to make sure you have the following CHECKED:

  • Start search & indexing services automatically.
  • Index more aggressively while the screensaver is activated.

You can also include Automatically start searching after the user has stopped typing for faster searching.

From the above it should be obvious that Beagle can gobble up your system resources. It only does this when indexing, so these settings can be pretty important (especially if you have a slower system). And if you are using a laptop, you will certainly want to make sure the battery power option is UNCHECKED, or your battery life will be only a fraction of what you are used to.

Indexing

This tab will be very much user-dependent. By default Beagle will index your ~/ (Your Home) directory. You can add addition paths from this tab by following these instructions:

  1. Click the Add button associated with the General section.
  2. Locate the path you want to add (outside of your home directory).
  3. Click the Open button.

The new path will be listed in the window now. You can do the same in the Privacy section to exclude any paths from indexing/searching.

Data Sources

From this tab go through the list of sources and uncheck any data sources you do not want to include. If there are applications listed that you do not use, you should uncheck those to decrease indexing time. Any changes made here will not take affect until the Beagle daemon is restarted.

Network Options

There are two sections in this tab to examine. The first is the General tab. If you would like to enable remote searching of a machine you would want to check Enable web interface for local search service. This is handy if you work from multiple machines or just want search access to a remote machine. NOTE: The address for the web interface is http://localhost:4000. You can use this remotely by entering http://ADDRESS_TO_MACHINE:4000 Where ADDRESS_TO_MACHINE is the actual IP address (or domain) to the machine you want to search.

From the Networking section of this tab you can add remote, search-enabled, hosts. This does not mean you can add Google or Linux.com. What this means is you can add other machines that have Beagle installed with remote searching enabled.

That is it for the configuration of Beagle. Now it is time to fire up the daemon and let the indexing begin.

Starting the daemon

From the main window click Service Options > Start Service to start the Beagle daemon. Once the daemon has started the indexing will beging. Depending on how fast your system is, and how many files/directories you have the indexing could take some time.  You can search while the daemon is running, but upon first instance of the daemon starting you might find the search results a little sparce.

Searching

Main search windowSearching is simple:

  1. Open up the Search tool from Applications > Accessories > Search.
  2. Enter your search string in the text area.
  3. Click the Enter key or click Find Now.

Your search results will appear in the main window (see Figure 2).  In Figure 2 I have searched the local machine for the string “linux”.

Search remote machine

By using the web-based interface, you can easily search a remote machine. Let’s search a machine on a local LAN at IP address 192.168.1.10. To do so enter 192.168.1.10:4000 in the address bar and hit the Enter key.

The search results will appear as they do in Figure 3. From the remote search results you can not open these files but you can examine the results. And in the case of indexed email, you can read the contents of the mail (so long as the contents contain the search term(s).

Web interfaceAlthough the web-interface is somewhat limited, it is still an outstanding way to be able to search mutliple machines without having to leave your desk.

Final thoughts

Searching your desktop has never been easier. With the help of the Beagle search system, you can extend your desktop searches beyond a single desktop machine to keep track of files across multiple machines.