Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 23 Aug 2019, 05:19
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Disable GTK "recently used files"
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 3 [36 Posts]   Goto page: 1, 2, 3 Next
Author Message
cimarron


Joined: 30 May 2013
Posts: 293

PostPosted: Sat 13 Sep 2014, 18:40    Post subject:  Disable GTK "recently used files"
Subject description: i.e. /root/.local/share/recently-used.xbel
 

It took me a while to find the solution to this, and lots of other linux users have searched for it as well (including this puppy thread). There's a file, /root/.local/share/recently-used.xbel, that gtk uses to log files you've opened. It's used by many applications and can hold quite a length of history. This is also what's referenced when opening a file and selecting "recently used" in the dialog.

If you delete recently-used.xbel, it's quickly replaced. If you change write permissions, those are overridden. You can use "chattr +i" to prevent writing to it, but apparently a temp file is written first and this will result in lots of disk writes as it attempts again and again to write to recently-used.xbel (there can also be lots of errors displayed if certain applications are run in terminal, as they keep trying to write to this file).

But for GTK2, which I think most puppies use, the logging can be stopped if this line is added to /root/.gtkrc.mine:
Code:
gtk-recent-files-max-age=0

I think GTK needs to be restarted for this setting to be used. I just changed the GTK theme and changed back, and it worked. The recently-used.xbel file is still created, but it holds no data.

To revert to normal logging, just remove that line (and restart GTK).
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1883
Location: Japan

PostPosted: Sat 13 Sep 2014, 22:05    Post subject: Re: Disable GTK "recently used files"
Subject description: i.e. /root/.local/share/recently-used.xbel
 

Just curious: Why do you want to disable it? I understand that there are many users who want the same, but I've seen other threads where users asked to make this file more accessible. In the thread you mentioned tha the OP was concerned about the size of the file. Can't this be controlled by a value of 1 or 2 (days?)?
Back to top
View user's profile Send private message 
cimarron


Joined: 30 May 2013
Posts: 293

PostPosted: Sat 13 Sep 2014, 22:17    Post subject:  

For some people there's also a privacy concern, especially if the computer is used by more than one person. Similar to not wanting to be tracked by Ubuntu's zeitgeist.

I'm not sure if I want to keep the "recently used" functionality or not. But I like to be able to turn it off.
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1883
Location: Japan

PostPosted: Sun 14 Sep 2014, 08:34    Post subject:  

cimarron wrote:
For some people there's also a privacy concern, especially if the computer is used by more than one person.
People who share their private pupsave file with persons they don't trust should certainly be concered Laughing OK, but that's a different topic.
Quote:
But I like to be able to turn it off.
Yes, it's always good to be in control. Even if turning off might be a bit drastic, turning it down sounds like a good idea. The default is 30 days. That's a long time to accumulate a massive amount of data. Setting it to 2-3 days seems more appropriate.

It is also possible to limit the number of recently used files that appear in the Open/Save dialog:
Code:
gtk-recent-files-limit=20
limits the number to 20. Default is 50.
Back to top
View user's profile Send private message 
cimarron


Joined: 30 May 2013
Posts: 293

PostPosted: Sun 14 Sep 2014, 10:05    Post subject:  

Does the gtk-recent-files-limit setting work for GTK2? I've seen it recommended as a GTK3 solution, but I think when I tried it there was no effect (or maybe it just doesn't work to set it to 0?).
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1883
Location: Japan

PostPosted: Sun 14 Sep 2014, 10:37    Post subject:  

cimarron wrote:
Does the gtk-recent-files-limit setting work for GTK2? I've seen it recommended as a GTK3 solution, but I think when I tried it there was no effect (or maybe it just doesn't work to set it to 0?).
Yes,it works for GTK2. It's even older than the gtk-recent-files-max-age setting, however as both settings share the same file gtk-recent-files-limit will also result in zero (no matter what value is set) if you set gtk-recent-files-max-age=0. In fact this seems to be the only way to set the Open/Save files to zero. When I tried
Code:
gtk-recent-files-max-age=2
gtk-recent-files-limit=0

the Open/Save dialog still shows 1 file
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1883
Location: Japan

PostPosted: Sat 03 Aug 2019, 21:21    Post subject:  

Sorry for bumping this very old thread but it might answer BarryK's question in this thread on how to limit the size of the file recently-used.xbel.

Apparently there is no elegant way to limit the size or number of items in this file. Setting gtk-recent-files-max-age to 5 (days) can lead to a massive amount of items, but if the user then takes a one week holiday and after that opens any file in geany, the number of items will be down to 1. Not good Crying or Very sad

IMO the best bet is too keep the default settings untouched. They should work for most users.
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 14272
Location: Gatineau (Qc), Canada

PostPosted: Sun 04 Aug 2019, 03:07    Post subject:  

(Edit: Quote added, bold by me)
MochiMoppel wrote:
Sorry for bumping this very old thread but it might answer BarryK's question in this thread on how to limit the size of the file recently-used.xbel.

Apparently there is no elegant way to limit the size or number of items in this file. Setting gtk-recent-files-max-age to 5 (days) can lead to a massive amount of items, but if the user then takes a one week holiday and after that opens any file in geany, the number of items will be down to 1. Not good Crying or Very sad

IMO the best bet is too keep the default settings untouched. They should work for most users.

Are you sure geany does not have its own file list? Independent of the general xbel file, at
/root/.config/geany/geany.conf, line 156 or therabouts:
Quote:
[files]
recent_files=
(list of text files one processed recently)

IHTH

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)

Last edited by musher0 on Sun 04 Aug 2019, 15:37; edited 2 times in total
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1883
Location: Japan

PostPosted: Sun 04 Aug 2019, 03:32    Post subject:  

@musher0
The subject of this thread is /root/.local/share/recently-used.xbel
Back to top
View user's profile Send private message 
B.K. Johnson

Joined: 12 Oct 2009
Posts: 755

PostPosted: Sun 04 Aug 2019, 09:51    Post subject:  

Hi Mochi
Can you clarify for me what "used" in this context means? As implemented in upupbb, it seems to record/show only "written/saved" files.

_________________
B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM

Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 14272
Location: Gatineau (Qc), Canada

PostPosted: Sun 04 Aug 2019, 15:55    Post subject:  

MochiMoppel wrote:
@musher0
The subject of this thread is /root/.local/share/recently-used.xbel

I edited my previous post to make it clearer. You yourself mentioned geany's history as
dependent of recently-used.xbel. It is not. But don't believe me, please double-check
yourself.

< recently-used.xbel > is hardly the only history-collecting file on any Linux.

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1883
Location: Japan

PostPosted: Sun 04 Aug 2019, 21:04    Post subject:  

B.K. Johnson wrote:
Can you clarify for me what "used" in this context means? As implemented in upupbb, it seems to record/show only "written/saved" files.

What "used" means is largely up to the applications that use recently-used.xbel. Most often applications (e.g. geany, leafpad, abiword, gnumeric) would write to this file as soon as they open a file. This can quickly fill this file with irrelevant items, e.g. files that the user opened in error. The original purpose might have been to serve as a cross-platform or cross-application bookmark file, but I've never seen an application that uses it for this purpose. The fact that a history of opened files is created without any interaction by the user might explain why many users have privacy concerns and why users like the OP want to get rid of this file.

I have no clue what upupbb implemented since I've never used it or seen the code. I can however say that MMview reads recently-used.xbel but never writes to it, so for merely reading text files a viewer might be preferable to an editor.
Back to top
View user's profile Send private message 
8Geee


Joined: 12 May 2008
Posts: 2016
Location: N.E. USA

PostPosted: Sun 04 Aug 2019, 23:29    Post subject:  

The simplest way to deal with the file is to open Geany, then load the file. Using CTRL+A select all, then press BACKSPACE key. SAVE the file as blank.

Removing the file and the xbel extension does not work. Editing the file to blank does. BTW, close Geany with the blank file intact... EZ maintanence. Also, the CUPS error log should be edited in this way.

Regards
8Geee

_________________
Linux user #498913 "Some people need to reimagine their thinking."
"Zuckerberg: a large city inhabited by mentally challenged people."
Back to top
View user's profile Send private message 
s243a

Joined: 02 Sep 2014
Posts: 2042

PostPosted: Sun 04 Aug 2019, 23:58    Post subject:  

Maybe setup a cron job to delete this file every hour and also setup a script to delete it at shutdown.
_________________
Find me on minds and on pearltrees.
Back to top
View user's profile Send private message Visit poster's website 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1883
Location: Japan

PostPosted: Mon 05 Aug 2019, 01:01    Post subject:  

8Geee wrote:
Removing the file and the xbel extension does not work. Editing the file to blank does
Does not.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 3 [36 Posts]   Goto page: 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0582s ][ Queries: 11 (0.0080s) ][ GZIP on ]