Baloo - Arch Linux 中文维基

跳至內容

# Baloo

出自 Arch Linux 中文维基
翻譯狀態：

- 本文（或部分內容）譯自 Baloo，最近一次同步於 2022-04-23，若英文版本有所更改，則您可以幫助同步與翻譯更改的內容。
- 您可以在 ArchWiki 的對應頁面找到本文翻譯的原始修訂歷史。
- 本文可能與英文原文存在出入。

Baloo 是 KDE Plasma 的文件索引與搜索框架。

## 安裝

安裝 baloo包 軟體包。

## 用法與配置

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

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

或者您可以編輯 `~/.config/baloofilerc` 文件[1]。另外您也可以使用 `balooctl` 進程。運行 `balooctl stop` 和 `balooctl 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

分類：​

- 搜索
- KDE

Baloo
新增話題