Ubuntu – Dash is not searching all files

encryptionsearchunityunity-dash

I have two laptops running Ubuntu 13.04. The only difference between them is that one has an encrypted home folder and I guess it is the reason preventing the dash to index, search and display all files but the opened. I have already tried sudo updatedb as suggested here and elsewhere, and deleted the cache folder (as well as the program and config files) of USC as stated in a well reputed answer. After logout or reboot, the behavior is the same. Question is: how can I get the searching dash in the second case?

Laptop 1

enter image description here

Same search, laptop 2 (encrypted home)

enter image description here

Best Answer

The files scope relies on two main data sources to return results:

  1. Zeitgeist is used to return recently used files.
  2. The system locate database is used to search your entire home folder.

If you have chosen to encrypt your home folder, then your home folder will be an ecryptfs mount when you are logged in.

The default configuration for updating the locate database in /etc/updatedb.conf skips ecryptfs filesystems.

You can change this configuration by editing the PRUNEFS variable in that file, but note that this will leak the names of files in your home folder onto non-encrypted storage.

Unfortunately, I don't think there is currently a solution (beside this alternative) that will let you search your files in the dash and keep their metadata private.

If you add the command alias updatedb-home='export LOCATE_PATH="$HOME/mlocate.db" && updatedb -l 0 -o $HOME/mlocate.db -U $HOME' you then can run updatedb-home periodically to update db, or add it also to .bashrc to run it on every login.

Related Question