Set custom preferences for Brave browser in disposable qube revisions

Go back to topic: Set custom preferences for Brave browser in disposable qube

  1. v11 anchor; v11 full version
  2. v10 anchor; v10 full version
  3. v9 anchor; v9 full version
  4. v8 anchor; v8 full version
  5. v7 anchor; v7 full version
  6. v6 anchor; v6 full version
  7. v5 anchor; v5 full version
  8. v4 anchor; v4 full version
  9. v3 anchor; v3 full version
  10. v2 anchor; v2 full version

Revision #11

Edited on
2024-10-16
Edited by user
apparatus
[details="To set it up in the template instead of a disposable template use these commands in the template instead:"] ``` sudo mkdir -p /opt/brave.com/brave sudo cp /home/user/QubesIncoming/*/initial_preferences /opt/brave.com/brave/ ``` [/details]
sudo mkdir -p /rw/config/qubes-bind-dirs.d cat << 'EOF' | sudo tee -a /rw/config/qubes-bind-dirs.d/50_brave.conf > /dev/null binds+=( '/etc/brave/policies/managed/GroupPolicy.json' ) EOF sudo mkdir -p /rw/bind-dirs/etc/brave/policies/managed/ cat << 'EOF' | sudo tee /rw/bind-dirs/etc/brave/policies/managed/GroupPolicy.json > /dev/null { // Disable Tor, use Tor Browser instead "TorDisabled": true, // Uncheck Automatically send diagnostic reports "MetricsReportingEnabled": false } EOF ``` [details="To set it up in the template instead of a disposable template use these commands in the template instead:"] ```
[/details]
They are stored in `~/.config/BraveSoftware/Brave-Browser/Local State` file so you can create this file in the disposable template's user home directory: ``` cat << 'EOF' | tee ~/.config/BraveSoftware/Brave-Browser/Local\ State > /dev/null { // Uncheck Continue running apps when Brave is closed to disable background apps "background_mode": { "enabled": false }, // Disable hardware acceleration "hardware_acceleration_mode": { "enabled": false }, // Disable Tor, use Tor Browser instead "tor": { "tor_disabled": true }, "brave": { // Uncheck Allow privacy-preserving product analytics (P3A) "p3a": { "enabled": false }, // Uncheck Automatically send daily usage ping to Brave "stats": { "reporting_enabled": false } }, // Uncheck Automatically send diagnostic reports "user_experience_metrics": { "reporting_enabled": false } } EOF ``` [details="To set it up in the template instead of a disposable template use these commands in the template instead:"]
`````` [/details]

Revision #10

Edited on
2024-10-16
Edited by user
apparatus

Revision #9

Edited on
2024-10-15
Edited by user
apparatus
// Disable Tor, use Tor Browser instead "tor": { "tor_disabled": true },

Revision #8

Edited on
2024-10-15
Edited by user
apparatus
cat << 'EOF' | sudo tee -a /etc/brave/policies/managed/GroupPolicy.json /dev/null cat << 'EOF' | sudo tee /etc/brave/policies/managed/GroupPolicy.json > /dev/null
Can't be changed using `initial_preferences` or policy settings so you'll need to change them manually. They are stored in `~/.config/BraveSoftware/Brave-Browser/Local State` file.Can't be changed using `initial_preferences` or policy settings so you'll need to change them manually. They are stored in `~/.config/BraveSoftware/Brave-Browser/Local State` file so you can place this file in the `/etc/skel` directory in the template so it'll be copied to the newly created app qubes: ``` sudo mkdir -p /etc/skel/.config/BraveSoftware/Brave-Browser/ cat << 'EOF' | sudo tee /etc/skel/.config/BraveSoftware/Brave-Browser/Local\ State > /dev/null { // Uncheck Continue running apps when Brave is closed to disable background apps "background_mode": { "enabled": false }, // Disable hardware acceleration "hardware_acceleration_mode": { "enabled": false }, "brave": { // Uncheck Allow privacy-preserving product analytics (P3A) "p3a": { "enabled": false }, // Uncheck Automatically send daily usage ping to Brave "stats": { "reporting_enabled": false } }, // Uncheck Automatically send diagnostic reports "user_experience_metrics": { "reporting_enabled": false } } EOF ```

Revision #7

Edited on
2024-10-15
Edited by user
apparatus
"show_brave_news": false,

Revision #6

Edited on
2024-10-15
Edited by user
apparatus
``` If you want to check which option in JSON preferences file correspond to which option in GUI then you can do this: Switch option on/off. Save config: ``` python3 -m json.tool ~/.config/BraveSoftware/Brave-Browser/Default/Preferences > pref1 ``` Switch option off/on. Save config: ``` python3 -m json.tool ~/.config/BraveSoftware/Brave-Browser/Default/Preferences > pref2 ``` Check differences: ``` diff -u5 -I '"last_modified"' -I '"time"' -I '"session_last_active_time"' -I '"last_update_time"' -I '"left"' -I '"right"' -I '"last_engagement_time"' -I '"lastEngagementTime"' -I '"pointsAddedToday"' -I '"rawScore"' -I '"tab_count"' pref1 pref2 | less
// Hide Brave Rewards button
"enable_media_router_on_restart": false, // Select Auto-redirect AMP pages "de_amp": { "enabled": true }, // Select Auto-redirect tracking URLs "debounce": { "enabled": true },
// Uncheck all social media components
"google_login_default": false, "hangouts_enabled": false, "ipfs": { "resolve_method": 3 // Uncheck all social media components "linkedin_embed_default": false, // Uncheck Use Google services for push messaging "gcm": { "channel_status": false
// Select Prevent sites from fingerprinting me based on my language preferences "reduce_language": true, // Hide Brave Rewards button
// Uncheck all social media components
// Select Extensions (no fallback) under Default Solana wallet
// Select Extensions (no fallback) under Default Ethereum wallet
// Uncheck all built-in extensions you don't use
// Uncheck all built-in extensions you don't use
// Select Aggressive under Trackers & ads blocking
// Check Block fingerprinting
"setting": 2 "setting": 3
// Select Block third-party cookies "cookie_controls_mode": 1,
// Check Forget me when I close this site
// Select Delete data sites have saved to your device when you close all windows under Sites and Shields Settings → Content → Additional content settings → On-device site data.
// Select Strict under Upgrade connections to HTTPS
// Select Automatically remove permissions from unused sites under Sites and Shields Settings "safety_hub": { "unused_site_permissions_revocation": { "enabled": false } }, // Disable Show search suggestions "search": { "suggest_enabled": false }, // Select Disable non-proxied UDP under WebRTC IP Handling Policy
[/details][/details] Some settings can't be changed using `initial_preferences` and you need to use policy settings: ``` sudo mkdir -p /etc/brave/policies/managed/ cat << 'EOF' | sudo tee -a /etc/brave/policies/managed/GroupPolicy.json /dev/null { // Disable Tor, use Tor Browser instead "TorDisabled": true, // Uncheck Automatically send diagnostic reports "MetricsReportingEnabled": false } EOF ``` But these options: * Uncheck **Allow privacy-preserving product analytics (P3A)** * Uncheck **Automatically send daily usage ping to Brave** * Uncheck Continue running apps when Brave is closed to disable background apps Can't be changed using `initial_preferences` or policy settings so you'll need to change them manually. They are stored in `~/.config/BraveSoftware/Brave-Browser/Local State` file.

Revision #5

Edited on
2024-10-15
Edited by user
apparatus

Revision #4

Edited on
2024-10-15
Edited by user
apparatus
"should_allow_ads_subdivision_targeting": false, "state": { "has_migrated": { "client": { "v7": true }, "confirmations": { "v8": true } } } "should_allow_ads_subdivision_targeting": false

Revision #3

Edited on
2024-10-15
Edited by user
apparatus
"v6": true "v7": true
"httpsUpgrades": 2 "httpsUpgrades": 2, "javascript_jit": 2

Revision #2

Edited on
2024-06-30
Edited by user
apparatus
sudo touch /rw/config/qubes-bind-dirs.d/50_brave.conf