Commit 88fc15fc authored by Tails developers's avatar Tails developers
Browse files

Set Unsafe Browser's name to "Unsafe Browser"

This refers to e.g. the name displayed in the window title bar.
parent 40809dee
......@@ -112,6 +112,34 @@ setup_chroot () {
error "`gettext \"Failed to setup chroot.\"`"
}
set_chroot_browser_name () {
NAME="${1}"
SHORT=$(echo ${LANG} | cut -b1-2)
LONG=$(echo ${LANG} | cut -b1-5 | tr _ -)
EXT_DIR=${CHROOT}/usr/lib/iceweasel/extensions
BRANDING=branding/brand.dtd
if [ -e "${EXT_DIR}/langpack-${SHORT}@iceweasel.mozilla.org.xpi" ]; then
PACK="${EXT_DIR}/langpack-${SHORT}@iceweasel.mozilla.org.xpi"
TOP=chrome
REST=${SHORT}/locale
elif [ -e "${EXT_DIR}/langpack-${LONG}@iceweasel.mozilla.org.xpi" ]; then
PACK="${EXT_DIR}/langpack-${LONG}@iceweasel.mozilla.org.xpi"
TOP=chrome
REST=${LONG}/locale
else
PACK=${CHROOT}/usr/share/iceweasel/chrome/en-US.jar
TOP=locale
REST=
fi
TMP=$(mktemp -d)
7z x "${PACK}" -o"${TMP}"
sed -i "s/Iceweasel/${NAME}/" "${TMP}"/"${TOP}"/"${REST}"/"${BRANDING}"
7z u -tzip "${PACK}" "${TMP}"/"${TOP}"
chmod a+r "${PACK}"
rm -Rf "${TMP}"
}
configure_chroot () {
echo "* Configuring chroot"
......@@ -142,6 +170,9 @@ EOF
chroot ${CHROOT} tails-activate-winxp-theme
fi
# Set the name (e.g. window title) of the browser
set_chroot_browser_name "`gettext \"Unsafe Browser\"`"
# Set start page to something that explains what's going on
echo 'user_pref("browser.startup.homepage", "'${START_PAGE}'");' >> \
${CHROOT}/etc/iceweasel/profile/user.js
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment