summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranonym <anonym@riseup.net>2016-02-10 21:02:39 +0100
committeranonym <anonym@riseup.net>2016-02-11 00:19:21 +0100
commita8021ec093b62026e10e752dc1c0f5fb066e6bf7 (patch)
treeb93b3760ce907c6dc5fa67cd62c6ed3a1b628c71
parent4173d78b97ad598aba59c91e7c742b8892a8341c (diff)
Do the fontconfig dance with all browsers.
I.e. also the Unsafe and I2P Browser's. The main reason is so we do not need different images for these and the Tor browser in the automated test suite. One may argue, though, that for the Unsafe Browser this list of fonts would be fingerprintable, but I would be surprised if it already isn't so due to the Tor Browser Firefox patches.
-rwxr-xr-xconfig/chroot_local-includes/usr/local/bin/tor-browser10
-rw-r--r--config/chroot_local-includes/usr/local/lib/tails-shell-library/tor-browser.sh26
-rw-r--r--wiki/src/contribute/release_process/tor-browser.mdwn6
3 files changed, 24 insertions, 18 deletions
diff --git a/config/chroot_local-includes/usr/local/bin/tor-browser b/config/chroot_local-includes/usr/local/bin/tor-browser
index fcdee2a..483a915 100755
--- a/config/chroot_local-includes/usr/local/bin/tor-browser
+++ b/config/chroot_local-includes/usr/local/bin/tor-browser
@@ -55,16 +55,6 @@ start_browser() {
# not enough to simply set intl.locale.matchOS to true.
configure_best_tor_browser_locale "${PROFILE}"
- unset SESSION_MANAGER
-
- export FONTCONFIG_PATH="${TBB_INSTALL}/TorBrowser/Data/fontconfig"
- export FONTCONFIG_FILE="fonts.conf"
-
- # The Tor Browser often assumes that the current directory is
- # where the browser lives, e.g. for the fixed set of fonts set by
- # fontconfig above.
- cd "${TBB_INSTALL}"
-
exec_firefox -allow-remote --class "Tor Browser" -profile "${PROFILE}" "${@}"
}
diff --git a/config/chroot_local-includes/usr/local/lib/tails-shell-library/tor-browser.sh b/config/chroot_local-includes/usr/local/lib/tails-shell-library/tor-browser.sh
index 709dc5c..24d274c 100644
--- a/config/chroot_local-includes/usr/local/lib/tails-shell-library/tor-browser.sh
+++ b/config/chroot_local-includes/usr/local/lib/tails-shell-library/tor-browser.sh
@@ -5,16 +5,30 @@ TBB_PROFILE=/etc/tor-browser/profile
TBB_EXT=/usr/local/share/tor-browser-extensions
TOR_LAUNCHER_LOCALES_DIR=/usr/share/tor-launcher-standalone/chrome/locale
+exec_firefox_helper() {
+ local binary="${1}"; shift
+
+ export LD_LIBRARY_PATH="${TBB_INSTALL}"
+ export FONTCONFIG_PATH="${TBB_INSTALL}/TorBrowser/Data/fontconfig"
+ export FONTCONFIG_FILE="fonts.conf"
+
+ # The Tor Browser often assumes that the current directory is
+ # where the browser lives, e.g. for the fixed set of fonts set by
+ # fontconfig above.
+ cd "${TBB_INSTALL}"
+
+ # From start-tor-browser:
+ unset SESSION_MANAGER
+
+ exec "${TBB_INSTALL}"/"${binary}" "${@}"
+}
+
exec_firefox() {
- LD_LIBRARY_PATH="${TBB_INSTALL}"
- export LD_LIBRARY_PATH
- exec "${TBB_INSTALL}"/firefox "${@}"
+ exec_firefox_helper firefox "${@}"
}
exec_unconfined_firefox() {
- LD_LIBRARY_PATH="${TBB_INSTALL}"
- export LD_LIBRARY_PATH
- exec "${TBB_INSTALL}"/firefox-unconfined "${@}"
+ exec_firefox_helper firefox-unconfined "${@}"
}
guess_best_tor_browser_locale() {
diff --git a/wiki/src/contribute/release_process/tor-browser.mdwn b/wiki/src/contribute/release_process/tor-browser.mdwn
index 071fc53..d8faca0 100644
--- a/wiki/src/contribute/release_process/tor-browser.mdwn
+++ b/wiki/src/contribute/release_process/tor-browser.mdwn
@@ -94,8 +94,10 @@ the corresponding tarballs ourselves, so read on the next section.
Sync with the start-tor-browser script
======================================
-Adapt our `config/chroot_local-includes/usr/local/bin/tor-browser` for
-recent changes in `RelativeLink/start-tor-browser` in the
+Adapt our `config/chroot_local-includes/usr/local/bin/tor-browser`
+and/or
+`config/chroot_local-includes/usr/local/lib/tails-shell-library/tor-browser.sh`
+for recent changes in `RelativeLink/start-tor-browser` in the
[Tor Browser Bundle Git repo](https://git.torproject.org/builders/tor-browser-bundle.git). Look
in the Git history: