1

Unity dash is no longer searching for files since I encrypted the drive and reinstalled Ubuntu (I'm not sure if this is the cause).

Searching for files usually shows me results from 'Recent' files if I have usage history enabled but that's not what I'm after.

Sometimes searching for a file gives me no results, like so: (this file is on my secondary drive /mnt/...) search

Sometimes it does return results: (note that all these files are also on the same drive /mnt/...)

**Edit: These files are actually in the 'Recent' category even though I have history disabled and cleared, in Privacy settings. Odd. Which means that in fact NO files are being found appart from the history.

search2

Files on my main drive are also omitted.

It does however seem to be finding folders just fine:

desktop

This wasn't happening before I reinstalled Ubuntu 16.04LTS with encryption (both system and /home). But I'm not sure if that's the cause.

I tried changing /etc/updatedb.conf, removing ecryptfs and sudo updatedb as suggested in some other questions but that hasn't worked either.

This is the original content of the updatedb.conf file:

PRUNE_BIND_MOUNTS="yes"

# PRUNENAMES=".git .bzr .hg .svn"
PRUNEPATHS="/tmp /var/spool /media /home/.ecryptfs /var/lib/schroot"

PRUNEFS="NFS nfs nfs4 rpc_pipefs afs binfmt_misc proc smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs mfs shfs sysfs cifs lustre tmpfs usbfs udf fuse.glusterfs fuse.sshfs curlftpfs ecryptfs fusesmb devtmpfs"

P.S. Also, I'd like to know if there is a way to remove the recent files altogether. Since I have cleared and disabled the privacy settings and they still show up.

  • Congratulations on writing an answer to your own question :)! – user595510 Oct 17 '16 at 12:24
2

After some reading, I found out that in fact Unity dash doesn't scan all the files on the system, it mostly uses the zeitgeist code to look through recently used files and applications. This means that the recent files that I'm seeing is actually an intended result.

By disabling 'Record file and application usage' in Privacy settings I'm disabling zeitgeist and recently used files no longer show up in the main dash lens. Also, the 'Recent' section in nautilus becomes disabled.

Some have mentioned that the newest versions of Ubuntu also use locate to locate files through the dash. I installed the locate package which seems to have been missing on my system. and I don't know if I'm seeing a difference. However searching for an exact name does seem to produce a result (e.g myfilesomewhere.odt)

I'll update this answer as I learn more about the dash functionality.

  • What versions use locate? I was puzzled for a long time about why a certain PDF never showed up in the dash results despite multiple openings, then discovered this was because zeitgeist doesn't log events from Okular. However, the file is found with locate "$FILENAME". Opening the file in evince does cause it to show up subsequently in dash and gnome-activity-journal, and I'm on Ubuntu 16.04. – tsbertalan Nov 21 '18 at 18:09
0

The problem is with your configuration:

The likely source of your issue is the PRUNEFS entry.

PRUNEFS

A whitespace-separated list of file system types (as used in /etc/mtab) which should not be scanned by updatedb(8). The file system type matching is case-insensitive. By default, no file system types are skipped.

When scanning a file system is skipped, all file systems mounted in the subtree are skipped too, even if their type does not match any entry in PRUNEFS.

A less likely possibility is:

PRUNE_BIND_MOUNTS

One of the strings 0, no, 1 or yes. If PRUNE_BIND_MOUNTS is 1 or yes, bind mounts are not scanned by updatedb(8). All file systems mounted in the subtree of a bind mount are skipped as well, even if they are not bind mounts. As an exception, bind mounts of a directory on itself are not skipped.

By default, bind mounts are not skipped.

NOTE:
       The accompanying locate(1) utility was designed to be compatible to slocate and attempts to be compatible to  GNU  locate
       where possible.  This is not the case for updatedb.

Sources:

https://linux.die.net/man/5/updatedb.conf

https://unix.stackexchange.com/questions/198590/what-is-a-bind-mount

  • Thanks for the response, I tried to play around with the updatedb.conf file again but nothing seems to work. I've even went as far as to delete everything in the PRUNEFS section and still nothing. I also tried changing the PRUNE_BIND_MOUNTS to 0 and that also hasn't worked. (After updating the file I type 'sudo updatedb' in the terminal, don't know if that's enough) Also your answer says "The file system type matching is case-insensitive" but yet there is an entry called 'NFS' and 'nfs' by default. All that ever shows up in the dash is the recent files which I can't disable. – Rtsne42 Oct 14 '16 at 3:31
  • Yes, I see that but according to the man page those entries are redundant. – Elder Geek Oct 14 '16 at 13:12
  • updatedb creates or updates a database used by locate. So, in this way, locate will access that partition which was previously excluded in /etc/updatedb.conf. But Zeitgeist (which is a quite different thing and has nothing to do to locate) will only show previously accessed files and folders (I think there are some exceptions: $HOME folders and Desktop files are shown directly — as I tested in Synapse launcher). On the other hand, the Dash search is using locate I guess, and not just Zeitgeist. – cipricus Oct 14 at 10:22
  • @cipricus Expanded answer. – Elder Geek Oct 15 at 13:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.