[Solved] How to clear history in gedit?

Questions about applications and software
Forum rules
Before you post please read this

[Solved] How to clear history in gedit?

Postby Imagus on Fri Mar 04, 2011 6:08 pm

Hello,

I really hate it that gedit doesn't allow me to clear the find history and the recent files history. Does anybody know how to clear these? There doesn't seem to be anything about this in the manual.

If it's not possible, then what is a good alternative for gedit? I don't mind if there aren't many options, as long as it's small and fast (like Windows Notepad or something).

Thank you in advance.
Last edited by Imagus on Sun Mar 06, 2011 8:01 am, edited 1 time in total.
User avatar
Imagus
Level 3
Level 3
 
Posts: 116
Joined: Tue Aug 28, 2007 2:33 pm
Location: Belgium

Linux Mint is funded by ads and donations.
 

Re: How to clear history in gedit?

Postby mads on Fri Mar 04, 2011 7:20 pm

Hi Imagus!

In Terminal, type "gconf-editor" to start Configuration Editor.

To delete search history: Navigate to apps > gnome-settings > gedit > history-gedit2_search_for_entry. Now right click and select "Edit Key". Highlight any entry you want to remove and select "Remove".
To delete recent files: Navigate to apps > gedit-2 > preferences > ui > recents > max_recents. Now right click and select "Edit Key". Default value is 5. You want 0.
User avatar
mads
Level 6
Level 6
 
Posts: 1302
Joined: Wed Nov 03, 2010 3:44 pm

Re: How to clear history in gedit?

Postby Imagus on Sat Mar 05, 2011 8:49 am

mads wrote:Hi Imagus!

In Terminal, type "gconf-editor" to start Configuration Editor.

To delete search history: Navigate to apps > gnome-settings > gedit > history-gedit2_search_for_entry. Now right click and select "Edit Key". Highlight any entry you want to remove and select "Remove".
To delete recent files: Navigate to apps > gedit-2 > preferences > ui > recents > max_recents. Now right click and select "Edit Key". Default value is 5. You want 0.


Thank you, that worked great! I don't suppose there's any way to automate this process so I can do this after using gedit (by just clicking on an icon or something?) Or even make it a standard procedure for gedit?
User avatar
Imagus
Level 3
Level 3
 
Posts: 116
Joined: Tue Aug 28, 2007 2:33 pm
Location: Belgium

Re: How to clear history in gedit?

Postby mads on Sat Mar 05, 2011 11:53 am

Imagus wrote:... any way to automate this process ...?

None that I know about, but I hope someone else does.
User avatar
mads
Level 6
Level 6
 
Posts: 1302
Joined: Wed Nov 03, 2010 3:44 pm

Re: How to clear history in gedit?

Postby viking777 on Sat Mar 05, 2011 12:49 pm

I really hate it that gedit doesn't allow me to clear the find history and the recent files history

:shock: :shock:

Seek medical advice - quickly :lol:

Sorry, couldn't resist.
Fujitsu Lifebook AH532 Laptop. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Ubuntu12.10 (Unity), Mint14 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 13
Level 13
 
Posts: 4916
Joined: Mon Dec 01, 2008 11:21 am

Re: How to clear history in gedit?

Postby Imagus on Sat Mar 05, 2011 6:04 pm

viking777 wrote:
I really hate it that gedit doesn't allow me to clear the find history and the recent files history

:shock: :shock:

Seek medical advice - quickly :lol:

Sorry, couldn't resist.


No need to apologize, I like a bit of humor myself.

But would you mind telling me what exactly was so funny in my question? I am not a native English speaker and although I do my best, I can easily imagine I write something funny or weird from time to time. I'd appreciate it if you could explain it to me.
User avatar
Imagus
Level 3
Level 3
 
Posts: 116
Joined: Tue Aug 28, 2007 2:33 pm
Location: Belgium

Re: How to clear history in gedit?

Postby viking777 on Sun Mar 06, 2011 5:41 am

A sense of humor does not easily translate from one nation to another Imagus, and I was not aware that you were posting in a second language or I wouldn't have posted that reply. (which shows how good your English is). If you really want to know what I found funny, it was your use of the word 'hate' - a strong word, for a feature that I think most people would find somewhere between useful and inconsequential.

