I wanted to change the default search engine for Tor Browser in disposable VMs but it’s not possible to do this using user.json file in /usr/local/etc/torbrowser.d/user.js
. But it’s possible to do this using policies.json file.
In Whonix-Workstation disposable template (whonix-ws-xx-dvm) add these lines to the /rw/config/rc.local
file:
mkdir /var/cache/tb-binary/.tb/tor-browser/Browser/distribution
cat > /var/cache/tb-binary/.tb/tor-browser/Browser/distribution/policies.json <<EOF
{
"policies": {
"SearchEngines": {
"Default": "DuckDuckGoOnion"
}
}
}
EOF
chown -R user:user /var/cache/tb-binary/.tb/tor-browser/Browser/distribution
And shutdown the disposable template.
After this all the disp VMs based on this disposable template will use these policies.
It’s also possible to set the security slider using policiy file but it’ll only work if it’s locked and you won’t be able to change the security slider in Tor Browser.
{
"policies": {
"SearchEngines": {
"Default": "DuckDuckGoOnion"
},
"Preferences": {
"browser.security_level.security_slider": {
"Value": 1,
"Status": "locked"
}
}
}
}