Brave Disposable

Hi all, I’ve been using qubes as my daily driver for about 7 months now on my Thinkpad T430 and I’m doing much better than expected.

I am reorganizing my AppVMs and am trying hard to create a Disposable VM with “fresh install” Brave installed. Trying to be more clear, my goal would be to be able to provide Brave Disposable with a “minimal” config file containing the settings and that’s it; this is so that it can be used smoothly, without every time I start it automatically opening the “brave://welcome/” page and then having to put in the correct settings. (I hope I have been clear).

The only way I have been able to do it is to create an AppVM, start Brave and then later make it Disposable, by doing this brave creates a lot of unnecessary files and modifies the Local State file with an ID number, the first boot, … (if I understand the file correctly); here, I would like to avoid this, I would like to use Brave without all this crap created by the first startup and that can make the browser more identifiable, I would like something that I open and it is like the first startup but already set up, am I asking too much? :slight_smile:

I’ve spent a lot of time online in the last few days looking for a solution; I understand that to do this I need to create the “Preferences” file in the “~/.config/BraveSoftware/Brave-Browser/Default/” folder and the “Local State” file in “~/.config/BraveSoftware/Brave-Browser/”, I tried to create my own “minimal” configuration, (which I will attach below) and put it inside these files (this in the template, but I tried out of desperation also inside the AppVM), and then start Brave… But no success.

I also tried following this guide, which puts as the path to these files “/etc/skel/.config/BraveSoftware/Brave-Browser/” but… no success. I also tried running this script, but still no success.

(Actually once in one of these trials I was able to provide the settings, but at startup there was always the “brave://welcome/” screen that makes you configure the browser and makes it really slow to start up)

Has anyone been able to do what I would like to do or have any advice?
Thank you very much in advance, I tried to be clear, I hope I was :slight_smile:

Preferences file:

{

        "session": {
            "restore_on_startup": 5
        },

        "extensions": {
            "theme": {
                "system_theme": 1
            }
        },
        "bookmark_bar": {
            "show_on_all_tabs": true
        },
        "brave": {

            "enable_closing_last_tab": true,

            "wayback_machine_enabled": false,
            "enable_window_closing_confirm": true,

        "autofill_private_windows": false,

            "ipfs": {
                "resolve_method": 3
            },

            "wallet": {
                "default_solana_wallet": 1,
                "default_wallet2": 1,
                "show_wallet_icon_on_toolbar": false,
                "nft_discovery_enabled": false,
                "auto_pin_enabled": false
            },

            "hangouts_enabled": false,
            "webtorrent_enabled": false,

            "other_search_engines_enabled": false,
            "web_discovery_enabled": false,

            "gcm": {
                "channel_status": false
            },

            "google_login_default": false,
            "fb_embed_default": false,
            "twitter_embed_default": false,
            "linkedin_embed_default": false,

            "rewards": {
                "inline_tip_buttons_enabled": false,
                "show_brave_rewards_button_in_location_bar": false
            },

            "shields": {

                "advanced_view_enabled": true,
                "stats_badge_visible": false
            },
            "de_amp": {
                "enabled": true
            },
            "debounce": {
                "enabled": true
            },
            "reduce_language": true,
            "no_script_default": false,

            "new_tab_page": {
                "hide_all_widgets": true,
                "show_background_image": true,
                "show_branded_background_image": false,
                "show_clock": false,
                "show_stats": false,
                "show_together": false,
                "shows_options": 0
            },
            "show_side_panel_button": false,
            "today": {
                "should_show_toolbar_button": false
            },
            "location_bar_is_wide": false,
            "omnibox": {
                "prevent_url_elisions": false,
                "bookmark_suggestions_enabled": true,
                "history_suggestions_enabled": true
            },
            "sidebar": {
                "sidebar_show_option": 3
            },
            "show_side_panel_button": false,
            "autocomplete_enabled": true,
            "top_site_suggestions_enabled": true,
            "tabs_search_show": true,
            "tabs": {
                "mute_indicator_not_clickable": false,
                "vertical_tabs_enabled": false,
                "hover_mode": 1
            },
            "speedreader": {
                "enabled": false
            },
            "mru_cycling_enabled": false
        },
        "browser": {

            "enable_spellchecking": false,

            "clear_data": {
                "browsing_history_on_exit": true,
                "cache_on_exit": true,
                "cookies_on_exit": true,
                "download_history_on_exit": true,
                "form_data_on_exit": true,
                "hosted_apps_data_on_exit": true,
                "passwords_on_exit": true,
                "site_settings_on_exit": false
            },
            "show_home_button": false,
            "custom_chrome_frame": false
        },

        "ntp": {
            "shortcust_visible": false
        },

        "profile": {
            "content_settings": {
                "exceptions": {
                    "fingerprintingV2": {
                        "*,*": {
                            "setting": 2
                        }
                    },
                    "cosmeticFiltering": {
                        "*,*": {
                            "setting": 2
                        },
                        "*,https://firstparty": {
                            "setting": 2
                        }
                    },
                    "shieldsAds": {
                        "*,*": {
                            "setting": 2
                        }
                    },
                    "trackers": {
                        "*,*": {
                            "setting": 2
                        }
                    }
                }
            },
            "cookie_controls_mode": 1,
            "default_content_setting_values": {

                "ar": 2,
                "automatic_downloads": 1,
                "autoplay": 1,
                "brave_ethereum": 2,
                "brave_google_sign_in": 2,
                "brave_solana": 2,
                "clipboard": 2,
                "file_system_write_guard": 2,
                "geolocation": 2,
                "hid_guard": 2,
                "images": 1,
                "local_fonts": 2,
                "media_stream_camera": 2,
                "media_stream_mic": 2,
                "midi_sysex": 2,
                "notifications": 2,
                "payment_handler": 2,
                "popups": 2,
                "sensors": 2,
                "serial_guard": 2,
                "sound": 1,
                "usb_guard": 2,
                "vr": 2,
                "window_placement": 2,

                "cookies": 4,
                "brave_remember_1p_storage": 2,
                "httpsUpgrades": 2
            }
        },

        "webrtc": {
            "ip_handling_policy": "disable_non_proxied_udp"
        },

        "enable_do_not_track": false,

        "safebrowsing": {
            "enabled": false
        },
        "https_only_mode_enabled": true,

        "custom_handlers": {
            "enabled": false
        },
        "plugins": {
            "always_open_pdf_externally": true
        },
        "webkit": {
            "webprefs": {
                "encrypted_media_enabled": false
            }
        },

        "default_search_provider": {
            "synced_guid": "485bf7d3-0215-45af-87dc-538868000510"
        },
        "default_search_provider_data": {
            "template_url_data": {
                "keyword": ":sp",
                "prepopulate_id": 510,
                "short_name": "Startpage",
                "synced_guid": "485bf7d3-0215-45af-87dc-538868000510",
                "url": ""
            }
        },
        "search": {
            "suggest_enabled": false
        },

        "signin": {
            "allowed": false
        },
        "media_router": {
            "enable_media_router": false
        },

        "autofill": {
            "credit_card_enabled": false,
            "profile_enabled": false
        },
        "credentials_enable_autosignin": false,
        "credentials_enable_service": false,
        "payments": {
            "can_make_payment_enabled": false
        },

        "translate": {
            "enabled": false
        },

        "download": {
            "prompt_for_download": false
        },
        "download_bubble": {
            "partial_view_enabled": true
        }
}

Local State file:

{

	  "browser": {
	    "first_run_finished": true
	  },

	  "background_mode": {
	    "enabled": false
	  },
	  
        "brave": {

            "dont_ask_for_crash_reporting": true,

            "ens": {
                "resolve_method": 1
            },
            "sns": {
                "resolve_method": 1
            },
            "unstoppable_domains": {
                "resolve_method": 1
            },

            "widevine_opted_in": false,

            "p3a": {
                "enabled": false
            },
            "stats": {
                "reporting_enabled": false
            },
	    "ad_block": {
	      "checked_all_default_regions": true,
	      "cookie_list_setting_touched": true,
	      "mobile_notifications_list_setting_touched": true,
	      "regional_filters": {
		"319A754E-065A-465F-B09D-3F2C7BF1E67B": {
		  "enabled": false
		},
		"67E792D4-AE03-4D1A-9EDE-80E01C81F9B8": {
		  "enabled": true
		}
	      }
            },
            "dark_mode": 1
        },

        "user_experience_metrics": {
            "reporting_enabled": false
        },

        "dns_over_https": {
            "mode": "secure",
            "templates": "https://dns.adguard-dns.com/dns-query"
        },

        "tor": {
            "tor_disabled": true
        },

        "background_mode": {
            "enabled": false
        },
        "hardware_acceleration_mode": {
            "enabled": false
        },
	"performance_tuning": {
	  "high_efficiency_mode": {
	    "state": 2
	  }
	}
}

I too, wanted something similar but I was a lot less picky with it. I’m fine that my disposable template (which isn’t the same thing as a TemplateVM, it is actually an AppVM) has a fair amount of junk, as long as it doesn’t have cookies. Note that in my case, fingerprint.com returns the same thing in each instance of the dvm (IIRC). What does it do for your Brave Disposable?

(if you want a different fingerprint each time, you must use Tor browser instead)

If I understood you well, this is what I do

I have the same problem

okay, so I’m going to try to take the folder and try to make it “minimal,” removing every ID, first start date, …
Only note is that to me the /etc/skel/ folder is empty, the folder instead with the brave profile should be this: ~/.config/BraveSoftware/Brave-Browser/

Thank you!

1 Like

It’s not “instead”. Structure of skel folder is not Qubes specific. It’s a common Linux point to create the default settings in a new user’s home directory, and disposableVM is exactly that - each time new user.

It’s not true with disposable templates. All DispVM inherits of the root volume from the original template and the private volume from the disposable template. It means that if you put something in /home/user inside the disposable template, it will be here in each DispVM generated from it. That’s also why skel can’t work here, because the user folder is already present at boot time.

2 Likes

Yes, I meant “clean” - default as I wrote at the the beginning of the last sentence of my last post.

1 Like

In this guide, the files are in /etc/skel/ because it’s the settings for the template.
In the section Disposable templates, the disposable template web-dvm is created based on a template and got the Brave config files in the user home directory.
(Content of /etc/skel/ is copied (upon creation) to the home directory of the app qube based on that template.)

Just create the empty file First Run in ~/.config/BraveSoftware/Brave-Browser/

[user@some_qube ~]$ touch "$HOME/.config/BraveSoftware/Brave-Browser/First Run"

You just need 3 files in your disposable template:
The 2 config files (Local State and Preferences) and the empty First Run file.

edit:
I updated the guide.
With the 3 files mentioned above, you might also want to add:

{
    "browser": {
        "has_seen_welcome_page": true
    }
}

to the Preferences config file.
I think that will prevent the welcome page to be displayed when Brave is updated.