This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

1. Configuration

For instructions on how to build Tracker from source, see the README.md file in the Git repo.

1.1. Environment Variables

All of the environment variables below can be seen in use in the tracker-sandbox.py script, which was written to show how Tracker can be run in an isolated case just by configuring environment variables.

1.1.1. Tracker Specific

There is a good summary of environment variables provided by the generated documentation as part of libtracker-sparql. Not all environment variables on the page in the above link apply to all binaries/components. For information about which environment variables apply to which binary, you can use the man pages on the terminal, e.g.  man tracker-store  or  man tracker-miner-fs  etc.

Environment Variable

Description

'TRACKER_DB_ONTOLOGIES_DIR'

Default is $PREFIX/share/tracker/ontology/. The location of the ontology is important because tracker-store will use this to check for database schema migrations on start up and if the database is non-existent, will use the ontology it finds here to create a new database.

'TRACKER_MINERS_DIR'

Default is $PREFIX/share/tracker/miners/. The miners directory has files per miner so the TrackerMinerManager knows about ALL miners and can easily contact them to get status/pause/resume/etc. If miners don't add the relevant files here, tracker-control is unable to control them.

'TRACKER_EXTRACTOR_RULES_DIR'

Default is $PREFIX/share/tracker/extractor-rules/. The extractor rules help tracker-extract know how to process different files and which extractors should handle which mime types.

'TRACKER_LANGUAGE_STOPWORDS_DIR'

Default is $PREFIX/share/tracker/stop-words/. Stop words are important when using the Full Text Search feature. They are a black list of common words (per locale) that we can avoid indexing. Words like 'the' for example. If you want to load stop words from another location, you can use this environment variable.

'TRACKER_FTS_STOP_WORDS'

Default is that this is unset. If it is set and has a value of 0 it means that stop words (words like 'the', 'is', etc) are indexed.

1.1.2. Others affecting Tracker binaries / components

Environment Variable

Description

'XDG_DATA_HOME'

Default is $HOME/.local/share/. Tracker stores the journals and logs in here under a 'tracker' subdirectory.

'XDG_CONFIG_HOME'

Default is $HOME/.config/. Tracker stores configuration files in here under a 'tracker' subdirectory, but ONLY if the 'TRACKER_USE_CONFIG_FILES' environment variable is defined.

'XDG_CACHE_HOME'

Default is $HOME/.cache/. Tracker stores the database and any cache in here under a 'tracker' subdirectory.

'XDG_RUNTIME_DIR'

This is used as the base directory relative to which user-specific non-essential runtime files and other file objects (such as sockets, named pipes, ...) should be stored. The directory MUST be owned by the user, and he MUST be the only one having read and write access to it. Its Unix access mode MUST be 0700.

'XDG_DATA_DIRS'

Default is $PREFIX/local/share/:$PREFIX/share/. It's used to know which directories to search for application data outside of $HOME.

'G_MESSAGES_DEBUG'

Tracker uses a lot of GLib debug logging calls. If this is not set (I use "all"), your tracker binaries won't show debug messages explaining what they are doing.

'DBUS_VERBOSE'

If set (to anything), DBus will be verbose about what it is doing when you run dbus-daemon.

1.2. How processes are started

1.2.1. Methods

The Tracker processes installed into $PREFIX/libexec (tracker-store, tracker-miner-fs, ...) can be started a number of ways.

