Baloo

From ArchWiki

Baloo is a file indexing and searching framework for KDE Plasma.

Installation

Install the baloo5[broken link: replaced by baloo] package.

Usage and configuration

In order to search using Baloo on the Plasma desktop, start KRunner (default keyboard shortcut ALT+F2) and type in your query. Within Dolphin press Ctrl+f.

By default the Desktop Search KCM exposes only two options: A panel to blacklist folders and a way to disable it with one click. Alternatively you can edit your ~/.config/baloofilerc file (info).

Additionally the balooctl process can also be used to control Baloo, e.g. in order to stop/start Baloo use balooctl suspend or balooctl resume to resume.

Once you added additional folders to the blacklist or disabled Baloo entirely, a process named baloo_file_cleaner removes all unneeded index files automatically. These are stored under ~/.local/share/baloo/.

Command-line usage

$ baloosearch query

Support for range queries:

$ baloosearch "width>=6000 width<7000"

Groups and OR/AND operators:

$ baloosearch "tag:coolpicture OR (width>=6000 width<7000)"

For a list of all supported filter properties available, see (info).

Note that text search index breaks down all metadata (including filenames) into "words", and does all its searches over it from the beginning of the word only. What this means is that while baloosearch "tutorial" would match my_great_tutorial.txt, baloosearch "utorial" would not match it. To see what "words" baloo stored in the index for a particular file do:

$ balooshow -x filename

Indexing a removable or remote device

By default every removable and remote device is blacklisted. It is possible to remove devices from the blacklist in the KCM panel.

Disabling the indexer

To disable the Baloo file indexer:

$ balooctl suspend
$ balooctl disable

The indexer will be disabled on next login.

Alternatively, disable Enable File Search in System settings under Search > File search.

To permanently delete the index database, run:

$ balooctl purge

This will also resolve the following error message in file dialogs and other applications (KDE bug 437176):

kf.kio.core: "Could not enter folder tags:/."

Troubleshooting

Index file size increases after each boot when using btrfs subvolumes

See the bug on the KDE bugtracker, comment 43.

Inotify folder watch limit error

If you get the following error:

KDE Baloo Filewatch service reached the inotify folder watch limit. File changes may be ignored.

Then you will need to increase the inotify folder watch limit:

# echo 524288 > /proc/sys/fs/inotify/max_user_watches

To make changes permanent, create a sysctl configuration file:

/etc/sysctl.d/40-max-user-watches.conf
fs.inotify.max_user_watches=524288

Plasma Vault Files are indexed and available even when vault is closed

This is a major security bug not yet fixed. Any file inside vault is by default indexed and available through file manager search, Krunner and Kickoff.

One workaround is to stop folder(s) from being indexed by Baloo. The relevant options are available in System Settings > Search > File Search > Folder specific configuration > Add folder configuration > Stop indexing a folder. After adding the desired folder, the existing Baloo data needs to be removed and freshly indexed again:

$ balooctl disable
$ balooctl purge
$ balooctl enable
$ balooctl check