Baloo: Difference between revisions

From ArchWiki
(add Chinese translate link)
(Updated the command to be suffixed with "6", since that seems to be how things are now.)
 
(9 intermediate revisions by 7 users not shown)
Line 1: Line 1:
[[Category:Search]]
[[Category:Search]]
[[Category:KDE]]
[[Category:KDE]]
[[ja:Baloo]]
[[zh-hans:Baloo]]
[[zh-hans:Baloo]]
[https://community.kde.org/Baloo Baloo] is a file indexing and searching framework for [[KDE]] Plasma.
[https://community.kde.org/Baloo Baloo] is a file indexing and searching framework for [[KDE]] Plasma.
Line 14: Line 15:
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 {{ic|~/.config/baloofilerc}} file ([https://community.kde.org/Baloo/Configuration info]).  
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 {{ic|~/.config/baloofilerc}} file ([https://community.kde.org/Baloo/Configuration info]).  


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


Once you added additional folders to the blacklist or disabled Baloo entirely, a process named {{ic|baloo_file_cleaner}} removes all unneeded index files automatically. These are stored under {{ic|~/.local/share/baloo/}}.
Once you added additional folders to the blacklist or disabled Baloo entirely, a process named {{ic|baloo_file_cleaner}} removes all unneeded index files automatically. These are stored under {{ic|~/.local/share/baloo/}}.
Line 20: Line 21:
== Command-line usage ==
== Command-line usage ==


  $ baloosearch ''query''
  $ baloosearch6 ''query''


Support for range queries:
Support for range queries:


  $ baloosearch "width>=6000 width<7000"
  $ baloosearch6 "width>=6000 width<7000"


Groups and OR/AND operators:
Groups and OR/AND operators:


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


For a list of all supported filter properties available, see ([https://api.kde.org/frameworks/baloo/html/searching.html info]).
For a list of all supported filter properties available, see ([https://api.kde.org/frameworks/baloo/html/searching.html info]).
Line 35: Line 36:
To see what "words" baloo stored in the index for a particular file do:
To see what "words" baloo stored in the index for a particular file do:


  $ balooshow -x ''filename''
  $ balooshow6 -x ''filename''


== Indexing a removable or remote device ==
== Indexing a removable or remote device ==
Line 45: Line 46:
To disable the Baloo file indexer:
To disable the Baloo file indexer:


  $ balooctl suspend
  $ balooctl6 suspend
  $ balooctl disable
  $ balooctl6 disable


The indexer will be disabled on next login.
The indexer will be disabled on next login.
Line 54: Line 55:
To permanently delete the index database, run:
To permanently delete the index database, run:


  $ balooctl purge
  $ balooctl6 purge


This will also resolve the following error message in file dialogs and other applications ([https://bugs.kde.org/show_bug.cgi?id=437176 KDE bug 437176]):
This will also resolve the following error message in file dialogs and other applications ([https://bugs.kde.org/show_bug.cgi?id=437176 KDE bug 437176]):
Line 84: Line 85:
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:
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
  $ balooctl6 disable
  $ balooctl purge
  $ balooctl6 purge
  $ balooctl enable
  $ balooctl6 enable
  $ balooctl check
  $ balooctl6 check

Latest revision as of 18:10, 27 March 2024

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

Installation

Install the 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 balooctl6 process can also be used to control Baloo, e.g. in order to stop/start Baloo use balooctl6 suspend or balooctl6 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

$ baloosearch6 query

Support for range queries:

$ baloosearch6 "width>=6000 width<7000"

Groups and OR/AND operators:

$ baloosearch6 "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:

$ balooshow6 -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:

$ balooctl6 suspend
$ balooctl6 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:

$ balooctl6 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

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:

$ balooctl6 disable
$ balooctl6 purge
$ balooctl6 enable
$ balooctl6 check