Baeldung Pro – Linux – NPI EA (cat = Baeldung on Linux)
announcement - icon

Learn through the super-clean Baeldung Pro experience:

>> Membership and Baeldung Pro.

No ads, dark-mode and 6 months free of IntelliJ Idea Ultimate to start with.

1. Introduction

GNOME Tracker is a powerful tool for indexing and searching files on the GNOME desktop environment. While useful, it can consume significant system resources. So, disabling GNOME Tracker might be a viable option if performance is a priority. It’s also relevant when indexing features are unnecessary for our workflow.

In this tutorial, we’ll walk through the process of properly disabling GNOME Tracker, ensuring that our system runs smoothly without unwanted background processes.

2. Understanding GNOME Tracker

Before diving into the steps to disable GNOME Tracker, it’s essential to understand what it does. GNOME Tracker is a file indexer and search tool that helps quickly locate files and content on the system. It continuously monitors and indexes files, creating a database that allows for fast searches.

However, this continuous monitoring can lead to high disk usage, particularly on older systems or those with limited resources. Therefore, if the Tracker is causing the system to slow down or if the features aren’t needed, disabling them might be the best course of action.

3. Checking the Current Status of GNOME Tracker

Before disabling GNOME Tracker, it’s a good idea to check whether it’s running on the system. We can check the status of the service using systemctl:

$ systemctl --user status tracker-miner-fs-3.service
● tracker-miner-fs-3.service - Tracker file system data miner
     Loaded: loaded (/usr/lib/systemd/user/tracker-miner-fs-3.service; enabled; preset: enabled)
...
     CGroup: /user.slice/user-1001.slice/[email protected]/background.slice/tracker-miner-fs-3.service
             └─4196 /usr/libexec/tracker-miner-fs-3

Aug 14 00:21:39 hackterminux tracker-miner-fs-3[166448]: (tracker-extract-3:166448): GLib-GIO-WARNING **: 00:21:39.298: Error creating IO channel for /proc/self/mountinfo: Invalid ar>
Aug 14 00:22:39 hackterminux tracker-miner-fs-3[166478]: (tracker-extract-3:166478): GLib-GIO-WARNING **: 00:22:39.301: Error creating IO channel for /proc/self/mountinfo: Invalid ar>
...
lines 1-20/20 (END)

The output indicates that this service is running and active, meaning it’s currently indexing files on our system.

4. Disabling GNOME Tracker

There are three layers to disabling GNOME Tracker. We can stop the Tracker services, then prevent Tracker from starting automatically when the system boots, and we can mask the Tracker services.

4.1. Stop the Tracker Services

To begin with, let’s stop the running Tracker services:

$ systemctl --user stop tracker-miner-fs-3.service

This command stops the file indexing and storage services, effectively halting GNOME Tracker’s operations.

4.2. Disable Tracker From Starting at Boot

Next, we can prevent the Tracker from starting automatically when our system boots:

$ sudo systemctl --global disable tracker-miner-fs-3.service
Removed "/etc/systemd/user/gnome-session.target.wants/tracker-miner-fs-3.service".

This command removes the symbolic link for tracker-miner-fs-3.service from the gnome-session.target.wants directory. So, the service won’t start automatically when a GNOME session begins.

4.3. Mask the Tracker Services

For an extra layer of assurance, we can mask the Tracker services. Therefore, let’s mask the service to make it impossible to start the service manually or automatically:

$ systemctl --user mask tracker-miner-fs-3.service
Created symlink /home/gbenga/.config/systemd/user/tracker-miner-fs-3.service → /dev/null.

The command creates a symbolic link from the user service directory to /dev/null. This effectively disables the tracker-miner-fs-3.service by preventing it from being started or activated in any way.

5. Verifying GNOME Tracker Status

After disabling and masking the service, let’s confirm that GNOME Tracker is no longer running. To illustrate this, let’s check the status of the service:

$ systemctl --user status tracker-miner-fs-3.service
○ tracker-miner-fs-3.service
     Loaded: masked (Reason: Unit tracker-miner-fs-3.service is masked.)
     Active: inactive (dead)

Aug 14 01:12:05 hackterminux systemd[3333]: tracker-miner-fs-3.service: Consumed 2min 56.>
...
Aug 14 02:28:44 hackterminux systemd[3333]: Stopping tracker-miner-fs-3.service...
Aug 14 02:28:44 hackterminux systemd[3333]: Stopped tracker-miner-fs-3.service.

The systemctl –user status tracker-miner-fs-3.service command shows that the system has masked and deactivated tracker-miner-fs-3.service.

6. Conclusion

In this article, we’ve detailed the process of disabling GNOME Tracker to help optimize system performance, especially on lower-end hardware. By following the outlined steps, we can effectively halt GNOME Tracker’s background processes, freeing up valuable system resources and maintaining smooth operation.