We all have our particular prejudices, personally I 'hate' the 'New Device Notifier' in KDE4, and I won't use KDE4 because of it (although there are a few other things I don't like about KDE4 as well) and I am sure many people can't understand that either. I hope you haven't taken offence at my strange sense of humor.
Fujitsu Lifebook AH532 Laptop. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Ubuntu12.10 (Unity), Mint14 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 13
Level 13
 
Posts: 4916
Joined: Mon Dec 01, 2008 11:21 am

Re: How to clear history in gedit?

Postby Imagus on Sun Mar 06, 2011 7:54 am

viking777 wrote:A sense of humor does not easily translate from one nation to another Imagus, and I was not aware that you were posting in a second language or I wouldn't have posted that reply. (which shows how good your English is). If you really want to know what I found funny, it was your use of the word 'hate' - a strong word, for a feature that I think most people would find somewhere between useful and inconsequential.

We all have our particular prejudices, personally I 'hate' the 'New Device Notifier' in KDE4, and I won't use KDE4 because of it (although there are a few other things I don't like about KDE4 as well) and I am sure many people can't understand that either. I hope you haven't taken offence at my strange sense of humor.


I'm not offended, really. I was just curious...

I admit that "hate" was indeed not the most elegant word to use. Next time I think I'll just stick to "don't like" :)

Thank you for explaining anyway.
User avatar
Imagus
Level 3
Level 3
 
Posts: 116
Joined: Tue Aug 28, 2007 2:33 pm
Location: Belgium

Re: How to clear history in gedit?

Postby LanceHaverkamp on Sat Nov 12, 2011 12:33 am

mads wrote:To delete recent files: Navigate to apps > gedit-2 > preferences > ui > recents > max_recents. Now right click and select "Edit Key". Default value is 5. You want 0.

Unfortunately, this is not a real fix. Setting the displayed count to zero, merely hides the information. All someone has to do is change the counter back to a higher number and it displays the files again! This information is not being securely deleted!
User avatar
LanceHaverkamp
Level 2
Level 2
 
Posts: 70
Joined: Sat Sep 25, 2010 12:37 am

Re: [Solved] How to clear history in gedit?

Postby Garvan on Sat Nov 12, 2011 3:32 am

Gnome stores recently used files here:

./local/share/recently-used.xbel

It has entries for text files, video files etc. If you don't like leaving records, delete the file, and replace it with a blank read only file of the same name. Or you could create a "Delete Recent Files" script to delete it on demand.

Garvan

EDIT:
Just tried read-only and the file was replaced next time I used gedit. You need to use this command to lock the version and prevent its replacement.

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

Edit2:
I am not sure what difference it might make, but I also have "Zeitgeist Datahub" disabled in Start-up Application Preferences.
Desktop: Dell, Intel Core 2 Duo E7500 @ 2.93Ghz, 2GiB RAM, Linux Mint 13 Maya.
Net-book: SAMSUNG N148-Plus, 2x Intel Atom CPU N450 @1.66Ghz, 1GB RAM, lubuntu 12.04.
User avatar
Garvan
Level 4
Level 4
 
Posts: 274
Joined: Sun May 29, 2011 3:26 am
Location: Cambodia

Re: [Solved] How to clear history in gedit?

Postby Salil on Sat Dec 31, 2011 12:06 pm

Garvan wrote:Gnome stores recently used files here:

./local/share/recently-used.xbel

It has entries for text files, video files etc. If you don't like leaving records, delete the file, and replace it with a blank read only file of the same name. Or you could create a "Delete Recent Files" script to delete it on demand.

Garvan

EDIT:
Just tried read-only and the file was replaced next time I used gedit. You need to use this command to lock the version and prevent its replacement.

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

Edit2:
I am not sure what difference it might make, but I also have "Zeitgeist Datahub" disabled in Start-up Application Preferences.


Thank you Garvan

i was very irritated with the gnome3's recent items that showed up whenever i tried to search for an application. flushing the content of the file "recently-used.xbel" did remove the unwanted recent items list.

