Skip to content

Instantly share code, notes, and snippets.

@DanyHenriquez
Created June 7, 2016 10:20
Show Gist options
  • Save DanyHenriquez/75d612cebc9300f83bc74830df3a6410 to your computer and use it in GitHub Desktop.
Save DanyHenriquez/75d612cebc9300f83bc74830df3a6410 to your computer and use it in GitHub Desktop.
Disable tracker Ubuntu 16.04
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-extract.desktop
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-miner-apps.desktop
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-miner-fs.desktop
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-miner-user-guides.desktop
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-store.desktop
gsettings set org.freedesktop.Tracker.Miner.Files crawling-interval -2
gsettings set org.freedesktop.Tracker.Miner.Files enable-monitors false
tracker reset --hard
@davidfoerster
Copy link

Why not simply

echo -e "\nHidden=true\n" | sudo tee --append /etc/xdg/autostart/tracker-extract.desktop /etc/xdg/autostart/tracker-miner-apps.desktop /etc/xdg/autostart/tracker-miner-fs.desktop /etc/xdg/autostart/tracker-miner-user-guides.desktop /etc/xdg/autostart/tracker-store.desktop > /dev/null

No need to invoke tee multiple times on the same input.

@xemle
Copy link

xemle commented Jul 17, 2017

Or even shorter

echo -e "\nHidden=true\n" | sudo tee -append /etc/xdg/autostart/tracker-{extract,miner-apps,miner-fs,miner-user-guides,store}.desktop > /dev/null

@xemle
Copy link

xemle commented Jul 17, 2017

Or replacing existing values or insert value by

sudo sed -i -e '/Hidden=/{s/.*/Hidden=true/;:a;n;:ba;q}' -e 'aHidden=true' /etc/xdg/autostart/tracker-{extract,miner-apps,miner-fs,miner-user-guides,store}.desktop

@adamesss
Copy link

adamesss commented Mar 21, 2018

correction to xemle's code replaced '-' with '--' in front of append...

echo -e "\nHidden=true\n" | sudo tee --append /etc/xdg/autostart/tracker-{extract,miner-apps,miner-fs,miner-user-guides,store}.desktop > /dev/null

then:

gsettings set org.freedesktop.Tracker.Miner.Files crawling-interval -2
gsettings set org.freedesktop.Tracker.Miner.Files enable-monitors false

tracker reset --hard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment