LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 07-16-2020, 10:39 AM   #1
linuxUser247
Member
 
Registered: Jan 2019
Posts: 80

Rep: Reputation: Disabled
How to disable tracker globally in Ubuntu 20.04


tracker behaves very noisy on my system. I do not want to remove tracker from my system, I want to disable it.

I am using Ubuntu 20.04 Desktop with gnome DE. My Search has been disabled in settings and I repeated this step for every existing user account.

Now, I want to prevent repeating these steps for every user account I create in the future. I want to globally disable tracker for every user. I want the user opt into Search by himself.


The solution for this
Quote:
Comments and Discussion

How to disable tracker globally :

Disabling tracker for globally (for all users)
Edit /etc/xdg/autostart/trackerd.desktop file with root priviledges (sudo vim, gksudo gedit ...)
Add "Hidden=true" to the end of the file
Do the same for /etc/xdg/autostart/tracker-applet.desktop if you want

- Gokdeniz Karadag
Source.

The file does not exist.

Code:
ls /etc/xdg/autostart/tracker-*
/etc/xdg/autostart/tracker-extract.desktop
/etc/xdg/autostart/tracker-miner-fs.desktop
/etc/xdg/autostart/tracker-store.desktop

So I assume I simply prepend "Hidden=true" on these files, instead.

Is this about right? And why do I have to set it hidden instead of X-GNOME-Autostart-enabled=false.

This seems counter-intuitive. I want to disable it, not hide that's enabled
 
Old 07-16-2020, 10:49 AM   #2
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
From the Desktop Entry Specification:
Quote:
Hidden should have been called Deleted. It means the user deleted (at his level) something that was present (at an upper level, e.g. in the system dirs). It's strictly equivalent to the .desktop file not existing at all, as far as that user is concerned. This can also be used to "uninstall" existing files (e.g. due to a renaming) - by letting make install install a file with Hidden=true in it.
BTW, I usually disable Tracker for the current user only with
Code:
systemctl --user mask tracker-{miner-apps,miner-fs,store}

Last edited by shruggy; 07-16-2020 at 10:53 AM.
 
2 members found this post helpful.
Old 07-16-2020, 11:03 AM   #3
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: FreeBSD
Posts: 2,252

Rep: Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011
Don't edit the files under /etc/xdg/autostart or they will be overwritten on updates. You can copy them to your /home under .config or .local (can't remember) and edit those copies but I like shruggy's suggestion better.
 
1 members found this post helpful.
Old 07-16-2020, 12:03 PM   #4
linuxUser247
Member
 
Registered: Jan 2019
Posts: 80

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by shruggy View Post
BTW, I usually disable Tracker for the current user only with
Code:
systemctl --user mask tracker-{miner-apps,miner-fs,store}

Quote:
Originally Posted by sevendogsbsd View Post
Don't edit the files under /etc/xdg/autostart or they will be overwritten on updates. You can copy them to your /home under .config or .local (can't remember) and edit those copies but I like shruggy's suggestion better.
thank you for your reply. Both solutions are applied on a user level. When I create a new user I want it automatically with search disabled.

So, I think a good solution would be to apply steps for user only in /etc/skel:

Quote:
Disabling tracker for your user only
Enter the directory "~/.config/autostart", create it if it does not exist
Create a file named trackerd.desktop
Paste the following into the file, save and exit

[Desktop Entry]
Encoding=UTF-8
Name=Tracker
Hidden=true

but I assume before listed `tracker-*.desktop` files should be used, instead, as suggested by @sevendogsbsd.


tracker causes several internal error of different kind, one of which is a memory leak
it pollutes my journal logs
it complains about PNG files with JPEG file extension
it runs in the background for multiple user, even so the user is already logged out

I should probably do something about my PNG images but I am too lazy to do it now. Someday, maybe, but thanks for the reminder . Plus, I don't like my files being scanned, I have a fast SSD and a good partition scheme. I don't think I even need a tracker at all.

Last edited by linuxUser247; 07-16-2020 at 12:05 PM.
 
Old 07-16-2020, 12:18 PM   #5
linuxUser247
Member
 
Registered: Jan 2019
Posts: 80

Original Poster
Rep: Reputation: Disabled
wait, tracker is still running even so I disabled it completely, just like claimed here.

I can see /usr/libexec/tracker-miner-fs in htop for every user after a reboot even so I never logged into any of them. So I guess the only option is to disable it forever:

and it is indeed running:

Code:
tracker status
Currently indexed: 254 files, 9 folders
Remaining space on database partition: 10.8*GB (51.56%)
All data miners are idle, indexing complete
Code:
systemctl --user unmask tracker-store.service tracker-miner-fs.service tracker-miner-rss.service tracker-extract.service tracker-miner-apps.service tracker-writeback.service
but then, nobody can ever enable it if he wanted to. I don't feel very sorry about this.

Edit: this command gives me an error: Failed to connect to bus: No such file or directory

