KDE and Baloo File Indexing ?

Hi,

I’m running OpenSUSE Leap 15.0 with KDE on my workstation and my laptop. Quite regularly I get a notification that Baloo File Indexing crashed. Now for file indexing and searching I’m already using Recoll (which is hands down the best file search application for the Linux desktop). Recoll uses its own file indexing daemon, so I wonder if it’s safe to deactivate or even entirely remove all Baloo related packages from my system.

Because of fast SSDs, I don’t use any type of file indexing anymore. I always search with find and grep on the command line anyway. Because of this, one of the first things I did after starting KDE was what you’re asking for: disable Baloo, and uninstall it, if possible.

First, I put this in my /home/$USER/.config/baloofilerc (a command like »balooctl disable« would do that as well):


[Basic Settings]
Indexing-Enabled=false

Log out, log in, and you should be set.

If you like to disable Baloo for all users, I think you could do the same in /etc/xdg/baloofilerc (not really sure whether the syntax in both rc files is the same though).

As long as Baloo is installed, you can check the storage space it occupies with …

balooctl indexSize

(Because I stopped it right after my first login, the sizes were negligible.)

Then I tried to uninstall anthing to do with file indexing, but due to a few dependencies with KDE/Plasma/Dolphin/XDG and whatnot, I ended up keeping the following packages around:

▶ **rpm -qa | grep -i baloo**
baloo5-widgets-17.12.3-lp150.1.2.x86_64
baloo5-imports-5.45.0-lp150.2.1.x86_64
libKF5Baloo5-5.45.0-lp150.2.1.x86_64
libKF5BalooEngine5-5.45.0-lp150.2.1.x86_64
▶ _

Four packages which zypper and YaST wanted to subbornly install again I marked »taboo« in YaST (»locked« in zypper-speak):

▶ **zypper ll | grep -i baloo**
20  | baloo5-imports-lang             | package | (any)     
21  | baloo5-kioslaves                | package | (any)     
22  | baloo5-widgets-lang             | package | (any)     
134 | libKF5BalooEngine5-lang         | package | (any)

Never heard of Recoll before, but I’ll keep it in mind if I ever need a file(-contents) indexer again. Cheers!

Yes, the KDE folks have been working this issue for some time now: <367480 – baloo_file crashes in Baloo::PostingCodec::decode.

The interim work-around is the following post in the above mentioned KDE Bug Report:

As a workaround until such time as your Distro updates to Frameworks 5.51, you can add a symbolic link to this Bash script in ‘~/.config/plasma-workspace/env/’:


#!/bin/bash
#
# Clean Baloo …
#
if  -f ~/.local/share/baloo/dateLastCleaned ]]
then
  declare -i BalooLastDate
  BalooLastDate="$(cat ~/.local/share/baloo/dateLastCleaned)"
  declare -i TwoDaysAgo
  TwoDaysAgo="$(date --date='2 days ago' +%Y%m%d)"
  if (( $BalooLastDate < $TwoDaysAgo ))
  then
    balooctl stop
    rm ~/.local/share/baloo/dateLastCleaned
    find ~/.config/ -maxdepth 1 -iname '*baloo*' -execdir /usr/bin/rm '{}' \;
    find ~/.local/share/baloo/ -iname '*index*' -execdir /usr/bin/rm '{}' \;
    date +%Y%m%d > ~/.local/share/baloo/dateLastCleaned
  fi
else
  balooctl stop
  find ~/.config/ -maxdepth 1 -iname '*baloo*' -execdir /usr/bin/rm '{}' \;
  find ~/.local/share/baloo/ -iname '*index*' -execdir /usr/bin/rm '{}' \;
  date +%Y%m%d > ~/.local/share/baloo/dateLastCleaned
fi
#

It’s in the KDE:Extra Repository: <https://software.opensuse.org/package/recoll&gt;.

I experimented some more with this. Here’s what I found.

Removing the packages is a no-no, since they’re tightly integrated into KDE.

On the other hand, Baloo can be deactivated by editing ~/.config/baloofilerc like this.

[Basic Settings]
Indexing-Enabled=false

I just integrated this in my user profile script.

Thanks everybody for your suggestions.

Why so difficult?
You can disable indexing with a few mouseclicks in kde’s systemsettings.
https://paste.opensuse.org/view/raw/75514319
https://paste.opensuse.org/view/raw/44036136

Operius.