It worked for me but it might depend on which programs are using it. Also prior to using any program which writes to this folder one could drop the permissions of said program (e.g. runasspot) so that said program can't write to the folder. However, don't run as spot. Run as a user without a home folder .MochiMoppel wrote:Maybe hasn't been mentioned because it doesn't work ?s243a wrote:I'm not sure if it has been mentioned or not but one way to disable this is to delete the folder that contains the file (I.e. ~/.local).
Disable GTK "recently used files"
Find me on [url=https://www.minds.com/ns_tidder]minds[/url] and on [url=https://www.pearltrees.com/s243a/puppy-linux/id12399810]pearltrees[/url].
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
recently-used.xbel is created in whatever directory the environment variable XDG_DATA_HOME is assigned to.
In my Puppy XDG_DATA_HOME is set to /root/.local/share, so the file location becomes ${XDG_DATA_HOME}/recently-used.xbel.
Removing /root/.local/share can prevent the saving of recently-used.xbel , but only as long as no other program recreates it. Parcellite is such a program. Parcellite doesn't care about XDG_DATA_HOME, it has this directory hard coded and creates it when it doesn't exist.
In my Puppy XDG_DATA_HOME is set to /root/.local/share, so the file location becomes ${XDG_DATA_HOME}/recently-used.xbel.
Removing /root/.local/share can prevent the saving of recently-used.xbel , but only as long as no other program recreates it. Parcellite is such a program. Parcellite doesn't care about XDG_DATA_HOME, it has this directory hard coded and creates it when it doesn't exist.
What if you set XDG_DATA_HOME=/dev/nullMochiMoppel wrote:recently-used.xbel is created in whatever directory the environment variable XDG_DATA_HOME is assigned to.
In my Puppy XDG_DATA_HOME is set to /root/.local/share, so the file location becomes ${XDG_DATA_HOME}/recently-used.xbel.
Removing /root/.local/share can prevent the saving of recently-used.xbel , but only as long as no other program recreates it. Parcellite is such a program. Parcellite doesn't care about XDG_DATA_HOME, it has this directory hard coded and creates it when it doesn't exist.
Find me on [url=https://www.minds.com/ns_tidder]minds[/url] and on [url=https://www.pearltrees.com/s243a/puppy-linux/id12399810]pearltrees[/url].
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
Brutal, but works.s243a wrote:What if you set XDG_DATA_HOME=/dev/null
However symlinking /root/.local/share/recently-used.xbel to /dev/null would not work
If you only want to prevent certain applications to access the .xbel file you can redefine XDG_DATA_HOME before executing the application, e.g this will start geany with a disabled .xbel file:
Code: Select all
XDG_DATA_HOME=/dev/null geany
Code: Select all
(geany:6698): Gtk-WARNING **: Attempting to read the recently used resources file at `/dev/null/recently-used.xbel', but the parser failed: Failed to open file '/dev/null/recently-used.xbel': Not a directory.
(geany:6698): Gtk-WARNING **: Attempting to store changes into `/dev/null/recently-used.xbel', but failed: Failed to create file '/dev/null/recently-used.xbel.VCML6Z': Not a directory
(geany:6698): Gtk-WARNING **: Attempting to set the permissions of `/dev/null/recently-used.xbel', but failed: Not a directory
Maybe redirect standard error to some kind of error filter function. For instance such a function could remove the offending lines with a statement like:MochiMoppel wrote:Brutal, but works.s243a wrote:What if you set XDG_DATA_HOME=/dev/null
However symlinking /root/.local/share/recently-used.xbel to /dev/null would not work
If you only want to prevent certain applications to access the .xbel file you can redefine XDG_DATA_HOME before executing the application, e.g this will start geany with a disabled .xbel file:Not surprisingly a barrage of error messages will follow:Code: Select all
XDG_DATA_HOME=/dev/null geany
Code: Select all
(geany:6698): Gtk-WARNING **: Attempting to read the recently used resources file at `/dev/null/recently-used.xbel', but the parser failed: Failed to open file '/dev/null/recently-used.xbel': Not a directory. (geany:6698): Gtk-WARNING **: Attempting to store changes into `/dev/null/recently-used.xbel', but failed: Failed to create file '/dev/null/recently-used.xbel.VCML6Z': Not a directory (geany:6698): Gtk-WARNING **: Attempting to set the permissions of `/dev/null/recently-used.xbel', but failed: Not a directory
Code: Select all
grep -v recently-used.xbel
Find me on [url=https://www.minds.com/ns_tidder]minds[/url] and on [url=https://www.pearltrees.com/s243a/puppy-linux/id12399810]pearltrees[/url].
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
- perdido
- Posts: 1528
- Joined: Mon 09 Dec 2013, 16:29
- Location: ¿Altair IV , Just north of Eeyore Junction.?
Or thiss243a wrote:What if you set XDG_DATA_HOME=/dev/nullMochiMoppel wrote:recently-used.xbel is created in whatever directory the environment variable XDG_DATA_HOME is assigned to.
In my Puppy XDG_DATA_HOME is set to /root/.local/share, so the file location becomes ${XDG_DATA_HOME}/recently-used.xbel.
Removing /root/.local/share can prevent the saving of recently-used.xbel , but only as long as no other program recreates it. Parcellite is such a program. Parcellite doesn't care about XDG_DATA_HOME, it has this directory hard coded and creates it when it doesn't exist.
Code: Select all
export XDG_DATA_HOME=/tmp/