the code to flush the contents is
Code: Select all
cat /dev/null > .local/share/recently-used.xbel


hope this helps :D
coder, student, helper and wannabe geek
Salil
Level 1
Level 1
 
Posts: 1
Joined: Sat Dec 31, 2011 11:53 am
Location: kharagpur, India

Re: [Solved] How to clear history in gedit?

Postby Bubblegum on Fri Mar 16, 2012 10:10 pm

Hello,

I installed Linux Mint 12 a couple of months ago. I had been using Ubuntu for some years. I always had been able to access via gconf-editor and modify the numer of recent files shown in gedit. When I first installed Lisa, I think that I was able to go to apps/gedit-2/preferences/ui/recents and do changes in the entries of the right panel. However, now the preferences only show "editor" (it doesn't show "ui"). Even worse, there are no entries in the right panel, which is totally blank for any of the sections for gedit-2. I've just checked the version of gedit I am using, and it is 3.2.3, which could be the reason for right panel to be just blank .

Does anybody know how to change the number of recent files for this version of gedit?

Note: I'm using the 'classic' UI for Linux Mint, instead of the default one for Lisa. (I wonder if this may have something to do with my problem, too.)

Any help much appreciated.
Bubblegum
Level 1
Level 1
 
Posts: 3
Joined: Fri Mar 16, 2012 9:45 pm

Re: [Solved] How to clear history in gedit?

Postby biluluki on Fri May 11, 2012 7:08 pm

At least in Linux Mint 10 Julia the file .recently-used.xbel (hidden) is not inside ~/.local/share . It's inside ~ (/home/username). If you delete this file all the recent documents or items or files of gedit, eog (Eye of GNOME), evince (Document Viewer) and Totem will disappear or go (and probably the ones of more programs or applications). If you open a new document or file with these programs the file .recently-used.xbel will be created again.

But erasing .recently-used.xbel doesn't affect to the recent history of OpenOffice.org. But there is an easy solution also for this: just delete the file /home/username/.openoffice.org/3/user/registry/data/org/openoffice/Office/Histories.xcu . This file will also be created again if you open a new office document.
biluluki
Level 1
Level 1
 
Posts: 32
Joined: Mon Apr 09, 2012 10:23 am

Re: [Solved] How to clear history in gedit?

Postby mint123 on Fri May 25, 2012 2:01 pm

Garvan wrote:You need to use this command to lock the version and prevent its replacement.

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


How is this then un-done? File permissions still say I'm the owner but I can't modify or remove it as su or with sudo.
mint123
Level 3
Level 3
 
Posts: 133
Joined: Mon Jan 31, 2011 4:44 pm

Re: [Solved] How to clear history in gedit?

Postby Garvan on Sat May 26, 2012 11:13 pm

mint123 wrote:
Garvan wrote:You need to use this command to lock the version and prevent its replacement.

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


How is this then un-done? File permissions still say I'm the owner but I can't modify or remove it as su or with sudo.


Change the attributes first,

Code: Select all
sudo chattr -i ~/.local/share/recently-used.xbel


Then modify or remove it as you need.

Garvan
Desktop: Dell, Intel Core 2 Duo E7500 @ 2.93Ghz, 2GiB RAM, Linux Mint 13 Maya.
Net-book: SAMSUNG N148-Plus, 2x Intel Atom CPU N450 @1.66Ghz, 1GB RAM, lubuntu 12.04.
User avatar
Garvan
Level 4
Level 4
 
Posts: 274
Joined: Sun May 29, 2011 3:26 am
Location: Cambodia

Re: [Solved] How to clear history in gedit?

Postby moshebagelfresser on Thu Jul 05, 2012 11:26 am

I would have thought that BleachBit would have done this. If you don't have it installed it's a really excellent program.
moshebagelfresser
Level 1
Level 1
 
Posts: 4
Joined: Tue Jun 26, 2012 12:01 pm

Linux Mint is funded by ads and donations.
 

Return to Software & Applications

Who is online

Users browsing this forum: Google [Bot], vortex59 and 19 guests