bleachbit / wishlist

Wishlist enhancements related to BleachBit
GNU General Public License v3.0
7 stars 1 forks source link

dconf reset history and privacy data #97

Open pas-calc opened 3 years ago

pas-calc commented 3 years ago

Many data to be deleted can be simply reset using dconf (or gconf / gsettings on older machines) There was already a post here in the forum: Create custom cleaner_data in binary file? -- BleachBit Forum

Examples to clean history for several applications:

gsettings reset org.mate.panel history-mate-run # reset the run bar entries using ALT+F2
dconf reset /org/mate/panel/general/history-mate-run # same using dconf
dconf reset /org/mate/search-tool/search-history # search tool history
dconf reset /org/x/editor/state/history-entry/history-search-for # xed/ like gedit reset search history (search for)
dconf reset /org/x/editor/state/history-entry/history-replace-with # xed/ like gedit reset search history (replace with)
dconf reset /org/x/pix/rename-series/template # in pix / like gthumb reset rename template
dconf reset /com/linuxmint/mintmenu/plugins/recent/recent-apps-list  # Mint menu of recently used apps (shown in tab next to recent files which are saved in different location / xbel file)

These are for Linux Mint MATE

Please integrate a function to either run shell scripts or dconf integration directly (as per the "actions") This would make development easier, event though the commands need to be adapted to programs and desktop environments

az0 commented 3 years ago

Many data to be deleted can be simply reset using dconf (or gconf / gsettings on older machines)

That's an interesting idea.

Please integrate a function to either run shell scripts or dconf integration directly (as per the "actions")

See command="process" in windows_explorere.xml for an example of running an external process, and try this for shell scripts. Let me know how it goes.

pas-calc commented 3 years ago

Thanks for the answer, I highly appreciate this by one of the official author! Yet I have the impression that the project is not under active development, especially concerning the intergration of new cleaners. Using dpkg -L bleachbit one sees that only some cleaners are saved to /usr/share/bleachbit whereby there exists some more online here in this repository which in turn is not very much again because there are many unanswered pull requests (new cleaner definition files to be added)

I've written a cleaner now on my own, to be saved here ~/.config/bleachbit/cleaners (CleanerML markup language)

Now concerning the idea to use "process", this one I've missed in the "actions" description, by the way one can see that this is rarely used (actually just once as mentioned in the "windows explorer"): https://github.com/search?q=process+repo%3Ableachbit%2Fbleachbit+extension%3Axml&type=Code&ref=advsearch&l=&l=

Maybe it only works on Windows machines? I am using Linux Mint 20 Ulyana / MATE 1.24.0 / Kernel: 5.4.0-62-generic x86_64 / 64 bits.

I have given it a try and unfortunately it failed. xml definition: <action command="process" cmd="dconf reset /org/x/editor/state/history-entry/history-search-for"/>

Bleachbit error message after invoking run cleaner in the gui:

clean_operation('xed'), options = '['history']' running cmd dconf reset /org/x/editor/state/history-entry/history-search-for Command: dconf reset /org/x/editor/state/history-entry/history-search-for Return code: 1 Stdout: Stderr: error: Cannot autolaunch D-Bus without X11 $DISPLAY

The error message is misleading in so far as an display is not needed, pressing Ctrl+Alt+F1 to change to other shell and running the command "dconf ..." it works fine, which sounds natural since it is not linked to a display server or window manager.

az0 commented 3 years ago

Bleachbit error message after invoking run cleaner in the gui:

clean_operation('xed'), options = '['history']' running cmd dconf reset /org/x/editor/state/history-entry/history-search-for Command: dconf reset /org/x/editor/state/history-entry/history-search-for Return code: 1 Stdout: Stderr: error: Cannot autolaunch D-Bus without X11 $DISPLAY

The error message is misleading in so far as an display is not needed, pressing Ctrl+Alt+F1 to change to other shell and running the command "dconf ..." it works fine, which sounds natural since it is not linked to a display server or window manager.

If you are running a graphical terminal, then it allows dconf to access the display server. You can test it by unsetting some environment variables, including: DISPLAY, DBUS_SESSION_BUS_ADDRESS, XAUTHORITY.

There's a hack here that might help for now https://ubuntu-mate.community/t/error-cannot-autolaunch-d-bus-without-x11-display/11928/2

For the future, you can create a bug ticket at https://github.com/bleachbit/bleachbit/issues

pas-calc commented 3 years ago

If you are running a graphical terminal, then it allows dconf to access the display server. You can test it by unsetting some environment variables, including: DISPLAY, DBUS_SESSION_BUS_ADDRESS, XAUTHORITY.

As I mentioned,

test procedure: open terminal (within desktop environment) and write , you see the expected behavior

$ echo $DISPLAY
:0

Press ctrl+alt+f1 to change to other terminal , log in and repeat the command above, as expected it returns nothing, but dconf reset still works