Baloo

出自 Arch Linux 中文维基

BalooKDE Plasma 的文件索引與搜索框架。

安裝[編輯 | 編輯原始碼]

安裝 baloo 軟件包。

用法與配置[編輯 | 編輯原始碼]

為了在 Plasma 桌面上使用 Baloo 進行搜索,啟動 krunner (默認快捷鍵 ALT+F2)並鍵入查詢。若要在 Dophin(文件管理器)內搜索,按CTRL+F

在默認情況下,桌面搜索的 KCM 僅顯示兩個選項:一個將文件夾放入黑名單的面板以及一種一次點擊來禁用它的方法。

或者您可以編輯 ~/.config/baloofilerc 文件[1]。另外您也可以使用 balooctl 進程。運行 balooctl stopbalooctl disable

將文件夾添加到黑名單或完全禁用了Baloo之後,baloo_file_cleaner 進程將會自動刪除所有不需要的索引文件。這些文件存儲於 ~/.local/share/baloo/ 目錄下。

命令行用法[編輯 | 編輯原始碼]

$ 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

索引可移動設備或遠程設備[編輯 | 編輯原始碼]

默認情況下,所有可移動設備都在黑名單內,只需在 KCM 面板中將其移除即可。

禁用索引器[編輯 | 編輯原始碼]

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:/."

疑難解答[編輯 | 編輯原始碼]

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