You are not logged in.

#1 2012-03-15 15:47:15

neok
Member
From: Cyprus
Registered: 2003-12-14
Posts: 190
Website

Can I stop apps from using recently-used.xbel?

Hi

I am trying to stop GTK from writing to the ~/.local/share/recently-used.xbel file, as this creates a heavy load of writes on the SSD, when I select multiple files in a file chooser for opening. If I delete that file, and even the .local directory, it is still re-reated by the system. Any way to get rid of this problem, without hacking and recompiling whatever is responsible for this?

My thanks in advance.


Regards

Neoklis ... Ham Radio Call: 5B4AZ

Offline

#2 2012-03-15 16:18:18

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Can I stop apps from using recently-used.xbel?

Have you tried making it read only?  Or using a symlink?  For the latter you could have the destination file created in /tmp or /dev/shm when you logon.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#3 2012-03-15 16:41:48

schalox
Member
From: Finland
Registered: 2011-05-10
Posts: 21

Re: Can I stop apps from using recently-used.xbel?

It seems symlinking doesn't work, it gets recreated(switched from symlink to a regular file) if something(like firefox) needs to to access the file. This guy seems to have found the solution: add "gtk-recent-files-max-age=0" to your ~/.gtkrc-2.0. It seems though that the modification time changes even though nothing gets written into the file every time you e.g. save something in firefox.

Last edited by schalox (2012-03-15 16:43:09)

Offline

#4 2012-03-15 17:27:33

Radioactiveman
Member
From: Germany
Registered: 2010-05-13
Posts: 388

Re: Can I stop apps from using recently-used.xbel?

Create a directory called "recently-used.xbel" inside "~/.local/share/".

Offline

#5 2012-03-15 18:15:50

neok
Member
From: Cyprus
Registered: 2003-12-14
Posts: 190
Website

Re: Can I stop apps from using recently-used.xbel?

Radioactiveman wrote:

Create a directory called "recently-used.xbel" inside "~/.local/share/".

Clever! that stops writing to recently-used.xbel. So does chattr +i recently-used.xbel or making it read-only.
Unfortunately though GTK first creates a temporary recently-used.xbel.xxxxx file and then apparently moves
it to recently-used.xbel, so writng to the SSD never stops.

Someone seems to have done everything possible to make sure this file is written to... so it seems the only
way to save my SSD is to make the .local/share/ directory a symlink to /tmp or /dev/shm. Unfortunately this
would mean that the geeqie and gegl directories wil be lost on reboot, although they are also re-created
by geeqie and gimp.

Thanks fr the tips!


Regards

Neoklis ... Ham Radio Call: 5B4AZ

Offline

#6 2012-03-15 19:40:41

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: Can I stop apps from using recently-used.xbel?

I had exactly the same problem with recently-used.xbel. Even though I'm not using an SSD, it annoyed me to no end that it was constantly writing to the disk. I also view it as a privacy issue as I may not want every file and directory I view to have been written to the disk.

I used chattr +i at first too, but eventually I just changed my active home directory to /tmp (which is one big ramdisk on my system). I wrote synclinks specifically for the purpose of maintaining a subset of files in the active home directory. I just add files and directories that I want to keep to a plaintext list and run synclinks when I log in and out. The list enables fine-grained control over exactly what is symlinked into the directory and what changes are propagated back to the disk.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#7 2012-03-16 05:55:21

neok
Member
From: Cyprus
Registered: 2003-12-14
Posts: 190
Website

Re: Can I stop apps from using recently-used.xbel?

Xyne wrote:

I wrote synclinks specifically for the purpose of maintaining a subset of files in the active home directory. I just add files and directories that I want to keep to a plaintext list and run synclinks when I log in and out. The list enables fine-grained control over exactly what is symlinked into the directory and what changes are propagated back to the disk.

That sounds good - thanks! I will give it a try. I have something similar for the firefox directory to avoid caching etc on disk. With synclinks I guess I won't need it anymore.


Regards

Neoklis ... Ham Radio Call: 5B4AZ

Offline

#8 2014-03-28 23:08:31

squiidux
Member
Registered: 2013-06-01
Posts: 19

Re: Can I stop apps from using recently-used.xbel?

you could also use...

ln -s /dev/null recently-used.xbel

this will stop write errors and keep your terminals clean if you are starting from a terminal session. -cheers

Offline

#9 2014-03-28 23:25:18

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Can I stop apps from using recently-used.xbel?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#10 2014-03-29 00:06:55

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: Can I stop apps from using recently-used.xbel?

squiidux wrote:

you could also use...

ln -s /dev/null recently-used.xbel

this will stop write errors and keep your terminals clean if you are starting from a terminal session. -cheers

<mod power abuse>
Many applications remove the existing file and create a new one so that will not work. The symlink will soon be replaced by a regular file.
</mod power abuse>


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#11 2014-03-29 00:34:03

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: Can I stop apps from using recently-used.xbel?

Wonderwoofie , after the close wrote:

You should add to this post that it might be worth trying to use 'chattr -i recently-used.xbel' to try to stop any program from replacing it. I guess having a blank file with this attribute might also work...

Maybe it is +i... I can never remember.

Last edited by ewaller (2014-03-29 00:34:23)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB