Create custom cleaner_data in binary file?


I'm not sure about the process to create custom cleaners for this type of data, or if it's realistically possible.
This is in Mint, but should have a similar concept in some distros.

I couldn't find a submitted cleaner for Mint's default text editor (XED) on, or for default text editors of most other distros.

AFAIK, the text editor's history of search terms and "replace with" terms are stored only in ~/.config/dconf/user - a binary file. The user file holds settings and history for many other apps - much more than just history.
Ruling out just deleting the file.
The editor's search term history can apparently only be changed or deleted by using the dconf Editor tool.

Is it possible to create a BleachBit cleaner to delete certain data in a binary file, that requires running a dedicated tool like dconf Editor to view the file?

Maybe this is why there's not a BB cleaner for Linux text editors, even though they're one of the most frequently used apps?

FWIW, once dconf Editor is started, the specific lines storing search terms are under: org>x>editor:
"history-replace-with" []
"history-search-for" []

Data inside the brackets is what needs deleting. There's no "save changes" option in dconf Editor - just close the tool.

Really, no ideas, or no time yet to reply?

Yes, it has been busy. :)

I assume there are command line tools or Python libraries to modify dconf the registry. Using these, you can consider the following options:

1. Create the cleaner in Python (like by calling the Python binding for dconf), and integrate it into the BleachBit code base.

2. Create a standalone script or program to do it, and then use the 'process' command new in recent versions of BleachBit to spawn an external process.

Andrew, lead developer

Thanks Andrew,
I get the broad concept of your ideas, but it'd take me forever to do it, or longer.
Are there any detailed examples doing something very similar to your ideas?

Not sure if it helps to create a cleaner in BleachBit, but I found some commands for Ubuntu, that I modified for Mint, that delete the search terms and "replace with" terms found in ~/.config/dconf/user file.

gsettings set org.x.editor history-search-for "['']"
gsettings set org.x.editor history-replace-with "['']"

I admit, I'm not sure why these commands work.
Other than "GSettings is a wrapper API for the dconf API."
VERY loosely, I suppose that means GSettings commands (e.g., "gsettings set") controls the dconf API, that modifies the binary (dconf) user file. Apparently dconf uses periods in paths, not '/' or '\.'

"org/x/editor" is the path in dconf-editor, to where XED's (editor) search history is stored.
As many people that use the default XED editor, you'd think someone would've come up with a BB cleaner, or requested a clear history feature in the editor.

1st, thanks again to Andrew & everyone that contributes useful "info" or time for BB.

Andrew, you didn't have time to reply to my 7/24/17 post, about the CLI commands to clean default text editor (at least in Mint, Ubuntu - likely in other distros, w/ some mods).

Though not automatic or click & done, are they anything like you had in mind?
Of course, you were being facetious for me to "integrate it into the BleachBit code base." Yes?

Can anyone give examples how to automate / semi-automate these in Linux w/ a click, or other methods? Whether auto run on OS or text editor shut down, or from a desktop launcher or...

Unrelated ? example: Maintainer of Gnome Commander file mgr, thought it already had ability to clear search terms & location history. He was surprised quite it didn't & apparently no one mentioned it. Said he'd work on it.