Ubuntu Guide For Windows Users: Clear And Disable Recent Documents

19

ubuntulogo.jpgOk, you made the switch over to Ubuntu from Windows, everything thing is going good, and now you want to do some familiar things like hide your tracks and disable the recent documents folder.

Clearing them out is easy, just click on Places on the top panel menu, and select Recent Documents \ Clear Recent Documents and click on the Clear button when prompted.

ubrecentdocs1.png

The list of recently access documents will be deleted (not the documents themselves). But now you want to disable the view completely.

NOTE: The following steps was tested on Ubuntu 8.04 (Hardy Heron) and may not work properly on previous versions.

To disable, open up a Terminal window by clicking on Application \ Accessories \ Terminal from the top panel menu and enter the following set of commands:

rm ~/.recently-used.xbel

followed by…

touch ~/.recently-used.xbel

…one more (after entering the following command, you will be prompted to enter your password)

sudo chattr +i ~/.recently-used.xbel

Next, clear the Recent Documents list as described above.

Now when you check Places \ Recent Documents again, it should now be greyed out and disabled.

ubrecentdocs2.png

No more displaying "those" recently viewed documents (..aahem).

To explain what occurred to disable Recent Documents using the above set of commands:

  • We first removed the file recently-used.xbel (located in the root of your Home directory by using the rm command (this file is used to store the list of documents)
  • Next we re-created the file using the touch command.
  • Then we changed the attribute of the file to make it inaccessible using the command chattr +i.

If you decide someday that you want to enable displaying of Recent Documents, just run the following command:

sudo chattr -i ~/.recently-used.xbel

The view will remain greyed out and disabled until you access a document, which will cause it to start displaying viewed documents.

Oh yea, one more thing, when you do enable Recent Documents, all documents that you accessed when it was disabled, will be visible. So make sure you clear them out again….otherwise everyone will be able to see what you were trying to hide in the first place ; -O

Comments on Ubuntu Guide For Windows Users: Clear And Disable Recent Documents Leave a Comment

June 22, 2008

Abhisek @ 8:40 pm #

Beats me why could nt we do it with the third command only…

August 27, 2008

Bob @ 6:06 pm #

"…when you do enable Recent Documents, all documents that you accessed when it was disabled, will be visible."

So you're saying that after applying this tweak, Ubuntu STILL tracks used documents? And all someone needs to do is re-enable it, and a list of all recently opened docs will STILL be there? Is that right? If that is correct, it's worse than doing nothing! It is setting up Ubuntu to track you without leaving any evidence.

This is nuts. There should be an option to disable this anti-privacy "feature" - period. Security (as in privacy) seems to have a very low priority at Ubuntu. This is the type of thing that is immediately obvious to Windows users, and it needs to be fixed.

December 17, 2008

dreasis @ 11:24 am #

This is an invaluable article. Every time I put Ubuntu onto a new machine, I come back to this site by googling "disable recent ubuntu windows."

Thank you for putting forth the time and effort to make this available to the public.

December 30, 2008

James @ 1:52 pm #

Bob, the chattr command makes the file immutable, so it can't be added to. It is not simply hiding things, it is not ADDING things to the file, so privacy works.

January 20, 2009

Izkata @ 3:59 pm #

So why not just lock the screen when you walk away? That file is in your home directory, and shouldn't be readable to others, and the feature in the menu works for the current user, so…

May 22, 2009

Zhomart @ 1:54 pm #

Thank you very much for this tip. It's work!

June 17, 2009

MValdez @ 7:48 am #

But chattr is only for ext2/3/4 file systems, not for RaiserFS or any other.

The easier way, is just to create a directory named ".recently-used.xbel".

mkdir ~/.recently-used.xbel

Regards,

MV

November 17, 2009

Shane Omac @ 7:26 pm #

Thanx Alot Simple Fix

April 25, 2010

Victor @ 6:19 pm #

Thanks a lot. Nice and simple, and I learnt a little bit in the process!

July 12, 2010

JayChong @ 9:25 pm #

Really thanks a lot Author. Your writing is clear and simple, hence with quite full details of explanation/tutorial 😀

Really like the explanation part, it's really educating!!

Cheers!!

August 3, 2010

Chris @ 7:12 pm #

This is pointless, if all the files you've oppened re-appear when you re-enable it, then it means ubutnu is tracking what files you've opened somewhere else.

All you are doing is putting a bandaid over the problem so no-one can see that you're being tracked. This basically does nothing useful.

What needs to be done is to add a hack or a way to stop ubuntu from saving them _anywhere_

August 4, 2010

afk_cz @ 3:55 pm #

or there is another way - delete the file and create the same one but like directory, not file. works flawlessly 😉

November 7, 2010

Kenneth @ 6:20 am #

I was looking to make a script that would clear different caches but be able to have Ubuntu still have history if we want, but I am new to scripting and don't have anything together yet.

Clear Recent Documents,
copy .recently-used.xbel to desktop,
((((now this part is for testing reasons as an example:
open a text file and close it, look at recently used to see that it was recorded by gnome.))))

Go delete .recently-used.xbel and replace it with the copy from your desktop and go look at recently used.

Now all I need is to decide where to put the copy of .recently-used.xbel and to figure out how to copy it from the directory I decide to put it in to my home directory through the terminal so I can put that command in the script I am thinking about writing.

Kenneth @ 6:28 am #

I have always had a hard time with English:

and copy it from there to my home directory through the terminal

July 18, 2011

d @ 6:31 pm #

Just to say "thank you very very much " absolutely great blog I recommend it t all my friends in community,(ubuntu),please never stop , best advice blog yet, thanks a million , D

September 26, 2011

Zia @ 7:06 am #

Here's the .clean_cache bash script i put in my Ubuntu 11.04 $HOME folder:

#!/bin/bash
rm -rf $HOME/.adobe/*
rm -rf $HOME/.dvdcss/*
rm -rf $HOME/.icedtea/*
# rm -rf $HOME/.java/deployment/cache/*
rm -rf $HOME/.local/share/gvfs-metadata/*
rm -rf $HOME/.macromedia/*
rm -rf $HOME/.mozilla/firefox/*.default/Cache/*
rm -rf $HOME/.mozilla/firefox/*.default/OfflineCache/*
rm -rf $HOME/.mozilla/firefox/*.default/startupCache/*
rm -rf $HOME/.thumbnails/*
cp $HOME/.local/share/recently-used_xbel.txt $HOME/.local/share/recently-used.xbel
rm $HOME/.local/share/zeitgeist/activity.sqlite
zeitgeist-daemon -replace

Here's the recently-used_xbel.txt text i put in my Ubuntu 11.04 $HOME/.local/share folder:

This recently-used_xbel.txt is the original recently-used.xbel that comes installing Ubuntu just renamed as recently-used_xbel.txt

I then go to "Startup Applications" and add $HOME/.clean_cache so at every startup i have recent documents and Firefox cache fully cleaned.

October 30, 2011

Zia @ 7:40 am #

UPDATE:

Here's the .clean_cache bash script i put in my Ubuntu 11.04 $HOME folder:

#!/bin/bash
rm -rf $HOME/.adobe/*
rm -rf $HOME/.dvdcss/*
rm -rf $HOME/.icedtea/*
rm -rf $HOME/.local/share/gvfs-metadata/*
rm -rf $HOME/.macromedia/*
rm -rf $HOME/.mozilla/firefox/*.default/Cache/*
rm -rf $HOME/.mozilla/firefox/*.default/OfflineCache/*
rm -rf $HOME/.mozilla/firefox/*.default/startupCache/*
rm -rf $HOME/.thumbnails/*
rm -rf $HOME/.local/share/recently-used.xbel
touch $HOME/.local/share/recently-used.xbel
rm -rf $HOME/.local/share/zeitgeist/activity.sqlite
zeitgeist-daemon -replace

I then go to "Startup Applications" and add $HOME/.clean_cache so at every startup i have Recent Documents, Firefox Cache and other Cache places fully cleaned.

June 8, 2014

android 2.1 @ 8:54 pm #

To create a folder, all you have to do is follow tthe steps
above, butt then place the icon on top of another.
One feature the Apple TV doees NOT have
is web browsing. Would anyone in their right mind say "Oh, so I guess you're on a diet"if tthey saw you
buying herbal djet tea.

Leave a Comment

Fields marked by an asterisk (*) are required.

Subscribe without commenting