/d/Qubes

N/A subscribers

N/A


This is how you disable Javascript by default in Tor Browser in disposables

by /u/TheDentist · 0 votes · 2024-03-07 23:20:00

I hate that Tor Browser starts up in Whonix disposables with the weakest security setting and Javascript enabled. Here's how to change it:
1. open a terminal in the whonix-workstation-17-dvm template
2.

sudo vi /rw/config/rc.local
3. add this:
cat >>/var/cache/tb-binary/.tb/tor-browser/Browser/defaults/pref/autoconfig.js <<'EOF'
pref("general.config.filename", "tor-browser.cfg");
pref("general.config.obscure_value", 0);
EOF

cat >>/var/cache/tb-binary/.tb/tor-browser/Browser/tor-browser.cfg <<'EOF'
// TORBROWSER DEFAULTS
lockPref("browser.security_level.security_slider", 1);
lockPref("intl.language_notification.shown", true);
lockPref("javascript.enabled", false);
EOF

chown -R user:user /var/cache/tb-binary/.tb/tor-browser/Browser

4. shut down the template
5. start tor browser in a whonix disposable and check your settings

idk why Tor Browser ppl seem so keen to not let you change that security slider but I tried both distribution/policies.json and user.js, and neither let you set the slider down to safest. only lockPref does it?? You can set javascript.enabled false in user.js if you don't want to lockPref it but you can't do that in distribution/policies.json either.

Credit: a mix of
- /u/auraaura on /post/8e3975b778b4fdb22290
- http://eweiibe6tdjsdprb4px6rqrzzcsi22m4koia44kc5pcjr7nec2rlxyad.onion/tpo/applications/tor-browser/-/issues/41523⚠️
- and me=)

Comments (7)
/u/HeadJanitor · N/A votes · 7th March, 2024 - 23:24 · Link

Fantastic, write-up, /u/TheDentist. Thank you very much.

/u/TheDentist · N/A votes · 7th March, 2024 - 23:31 · Link

Thanks!

/u/Dr_Nick · N/A votes · 11th March, 2024 - 16:31 · Link

Is this possible to do on thails OS itself? thanks for the info

/u/TheDentist · N/A votes · 12th March, 2024 - 01:54 · Link

tails? idk about that, this is for qubes

/u/[deleted] · N/A votes · 8th March, 2024 - 00:00 · Link

Useful thank you.

/u/Xanitforthecash · N/A votes · 8th March, 2024 - 00:03 · Link

thanks for this, feels like booting up is a 15 min chore

/u/brbbro · N/A votes · 8th March, 2024 - 02:06 · Link

Bro... you are a fucking god!! I have been trying to figure this out for fucking ever because every time I open a browser I have to do "about:config" and turn it off manually. Life Saver!

/u/take0ut · N/A votes · 9th March, 2024 - 16:43 · Link

oh tyyyyy i was tired of enabling it every fucking time.

/u/heavyweaponsguy · N/A votes · 10th March, 2024 - 08:50 · Link

Holy shit, thank you so much

/u/heavyweaponsguy · N/A votes · 10th March, 2024 - 08:53 · Link

I tried for a while to get the settings to persist in a dvm, but you can't even launch TB there. I tried looking for overriding flags to pass to the tor-browser package, renaming the dvm, a few things. Very much appreciated /u/TheDentist

/u/TheDentist · N/A votes · 12th March, 2024 - 02:06 · Link

that file /rw/config/rc.local is the one to edit to make things persist, I found it in a split ssh guide (maybe this one: https://forum.qubes-os.org/t/split-ssh/19060 but I can't check rn, qubes forums need javascript and eh, I jammed it off=)