Last edited by linuxUser247; 07-16-2020 at 12:19 PM.
 
Old 07-16-2020, 12:33 PM   #6
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: FreeBSD
Posts: 2,252

Rep: Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011
I have never found a use for tracker, other than taking up CPU cycles. The times I've used desktops that had tracker, I have disabled it as well. I think in the latest iteration, you can't actually disable it completely but it does not scan or accumulate data to its DB.
 
Old 07-16-2020, 01:23 PM   #7
linuxUser247
Member
 
Registered: Jan 2019
Posts: 80

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by linuxUser247 View Post
wait, tracker is still running even so I disabled it completely, just like claimed here.

I can see /usr/libexec/tracker-miner-fs in htop for every user after a reboot even so I never logged into any of them. So I guess the only option is to disable it forever:

and it is indeed running:

Code:
tracker status
Currently indexed: 254 files, 9 folders
Remaining space on database partition: 10.8*GB (51.56%)
All data miners are idle, indexing complete
Code:
systemctl --user unmask tracker-store.service tracker-miner-fs.service tracker-miner-rss.service tracker-extract.service tracker-miner-apps.service tracker-writeback.service
but then, nobody can ever enable it if he wanted to. I don't feel very sorry about this.

Edit: this command gives me an error: Failed to connect to bus: No such file or directory
quick update: the solution in this quote does not work system wide, it has to be applied on every user (once). This is also the reason why it did not work - I was running it with sudo!

also, I was confusing tracker status with sudo tracker status, which give different result.

I completely disabled Search in the GUI, cleared tracker cache with and without sudo and rebooted. Yet, the tracker does scan and accumulate data to its DB:

Code:
tracker status
Currently indexed: 254 files, 9 folders
Remaining space on database partition: 10.8*GB (51.56%)
All data miners are idle, indexing complete
So, using the GUI does not work at all. Also, it is searching all of my files and thus also ignoring my preferred search locations. I would think that using the tracker*.desktop in autostart doesn't work, either - however, I cannot confirm this yet because my logs tell me that I did something wrong:

Code:
gnome-session[1909]: gnome-session-binary[1909]: WARNING: Could not parse desktop file tracker-miner-fs.desktop or it references a not found TryExec binary
gnome-session-binary[1909]: WARNING: Could not parse desktop file tracker-miner-fs.desktop or it references a not found TryExec binary
gnome-session[1909]: gnome-session-binary[1909]: WARNING: Could not parse desktop file tracker-store.desktop or it references a not found TryExec binary
gnome-session-binary[1909]: WARNING: Could not parse desktop file tracker-store.desktop or it references a not found TryExec binary
gnome-session[1909]: gnome-session-binary[1909]: WARNING: Could not parse desktop file tracker-extract.desktop or it references a not found TryExec binary
gnome-session-binary[1909]: WARNING: Could not parse desktop file tracker-extract.desktop or it references a not found TryExec binary
Code:
ls -la .config/autostart/tracker*
-rw-r--r-- 1 user1 user1 56 Jul 16 18:44 .config/autostart/tracker-extract.desktop
-rw-r--r-- 1 user1 user1 56 Jul 16 18:44 .config/autostart/tracker-miner-fs.desktop
-rw-r--r-- 1 user1 user1 56 Jul 16 18:44 .config/autostart/tracker-store.desktop
Code:
cat .config/autostart/tracker-extract.desktop 
[Desktop Entry]
Encoding=UTF-8
Name=Tracker
Hidden=true

I am running out of time now, more on this tommorwo.
 
Old 07-16-2020, 01:44 PM   #8
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Quote:
Originally Posted by linuxUser247 View Post
Code:
cat .config/autostart/tracker-extract.desktop 
[Desktop Entry]
Encoding=UTF-8
Name=Tracker
Hidden=true
You probably should include the Exec key in your .desktop file. While specification lists the key as not required, it also notes that some implementations expect it to always be present.
 
Old 07-17-2020, 08:56 AM   #9
linuxUser247
Member
 
Registered: Jan 2019
Posts: 80

Original Poster
Rep: Reputation: Disabled
I added Exec and fixed the desktop files. I can confirm now that the tracker is still working with these (indexing files in all locations).

Using systemctl method does work only once (permanent, but only for one user). If you have multiple user accounts tracker is still working for all other accounts.
 
Old 07-17-2020, 09:04 AM   #10
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: FreeBSD
Posts: 2,252

Rep: Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011
If you eliminate the "--user" flag from the systemctl call, does it work globally?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to disable tracker, but be able to recover from it DJOtaku Linux - Desktop 0 02-05-2015 12:44 AM
how to disable automount globally(via console no gnome!)? [debian/raspbmc] inv|s|ble Linux - Newbie 0 11-15-2014 08:44 AM
"tracker" is filling up a filesystem. How to disable it from running? rnturn Linux - Desktop 3 08-19-2014 02:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 11:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration