summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranonym <anonym@riseup.net>2015-09-14 19:09:27 +0200
committeranonym <anonym@riseup.net>2015-09-16 20:59:39 +0200
commit36016e8748588d2adce7b4ff92a09471f983b4ee (patch)
tree262b9b07e64c64897e62a377ffb7ce7339fe0360
parent4ddbc9da61fd6a6109a311da753fe9f4c1f93aeb (diff)
Abstract the chroot browser prefs.js configurations.
I.e. move the common parts to a shared prefs.js used for all chroot browser files. Will-fix: #9896
-rw-r--r--config/chroot_local-includes/usr/local/lib/tails-shell-library/chroot-browser.sh3
-rw-r--r--config/chroot_local-includes/usr/share/tails/chroot-browser/prefs.js20
-rw-r--r--config/chroot_local-includes/usr/share/tails/i2p-browser/prefs.js14
-rw-r--r--config/chroot_local-includes/usr/share/tails/unsafe-browser/prefs.js20
4 files changed, 23 insertions, 34 deletions
diff --git a/config/chroot_local-includes/usr/local/lib/tails-shell-library/chroot-browser.sh b/config/chroot_local-includes/usr/local/lib/tails-shell-library/chroot-browser.sh
index 3cee490..74600cc 100644
--- a/config/chroot_local-includes/usr/local/lib/tails-shell-library/chroot-browser.sh
+++ b/config/chroot_local-includes/usr/local/lib/tails-shell-library/chroot-browser.sh
@@ -136,7 +136,8 @@ configure_chroot_browser_profile () {
# Set preferences
local browser_prefs="${browser_profile}/preferences/prefs.js"
mkdir -p "$(dirname "${browser_prefs}")"
- cp "/usr/share/tails/${browser_name}/prefs.js" "${browser_prefs}"
+ cat "/usr/share/tails/chroot-browser/prefs.js" \
+ "/usr/share/tails/${browser_name}/prefs.js" > "${browser_prefs}"
# Set browser home page to something that explains what's going on
if [ -n "${home_page}" ]; then
diff --git a/config/chroot_local-includes/usr/share/tails/chroot-browser/prefs.js b/config/chroot_local-includes/usr/share/tails/chroot-browser/prefs.js
new file mode 100644
index 0000000..606e9d5
--- /dev/null
+++ b/config/chroot_local-includes/usr/share/tails/chroot-browser/prefs.js
@@ -0,0 +1,20 @@
+// Disable update checking
+pref("app.update.enabled", false);
+pref("extensions.update.enabled", false);
+
+// Disable fetching of the new tab page's Tiles links/ads. Ads are
+// generally unwanted, and also the fetching is a "phone home" type of
+// feature that generates traffic at least the first time the browser
+// is started. It won't work in e.g. the I2P Browser, too.
+pref("browser.newtabpage.directory.source", "");
+pref("browser.newtabpage.directory.ping", "");
+// ... and disable the explanation shown the first time
+pref("browser.newtabpage.introShown", true);
+
+/* Prevent File -> Print or CTRL+P from causing the browser to hang
+ for several minutes while trying to communicate with CUPS, since
+ access to port 631 isn't allowed through. */
+pref("print.postscript.cups.enabled", false);
+
+// Hide "Get Addons" in Add-ons manager
+pref("extensions.getAddons.showPane", false);
diff --git a/config/chroot_local-includes/usr/share/tails/i2p-browser/prefs.js b/config/chroot_local-includes/usr/share/tails/i2p-browser/prefs.js
index 8a9ab85..fdcdef9 100644
--- a/config/chroot_local-includes/usr/share/tails/i2p-browser/prefs.js
+++ b/config/chroot_local-includes/usr/share/tails/i2p-browser/prefs.js
@@ -7,21 +7,9 @@ pref("network.proxy.http_port", 4444);
pref("network.proxy.no_proxies_on", "127.0.0.1");
pref("network.proxy.ssl", "127.0.0.1");
pref("network.proxy.ssl_port", 4444);
+
// Disable searching from the URL bar
pref("keyword.enabled", false);
-// Hide "Get Addons" in Add-ons manager
-pref("extensions.getAddons.showPane", false);
-/* Prevent File -> Print or CTRL+P from causing the browser to hang
- for several minutes while trying to communicate with CUPS, since
- access to port 631 isn't allowed through. */
-pref("print.postscript.cups.enabled", false);
-
-// Disable fetching of the new tab page's Tiles links/ads. It will not
-// work in the I2P Browser.
-pref("browser.newtabpage.directory.source", "");
-pref("browser.newtabpage.directory.ping", "");
-// ... and disable the explanation shown the first time
-pref("browser.newtabpage.introShown", true);
// Never add 'www' or '.com' to hostnames in I2P Browser.
pref("browser.fixup.alternate.enabled", false);
diff --git a/config/chroot_local-includes/usr/share/tails/unsafe-browser/prefs.js b/config/chroot_local-includes/usr/share/tails/unsafe-browser/prefs.js
index e842e3f..1a21a1f 100644
--- a/config/chroot_local-includes/usr/share/tails/unsafe-browser/prefs.js
+++ b/config/chroot_local-includes/usr/share/tails/unsafe-browser/prefs.js
@@ -2,31 +2,11 @@
pref("network.proxy.type", 0);
pref("network.proxy.socks_remote_dns", false);
-// Disable update checking
-pref("app.update.enabled", false);
-pref("extensions.update.enabled", false);
-
-/* Prevent File -> Print or CTRL+P from causing the browser to hang
- for several minutes while trying to communicate with CUPS, since
- access to port 631 isn't allowed through. */
-pref("print.postscript.cups.enabled", false);
-// Hide "Get Addons" in Add-ons manager
-pref("extensions.getAddons.showPane", false);
-
/* Google seems like the least suspicious choice of default search
engine for the Unsafe Browser's in-the-clear traffic. */
user_pref("browser.search.defaultenginename", "Google");
user_pref("browser.search.selectedEngine", "Google");
-// Disable fetching of the new tab page's Tiles links/ads. Ads are
-// generally unwanted, and also the fetching is a "phone home" type of
-// feature that generates traffic at least the first time the browser
-// is started.
-pref("browser.newtabpage.directory.source", "");
-pref("browser.newtabpage.directory.ping", "");
-// ... and disable the explanation shown the first time
-pref("browser.newtabpage.introShown", true);
-
// Don't use geographically specific search prefs, like
// browser.search.*.US for US locales. Our generated amnesia branding
// add-on localizes search-engines in an incompatible but equivalent