Jump to content

Baloo: Difference between revisions

From KDE Wiki Sandbox
Spage (talk | contribs)
m Baloo and extended attributes: correct this section. I think I'm right. If this is the only section here shouldn't it move to community.kde.org ?!
Skierpage (talk | contribs)
be clear the information is mostly *not* here
 
(13 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Baloo replaced [[Nepomuk]], see https://community.kde.org/Baloo .
: ''Most information about Baloo is on [[community:Baloo|KDE Community wiki]], see https://community.kde.org/Baloo and its sub-pages.''
Baloo is the file indexing and file search framework for KDE Plasma. Baloo replaced [[Nepomuk]]


== Baloo and extended attributes ==
== Baloo and extended attributes ==
Applications such as [[Dolphin]] store tags and ratings in xattrs (extended attributes) in the filesystem, and Baloo indexes these so you can search them.
Applications such as [[Dolphin]] store tags and ratings in xattrs (extended attributes) in the filesystem, and Baloo indexes these so you can search them.
On Linux, to show them as entered in Dolphin, in a terminal enter:
On Linux, to show them as entered in Dolphin, in a terminal enter:
<kbd>getfattr ''/path/to/file''</kbd>
assuming the necessary package ("xattr" in Debian) is installed.


Some filesystems (e.g. FAT32, the filesystem which which most USB flash drives are formatted) do not support xattrs at all, so copying files to such a volume will lose the tags.
{{Input|getfattr ''/path/to/file''}}


Most CLI utilities (e.g. cp, tar, rsync) won't copy xattrs without additional flags either, so unless your environment is 'All KDE all the time' and you only use Linux filesystems like ext4, XFS or Btrfs (this is not a complete list), and you modify your backups to specifically include xattrs, your tags may get trashed one way or another.
(You may need to install the package that provides <code>getattr</code>. On Debian, run <code>sudo apt install xattr</code> in a terminal).


Nepomuk (the previous KDE tagging/file metadata system) used to store tags in a separate database, but even after many years of development it could hardly be made to work performantly or reliably so it was replaced with Baloo.
{{Input|getfattr --absolute-names -dR  /home    2> /dev/null # recursive search under /home/  }}


In some ways using xattrs is 'the right place' to put this tagging info, but Linux doesnt have a 'core API' that would allow a 'xattrs preserved by default, and interpreted consistently' policy. Therefore there are a lot of ways to lose your tags. KDE has been trying to make this work for many years, but it is difficult given the way UNIX/POSIX has evolved.
To open e.g. textfiles found in this manner, manually add a webshortcut
 
file:///\{@}
 
and name the shortcut  '''000ffoxopener''' to conveniently open the found and highlighted file after right-clicking... shortcut... with e.g. firefox right from within '''Konsole'''.
 
Some filesystems (e.g. FAT32, the filesystem with which most USB flash drives are formatted) do not support xattrs at all, so copying files to such a volume will lose the tags.
 
Most CLI utilities (e.g. cp, tar, rsync) won't copy xattrs without additional flags either, so unless your environment is 'All KDE all the time' and you only use Linux filesystems like ext4, XFS, or Btrfs (this is not a complete list), and you modify your backups to specifically include xattrs, your tags may get trashed one way or another.
 
Nepomuk (the previous KDE tagging/file metadata system) was used to store tags in a separate database, but even after many years of development, it could hardly be made to work performantly or reliably so it was replaced with Baloo.
 
In some ways using xattrs is 'the right place' to put this tagging info, but Linux doesn't have a 'core API' that would allow a 'xattrs preserved by default, and interpreted consistently' policy. Therefore there are a lot of ways to lose your tags. KDE has been trying to make this work for many years, but it is difficult given the way UNIX/POSIX has evolved.

Latest revision as of 02:14, 29 November 2023

Most information about Baloo is on KDE Community wiki, see https://community.kde.org/Baloo and its sub-pages.

Baloo is the file indexing and file search framework for KDE Plasma. Baloo replaced Nepomuk

Baloo and extended attributes

Applications such as Dolphin store tags and ratings in xattrs (extended attributes) in the filesystem, and Baloo indexes these so you can search them. On Linux, to show them as entered in Dolphin, in a terminal enter:

getfattr /path/to/file

(You may need to install the package that provides getattr. On Debian, run sudo apt install xattr in a terminal).

getfattr --absolute-names -dR  /home    2> /dev/null # recursive search under /home/   

To open e.g. textfiles found in this manner, manually add a webshortcut

file:///\{@}

and name the shortcut 000ffoxopener to conveniently open the found and highlighted file after right-clicking... shortcut... with e.g. firefox right from within Konsole.

Some filesystems (e.g. FAT32, the filesystem with which most USB flash drives are formatted) do not support xattrs at all, so copying files to such a volume will lose the tags.

Most CLI utilities (e.g. cp, tar, rsync) won't copy xattrs without additional flags either, so unless your environment is 'All KDE all the time' and you only use Linux filesystems like ext4, XFS, or Btrfs (this is not a complete list), and you modify your backups to specifically include xattrs, your tags may get trashed one way or another.

Nepomuk (the previous KDE tagging/file metadata system) was used to store tags in a separate database, but even after many years of development, it could hardly be made to work performantly or reliably so it was replaced with Baloo.

In some ways using xattrs is 'the right place' to put this tagging info, but Linux doesn't have a 'core API' that would allow a 'xattrs preserved by default, and interpreted consistently' policy. Therefore there are a lot of ways to lose your tags. KDE has been trying to make this work for many years, but it is difficult given the way UNIX/POSIX has evolved.