152

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.

1

11 Answers 11

138
+200

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 Dash enter 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 here enter image description here enter 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
10
  • 5
    Gnome Activity Journal is not Zeitgeist so you should explain he has to install Activity Journal first. Mar 8, 2011 at 21:49
  • 3
    We are working on a new blacklist manager. When it comes out by version 0.9, you will have great control over what you want to blacklist and what not Mar 24, 2011 at 20:27
  • 1
    I found a not so nice side effect: If you really want to hide something, this is not sufficient: Every time Zeitgeist can't write an entry because of the blacklist, it is logged in ~/.cache/zeitgeist/daemon.log
    – tobi
    May 11, 2011 at 16:48
  • 2
    The blacklist manager plugin doesn't appear to exist in Ubuntu 11.10. Oct 17, 2011 at 22:16
  • 1
    This no longer works in 13.04, despite being blacklisted, items still show up in the Dash.
    – user99306
    Sep 28, 2013 at 18:12
25

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

2
  • 1
    The blacklist plugin mentioned in the accepted answer did not work for me, but this solution did.
    – Jay
    Aug 15, 2011 at 12:29
  • @Jay The rm solution will delete all your history and not just recent files. Oct 28, 2011 at 11:49
6

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)

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 :)

3
  • Does this still work? I don't know from where all does Unity get it's file list. Oct 28, 2011 at 11:50
  • 2
    Yes, that is important for the file dialog in nautilus. An alternative is to use the blacklist manager ssokolow.com/gtk-recent-scrubber
    – Bazon
    Aug 4, 2012 at 8:46
  • I think I've had problems with just replacing it by a folder (it removed it or so). What works reliably is sudo chattr +i ~/.local/share/recently-used.xbel. Though that doesn't help with Zeitgeist.
    – pcworld
    Dec 23, 2013 at 19:27
2

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.

2

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.
1

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.

1

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. )

1

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

0

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
1
  • Unity does not use recently-used.xbel AFAIK. Correct me if I am wrong. Oct 18, 2011 at 4:43
0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .