How to permanetly disable recent files! Mint 14

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Alister

How to permanetly disable recent files! Mint 14

Post by Alister »

I'm using mint 14 and i see in the cinnamon settings you can disable the recent files list from the menu but it's still active does anyone no where this folder on the computer is located and how to disable it?

I came across posts about mint 13 and ways to do it doesn't seem like its completely the same for 14 so if anyone can help much appreciated.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Orbmiser

Re: How to permanetly disable recent files! Mint 14

Post by Orbmiser »

Deleting recently-used.xbel file in
.local/share/recently-used.xbel
Will do it. Or writing a bash script to automate the process.
.
Alister

Re: How to permanetly disable recent files! Mint 14

Post by Alister »

Thanks! i saw similar posts saying something like you needed to implement some method to prevent it from just creating the folder again i tried moving the file you said into a folder to see and cleared the list and looked at stuff it just filled up again then i tried deleting it same thing? and i checked it is indeed just creating a new copy of the file again.

i haven't deleted it from the recycle bin but i figure this isnt the problem.
Orbmiser

Re: How to permanetly disable recent files! Mint 14

Post by Orbmiser »

Well someone with experience can chime in and write a little bash script that can be run in the background.
And do like delete it ever so many minutes or ???
.
Alister

Re: How to permanetly disable recent files! Mint 14

Post by Alister »

Pretty sure theres a way to prevent it been created again via terminal of course whatever instructions i saw for mint 13 werent sufficent said the directorys didn't excist so alot of good that did.

Still appreicate you taken the time for the suggestion
Orbmiser

Re: How to permanetly disable recent files! Mint 14

Post by Orbmiser »

It's there open term
orbmiser@Winterfell ~ $ cd .local/share/
then
orbmiser@Winterfell ~/.local/share $ ls
Will give you contents
applications gegl-0.2 keyrings totem
cinnamon gsettings-data-convert locale Trash
desktop-directories gthumb mateconf-gsettings-data-convert vlc
evolution gvfs-metadata recently-used.xbel webkit
freetuxtv icc tomboy
Alister

Re: How to permanetly disable recent files! Mint 14

Post by Alister »

I'm not exactly to fluent with knowledge when it comes to this site of things what exactly am i meant to do with that and does it completely disable it? seems it targets several things on the computer i read somewhere that specific applications could cause it to regenerate as well weather that's what all thats about dunno?

Specific instructions will help i did have the idea of hopefully just right clicking it and changing its permissions to see if that does anything i'll give it a go. Even after changing as root it just changes back to read and write
Orbmiser

Re: How to permanetly disable recent files! Mint 14

Post by Orbmiser »

Yep it's a pain. As if it doesn't see a valid file to write to then will write one itself.
And would love to see an option of auto clear all recent files on logout or reboot.
.
TheForumTroll

Re: How to permanetly disable recent files! Mint 14

Post by TheForumTroll »

Let me get this right. You want the file deleted on a regular basis? You could just add it to cron. Doesn't sound like the best way to do it, but if you want to here's a howto:

https://help.ubuntu.com/community/CronHowto
Alister

Re: How to permanetly disable recent files! Mint 14

Post by Alister »

Well you can accomplish it on windows systems which i have always used while this may seem like a conveiniant feature and sure it is for some it's not favoring anyones privacy if someone can just constantly look.

thanks i don't think i'm gonna be able to make heads or tails of that however
TheForumTroll

Re: How to permanetly disable recent files! Mint 14

Post by TheForumTroll »

First of all, this not Windows, so there's always a way in the terminal if nothing else works. Both of the following methods work, but there might be better ways (maybe a GUI option? I'm new to Mint as I only installed it two days ago).


Lock the file:
Clear recently used files (in the menu). Open a terminal and type:

Code: Select all

sudo chattr +i .local/share/recently-used.xbel
If you want it back to normal use -i

Code: Select all

sudo chattr -i .local/share/recently-used.xbel
Deleting it with cron:
Open a terminal and type:

Code: Select all

crontab -e
If it asks what file editor to use, chose Nano if in doubt.
Enter the following at the bottom of the file (deletes the file every 10 minutes):

Code: Select all

*/10 * * * * rm .local/share/recently-used.xbel
or (deletes every hour):

Code: Select all

