Ubuntu: How can I keep recent files from appearing in Unity?



Question:

I sometimes browse erotic media files but I would like to avoid having them appear in files & folders / recent. How can I do that?

The old "making .recently-used.xbel a folder" trick from 10.10 and older doesn't work any more.

Plus I'd prefer to turn off tracking only temporarily.

I also prefer not to use a separate user for this, as switching users sometimes isn't fast enough.


Solution:1

Method 1: Using Activity Log Manager

Ubuntu Precise 12.04

In Ubuntu Precise Activity Log Manager 0.9 is included by default. It can be accessed from System Settings or just by looking for Privacy.

Finding Activity Log Manager in Dashenter image description here

Or you can simply type Privacy in Dash

enter image description here

Now you can start blacklisting applications. Screenshots

enter image description hereenter image description hereenter image description here


Activity Log Manager in Oneiric and first release

You can install Activity Log Manager from the Stable PPA.

For more details about Activity Log Manager you should check out the article on OMG! Ubuntu! and article on Webupd8

A new version of Activity Log Manager is in development which looks better and is simpler to use. A screenshot of the unreleased Activity Log Manager

Unreleased Activity Log Manager screenshot


Method 2: Using Gnome Activity Journal

You can do it, provided that there is some pattern in the files. For example you have kept all your explicit content in folder /home/mrpig/erotica/ folder.

Then open Activity Journal which is a GUI frontend to Zeitgeist which acts as a Dashboard showing your recent activities. On top right Zeitgeist Icon, click it and Preferences. Check "Blacklist Manager" plugin

Then goto "BlackList Manager" tab. Click on New button, and then edit the new entry which comes as file:///home/mrpig/erotica/*


Linked Question:

  1. Hidden files are shown in Dash


Solution:2

There is a way to do it, but it will clear all the other recent files as well.

All you have to do is run the following commands:

rm ~/.local/share/zeitgeist/activity.sqlite  zeitgeist-daemon --replace  

Edit zeitgiest/activity.sqlite no longer exists on my system:

rm ~/.local/share/zeitgeist  zeitgeist-daemon --replace  

It takes a moment, but it repopulates as the daemon starts.

Update: Activity Log Manager has been released. This is a GUI tool that allows you to tweak the Zeitgeist history: you can delete part of the Zeitgeist history, blacklist some applications or prevent logging certain types of files as well as blacklist folders.

Install it using the commands below:

sudo add-apt-repository ppa:zeitgeist/ppa  sudo apt-get update  sudo apt-get upgrade  zeitgeist-daemon --replace  sudo apt-get install activity-log-manager  

I've recorded a video demoing Activity Log Manager here: http://www.youtube.com/watch?v=-eQn7ZyfSlw


Solution:3

Just rename the folder after browsing. After you renamed it, the files in there won't show up in unity recent files. Pretty easy solution, just make sure you don't forget it every time you use that folder :)

(Sry for my english)


Solution:4

The old "making .recently-used.xbel a folder" trick does work, but now the file is in ~/.local/share so:

$ rm ~/.local/share/recently-used.xbel  $ mkdir ~/.local/share/recently-used.xbel  

...works for me :)


Solution:5

Zeitgeist's developers are working on Zeitgeist Global Privacy. It will allow to remove part of Zeitgeist history (last hour, week, etc), blacklist an application or file type from the history and exclusion of a folder from the history. A few screenshots are provided in the linked blog post.


Solution:6

The answer pointing to the activity log manager is true for zeitgeist. But zeitgeist is not the only way the system keeps track of recently used files. Some applications still use the old method, where access to folders and files is written to a central log file located at ~/.local/share/recently-used.xbel. This older activity logger is called GtkRecentManager. You can read more about the interplay between zeitgeist and its older counterpart here.

In contrast to zeitgeist, there is no official GNOME tool for GtkRecentManager that would allow controlling what get's logged and what doesn't. However, as Bazon pointed out in a comment above there is a third-party solution which does the job quite well:

GTK+ Recent Files Scrubber by ssokolow

From the project page:

So, you keep running for GNOME to wipe your recent files list and, sooner or later, you decide that it'd be easier to just turn it off altogether and that you wouldn't really be losing anything in the process.

This tool takes a slightly different approach inspired by the HistoryBlock extension for Firefox. With this scrubber, you give it a list of places that you don't want to show up in your recent files list, then you get on with your life. (And it does its job discreetly.)

The scrubber will sit in the background, waiting for new files to appear in the list. If they match any of the entries in your blacklist, it kicks them back out. No fuss, no muss. You just set it and forget it.

The tool only offers a CLI interface but is comparatively easy to use. Instructions can be found on the project page and CLI help:

$ gtk_cleanup.py --help     Usage: gtk_cleanup.py [options]    A simple little tool which watches GTK+'s global recent files list and  removes anything that matches a hashed blacklist of URI prefixes.    Options:    --version             show program's version number and exit    -h, --help            show this help message and exit    -v, --verbose         Increase the verbosity. Use twice for extra effect.    -q, --quiet           Decrease the verbosity. Use twice for extra effect.      Resident-Compatible Actions:      --purge             Purge all Recently Used entries during the initial                          scrub.      --config=FILE       Specify a non-default config file      Non-Resident Actions:      -a URI, --add=URI   Add URI to the list of blacklisted prefixes.      -r URI, --remove=URI                          Remove prefixes from the blacklist which match URI      --once              Don't become resident. Just scrub and exit.  


Solution:7

What I do is, I just rename the folder, add a _ at the end and it is gone from the list. But providing a Clear recent history windows should not be that difficult.


Solution:8

for Ubuntu 11.10 (Oneiric) + Unity (3D)

[Adapted from Alin Andrei (answer).]

UPDATED: Safer method of stop, erase, re-start (for Zeitgeist)

step 1. get the tools

sudo add-apt-repository ppa:zeitgeist/ppa  sudo apt-get update    sudo apt-get install activity-log-manager  

step 2. set files/directory activity to ignore.

'Activity Log Manager' >> Files >> Prevent logging files :    (Select folder) /home/$username/Private  [Add]           -  private folders  (Select folder) /home/$username/install/image  [Add]     -  Ubuntu .ISO files    (Close)  

step 3. clear ALL history [safe method]

zeitgeist-daemon --quit    ls -l ~/.local/share/zeitgeist/    sudo rm ~/.local/share/zeitgeist/activity.sqlite.bck  (if present)  sudo rm ~/.local/share/zeitgeist/activity.sqlite-journal  (if present)  sudo rm ~/.local/share/zeitgeist/activity.sqlite  

step 4. restart Zeitgeist [safe method]

zeitgeist-daemon &  

( The ampersand '&' allows process to run in background. )


Solution:9

Using a GUI Method:

  1. Click on the Home Icon on the Left Tool Bar which opens Nautilus in your Home directory.
  2. Under View on the Top Tool Bar make sure Show Hidden Files is checked.
  3. Now using Nautilus navigate to .local/share.
  4. Optional: if you don't like to type: highlight the file: recently-used.xbel then right click and choose Rename then copy the entire file name of recently-used.xbel by using either Ctrl+c or Ctrl+Insert
  5. Now Delete the file: recently-used.xbel
  6. In a blank area of the current folder right click and choose Create Document/Empty File
  7. Rename the default filename: new file to recently-used.xbel by either typing it or if you followed step 4 Paste by Ctrl+V or Shift+Insert the name so the new file appears as recently-used.xbel


Solution:10

For unity simply delete zeitgeist folder from .local/share/ and you will not see your recently used files again


Solution:11

You can use sed to edit the recent history at ~/.local/share/recently-used.xbel.

private_path=~/"some/private/path" # Your private directory or file here  echo "Removing from recent history: $private_path"  sed -i "\@<bookmark.*$private_path.*>@, \@</bookmark>@ d" ~/.local/share/recently-used.xbel  

Command explanation:

  • -i edit file in-place
  • \@ custom regex delimiter
  • \@<bookmark.*$private_path.*>@, \@</bookmark>@ d delete lines from the opening bookmark tag with $private_path to the closing bookmark tag

Tested working on 14.04


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »