Spotlight search with tracker

I have gotten spotlight search mostly working over AFP using tracker using these steps. AFP should be running before starting this.
Run the following as root:

yum -y install dconf dbus-x11 tracker<br>echo 'export XDG_DATA_HOME="/var/netatalk/";export XDG_CACHE_HOME="/var/netatalk/";export DBUS_SESSION_BUS_ADDRESS="unix:path=/var/netatalk/spotlight.ipc";' > ~/.tracker_profile<br>echo '[ -f ~/.tracker_profile ]&amp;&amp;. ~/.tracker_profile' >> ~/.bash_profile<br>. ~/.tracker_profile<br>gsettings set org.freedesktop.Tracker.Miner.Files index-recursive-directories "['/mnt2']"<br>dbus-daemon --session --fork --address="unix:path=$PREFIX/var/netatalk/spotlight.ipc"<br>tracker-control -s<br>sed -i '/\\[Global\\]/ aspotlight = yes' /etc/afp.conf<br>killall -HUP afpd

Tracker will start crawling and indexing your files and they should soon show up in spotlight searches. You can check the indexing status with ‘tracker-control -S’ or do a search of the index with 'tracker-search KEYWORD'

However, on reboot the index is empty and tracker does not try and reindex any of the files. If restarted with ‘tracker-control -ts’ tracker will start indexing the files from scratch and then all will work until next reboot. I am still investigation this, but think it might be that tracker is started before the shares are mounted so it just sees an empty directory and removes the files from its index.

I am interested in understanding this more. Thanks for sharing. Perhaps we can support this as a Rock-on

I do not have any experience with docker so I don’t know how plausible that is. Normally Netatalk starts tracker and communicated with it over d-bus.

Extra info is at and

Samba, which also has spotlight support, uses a similar but more complicated setup that runs tracker as its own user for security. I don’t know if it is currently possible to have both Samba and Netatalk running off the same instance of tracker. Hopefully Samba will eventually add MS-WSP so Windows boxes can also get indexed network search

Time to revive this. I’ve created an issue:

At the very least, we should look into supporting Samba spotlight.