Go back to topic: Set custom preferences for Brave browser in disposable qube
[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] |
// Disable Tor, use Tor Browser instead "tor": { "tor_disabled": true }, |
cat << 'EOF' | sudo tee | 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 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 ``` |
"show_brave_news": false, |
``` 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 | |
" | // Select Auto-redirect AMP pages "de_amp": { "enabled": true }, // Select Auto-redirect tracking URLs "debounce": { "enabled": true }, |
// Uncheck all social media components | |
| // 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": | "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] 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. |
"should_allow_ads_subdivision_targeting": false |
" | "v7": true |
"httpsUpgrades": 2 | "httpsUpgrades": 2, "javascript_jit": 2 |
sudo touch /rw/config/qubes-bind-dirs.d/50_brave.conf |