The files scope relies on two main data sources to return results:
- Zeitgeist is used to return recently used files.
- 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
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.
Your last comment says, you actually wanted to prevent users from seeing all hidden files (those starting with
.). This is not possible in Linux and this will never going to help in security.
Because Linux uses .hidden files almost everywhere, even a users shell configuration is stored in hidden files (such as
.zshrc etc). If you remove the read permission from it, all users settings will be removed.
Take another example. Firefox uses
.mozilla directory for a user in their home. If you remove read permission, firefox will not function normally. You can remove execution bit from the directory, but it won't prevent users seeing the name of the .mozilla directory, though they can't access further.
You might be thinking that the purpose of those .hidden files are security, but it isn't. The main goal of not showing files/dirs starting with
. is cleanliness. The thought was a user only need to see those files who s/he uses regularly.
So, the only way to revoke standard users' seeing permission is, using Linux standard permission settings. See these questions
Prevent Ctrl-H from showing hidden files.
If you want to still prevent users from using Ctrl-H, you can apply a trick. Setting a bogus command for that same keyboard shortcut.
To do so in Unity, Go to the System Settings -> Keyboard. In the Shortcut tab, click Custom Shortcut and then the + button. Set anything as the
name field and in the
/bin/bash -c "echo". Click apply.
Then click on the shortcut name at the right end and press Ctrl-H. This will override the shortcut and you can't see hidden files by using shortcut.
Note As I already said, this will not prevent users from seeing hidden files by using menu options or other means.
This is a known issue with the current implementation of Zeitgeist in Natty & Oneiric - the software that drives the Dash searching capability.
Zeitgeist Privacy has finally landed in 12.04 (Precise) - it has not been backported to Natty or Oneiric.
By default, privacy hides hidden files. That's the good news.
However, if you have got your files in a hidden folder then those files are not hidden.
Thus to hide a hidden folder and its contents you need to explicitly hide that folder.
To do this, launch Privacy from the System Settings
Click the button shown and this will show the directory window
Navigate to the folder below where the hidden folder is located.
Press CTRL+L to reveal the location bar and enter the name of your hidden folder.
Once you select the OK button, no further activity will be recorded in your hidden folder.
To remove current activity, use the linked question for further help.