Commit d9e75b74 authored by Tails developers's avatar Tails developers
Browse files

Drop patch now part of Tails Greeter.

parent d7cbfad0
--- chroot.orig/etc/gdm3/PostLogin/Default 2014-10-03 02:16:53.170723099 +0200
+++ chroot/etc/gdm3/PostLogin/Default 2014-10-03 02:14:07.235916994 +0200
@@ -130,6 +130,32 @@
XKBOPTIONS="$TAILS_XKBOPTIONS"
EOF
+# Chose which browser language pack to use
+LONG_LOCALE="$(echo ${TAILS_LOCALE_NAME} | sed -e 's/\..*$//' -e 's/_/-/')"
+SHORT_LOCALE="$(echo ${LONG_LOCALE} | cut -d"-" -f1)"
+LANGPACK_DIR="/usr/local/lib/tor-browser/extensions"
+if [ -e "${LANGPACK_DIR}/langpack-${LONG_LOCALE}@firefox.mozilla.org.xpi" ]; then
+ BROWSER_LOCALE="${LONG_LOCALE}"
+elif [ -e "${LANGPACK_DIR}/langpack-${SHORT_LOCALE}@firefox.mozilla.org.xpi" ]; then
+ BROWSER_LOCALE="${SHORT_LOCALE}"
+else
+ BROWSER_LOCALE="en-US"
+fi
+TOR_LAUNCHER_LOCALES_DIR=/usr/share/tor-launcher-standalone/chrome/locale
+if [ -e "${TOR_LAUNCHER_LOCALES_DIR}/${LONG_LOCALE}" ]; then
+ TOR_LAUNCHER_LOCALE="${LONG_LOCALE}"
+elif [ -e "${TOR_LAUNCHER_LOCALES_DIR}/${SHORT_LOCALE}" ]; then
+ TOR_LAUNCHER_LOCALE="${SHORT_LOCALE}"
+else
+ TOR_LAUNCHER_LOCALE="en-US"
+fi
+echo "pref(\"general.useragent.locale\", \"${BROWSER_LOCALE}\");" > \
+ /var/lib/tails-user-session/browser-locale.js
+echo "pref(\"general.useragent.locale\", \"${TOR_LAUNCHER_LOCALE}\");" > \
+ /var/lib/tails-user-session/tor-launcher-locale.js
+chmod 664 /var/lib/tails-user-session/browser-locale.js \
+ /var/lib/tails-user-session/tor-launcher-locale.js
+
### Persistence
# Copy persistence configuration to a root-writable, world-readable place,
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