The Tracker processes mentioned have desktop files which allow the binaries to be started when the computer starts. You can find the desktop files in the source code repository. The important key in those files is X-GNOME-Autostart-enabled which is technically an extension of the desktop file specification (there is a different key for KDE and other desktop environments. The default is to start these processes on computer start up. You can easily change this.

1.2.2. How should processes be started?

  1. tracker-miner-fs: Typically this is the main process that needs to be started (to ensure data population).

  2. tracker-store: Use of libtracker-sparql (which tracker-miner-fs uses heavily), ensures that tracker-store is started (for database checking, integrity, migration paths, etc). This process is only needed initially and for database updates. For simple queries, it's idle most the time (unless configured differently, see TRACKER_BACKEND environment variable).

  3. tracker-extract: This process listens for changes coming from the database and should be started early on because it reacts to changes from processes like tracker-miner-fs. It's not necessary though, it will discover all files that are unprocessed even if it wasn't started in time.

  4. tracker-writeback: If you would like data written back to files (for example tags in MP3s), you can start this process next.

1.3. GSettings / INI file

The settings are stored in data/gschema/* and have detail including acceptable values for each setting and a decent description of what each setting does. There is one schema per binary (usually):

$ cd data/gschemas
$ ls *.xml | sort | uniq
data/gschemas/org.freedesktop.Tracker.DB.gschema.xml
data/gschemas/org.freedesktop.Tracker.enums.xml
data/gschemas/org.freedesktop.Tracker.Extract.gschema.xml
data/gschemas/org.freedesktop.Tracker.FTS.gschema.xml
data/gschemas/org.freedesktop.Tracker.gschema.xml
data/gschemas/org.freedesktop.Tracker.Miner.Files.gschema.xml
data/gschemas/org.freedesktop.Tracker.Store.gschema.xml
data/gschemas/org.freedesktop.Tracker.Writeback.gschema.xml

A quick way to find out what settings are available on any given installed version of tracker is to use:

$ gsettings list-recursively | grep -i org.freedesktop.Tracker | sort | uniq
org.freedesktop.Tracker.DB journal-chunk-size 50
org.freedesktop.Tracker.DB journal-rotate-destination ''
org.freedesktop.Tracker.Extract max-bytes 1048576
org.freedesktop.Tracker.Extract max-media-art-width 0
org.freedesktop.Tracker.Extract sched-idle 'first-index'
org.freedesktop.Tracker.Extract verbosity 'errors'
org.freedesktop.Tracker.Extract wait-for-miner-fs false
org.freedesktop.Tracker.FTS enable-stemmer false
org.freedesktop.Tracker.FTS enable-unaccent true
org.freedesktop.Tracker.FTS ignore-numbers true
org.freedesktop.Tracker.FTS ignore-stop-words true
org.freedesktop.Tracker.FTS max-word-length 30
org.freedesktop.Tracker.FTS max-words-to-index 10000
org.freedesktop.Tracker.Miner.Files crawling-interval -1
org.freedesktop.Tracker.Miner.Files enable-monitors true
org.freedesktop.Tracker.Miner.Files enable-writeback true
org.freedesktop.Tracker.Miner.Files ignored-directories ['core-dumps', 'CVS', 'lost+found', 'po']
org.freedesktop.Tracker.Miner.Files ignored-directories-with-content ['backup.metadata']
org.freedesktop.Tracker.Miner.Files ignored-files ['*~', 'autom4te', '*.aux', 'confdefs.h', 'config.status', 'configure', 'confstat', 'conftest', '*.csproj', '*.gmo', '*.in', '*.la', 'libtool', '*.lo', '*.loT', 'ltmain.sh', '*.lzo', '*.m4', 'Makefile', '*.nvram', '*.o', '*.omf', '*.orig', '*.part', '*.pc', '*.po', '*.rcore', '*.rej', 'SCCS', '*.tmp', '*.vm*', '*.vmdk']
org.freedesktop.Tracker.Miner.Files index-on-battery false
org.freedesktop.Tracker.Miner.Files index-on-battery-first-time true
org.freedesktop.Tracker.Miner.Files index-optical-discs true
org.freedesktop.Tracker.Miner.Files index-recursive-directories ['&DESKTOP', '&DOCUMENTS', '&DOWNLOAD', '&MUSIC', '&PICTURES', '&VIDEOS']
org.freedesktop.Tracker.Miner.Files index-removable-devices false
org.freedesktop.Tracker.Miner.Files index-single-directories ['$HOME']
org.freedesktop.Tracker.Miner.Files initial-sleep 15
org.freedesktop.Tracker.Miner.Files low-disk-space-limit -1
org.freedesktop.Tracker.Miner.Files removable-days-threshold 3
org.freedesktop.Tracker.Miner.Files sched-idle 'first-index'
org.freedesktop.Tracker.Miner.Files throttle 0
org.freedesktop.Tracker.Miner.Files verbosity 'errors'
org.freedesktop.Tracker.Store graphupdated-delay 1000
org.freedesktop.Tracker.Store verbosity 'errors'
org.freedesktop.Tracker.Writeback verbosity 'errors'

1.4. System Resource Management

In the past, Tracker has been condemned for using too many resources on user's computers. There are a number of mechanisms in place which are employed to help prevent this including:

Other techniques tried and tested in the past (but not used in or by Tracker):


2024-10-23 10:59