Disable file indexing in disposable qubes

Original forum link
https://forum.qubes-os.org/t/20747
Original poster
Bearillo
Editors
Bearillo
Created at
2023-09-04 01:09:01
Last wiki edit
2023-11-02 16:38:34
Revisions
2 revisions
Posts count
12
Likes count
6
Tags
configuration

File indexing (e.g. via tracker3 on Debian) uses quite a few resources and is pretty useless in a DVM qube, such as sys-usb, or other disposables that storage devices are attached to, as the tracker will have to start over every time the qube is started and it's activity may block certain operations, e.g. dismounting veracrypt volumes. Therefore it may be useful to just turn file indexing off for those qubes:

In your DVM-template (e.g. debian-12-dvm, fedora-38-dvm etc.; I tested this for Debian 12 and Fedora-38) start a terminal and run the following commands:

systemctl --user mask tracker-extract-3.service tracker-miner-fs-3.service tracker-miner-rss-3.service tracker-writeback-3.service tracker-xdg-portal-3.service tracker-miner-fs-control-3.service

and then

tracker3 reset -s -r

and then shut down the DVM-template. Be sure that you did this in the DVM-template, e.g. debian-12-dvm, and not in the base template, e.g. debian-12!

The next time a DVM-based qube, e.g. sys-usb starts, it won't have tracker3 running (you can verify this by running tracker3 status inside a disposable qube after shutting down the DVM-template). Note that from QubesOS 4.2 onward file-indexing will be disabled by default in all serviceVMs, such as sys-usb and sys-firewall, but not in "normal" disposable qubes.

Important caveat: tracker3 does more than just file indexing, e.g. it helps with search and rename, but so far for me normal search, including in nautilus still works, so I guess it just impedes faster search for lots of data, which is not a typical use case for a DVM qube, since that qube would realistically have to run for a long time in order for this to have productivity enhancing effects.