* */1 * * * rm .local/share/recently-used.xbel
CTRL+o to save. CTRL+x to exit.

I did a quick test and it worked fine for me.
User avatar
kyphi
Level 9
Level 9
Posts: 2735
Joined: Sat Jul 09, 2011 1:14 am
Location: The Hunter Valley, Australia

Re: How to permanetly disable recent files! Mint 14

Post by kyphi »

cron is not necessary but "touch" is. It changes the time-stamp of recently-used.xbel.

Use these commands and you will not be plagued by having any recent document listings:

Code: Select all

rm ~/.local/share/recently-used.xbel
touch ~/.local/share/recently-used.xbel
sudo chattr +i ~/.local/share/recently-used.xbel
To undo:

Code: Select all

sudo chattr -i ~/.local/share/recently-used.xbel
Linux Mint 21.3 Cinnamon
TheForumTroll

Re: How to permanetly disable recent files! Mint 14

Post by TheForumTroll »

Well, the point of using the GUI to clear the file was to use as few terminal commands as possible. Touch is not necessary as it doesn't get deleted (unless you delete it manually) and cron was an alternative way, not to be used together with chattr of course.

Actually cron might be the best option I have found so far, as I just read that "recently-used.xbel.xxxxx" tmp files are made and then moved to "recently-used.xbel". What happens when it cannot be moved I don't know. Nothing? Hundreds of tmp files? Perhaps recently-used.xbel could be made as a folder or symlink pointing to /tmp or /dev/null or something ? :roll:

A way to disable this feature is needed.


EDIT:
So it seems the correct way to disable this is setting "gtk-recent-files-limit = 0" in either .gtkrc, .gtkrc-2.0 or .config/gtk-3.0/settings.ini. Unfortunately this doesn't work in Cinnamon :|

EDIT 2:
Is this an academical discussion or am I missing something? Turning it off in the Cinnamon Settings removes it fine here :?:
Orbmiser

Re: How to permanetly disable recent files! Mint 14

Post by Orbmiser »

EDIT 2:
Is this an academical discussion or am I missing something? Turning it off in the Cinnamon Settings removes it fine here :?:
Nope Cinnamon Settings just turns on/off the folder being displayed on the Menu. Doesn't actually touch or delete any files.
.
TheForumTroll

Re: How to permanetly disable recent files! Mint 14

Post by TheForumTroll »

I see. I'm curious to know why it matters? No one can see the file content, unless they know the users password and know where to look. In Windows turning the feature off doesn't stop the logging from happening either, so I don't really see the problem if the Windows way was good enough for OP.

Anyways, just lock the file with chattr or use another account for your p0rn collection and browsing :lol:

Code: Select all

find . -atime -1
:roll:
User avatar
kyphi
Level 9
Level 9
Posts: 2735
Joined: Sat Jul 09, 2011 1:14 am
Location: The Hunter Valley, Australia

Re: How to permanetly disable recent files! Mint 14

Post by kyphi »

If you use the string of commands that I gave above, you will find that after removing the "recently-used.xbel" file, "touch" creates it anew with a different time stamp and "chattr +i" ensures that it stays empty until revoked.
Programs such as LibreOffice Writer, Calc, Draw and Impress also have a "Recent Documents" menu entry. This can easily be turned off by modifying the menu via Tools, Customise, highlight Recent Documents, click on the Modify button and select delete. Unfortunately this is not a system wide modification but has to be repeated in each LibreOffice program.
...and don't forget The GIMP.
Linux Mint 21.3 Cinnamon
erie88
Level 1
Level 1
Posts: 29
Joined: Mon Dec 31, 2012 11:24 am

Re: How to permanetly disable recent files! Mint 14

Post by erie88 »

If you don't want the bookmarks, places and recently files to show up on Menu, you can go to "Preferences - Cinnamon Settings - Menu tab" and untick/uncheck/unmark the "Show recent files" option. Done. It'll gone at least not visible on the menu.
sorensenbill

Re: How to permanetly disable recent files! Mint 14

Post by sorensenbill »

Easy permenant fix is to delete ~/.local/share/recently-used.xbel and replace it with an empty folder of the same name. It will prevent it being recreated and stops Gimp etc. in addition to the menu.
Locked

Return to “Beginner Questions”