tor-launcher 1.09 KB
Newer Older
1 2 3 4
#!/bin/sh

set -e

5 6 7 8 9 10
# The Tor Browser hardcodes the default profile dir to ../.. from the
# folder storing the application.ini file supplied via -app. Sadly,
# -profile doesn't work together with -app. Therefore we copy the
# whole Tor Launcher application (just ~350 KB) into the user's home
# so we can get the profile directory in a sane place.
if [ ! -e "${HOME}"/.tor-launcher ]; then
Tails developers's avatar
Tails developers committed
11 12 13 14
    mkdir -p "${HOME}"/.tor-launcher
    cp -r /usr/share/tor-launcher-standalone "${HOME}"/.tor-launcher/tor-launcher-standalone
    mkdir -p "${HOME}"/.tor-launcher/TorBrowser/Data/Browser/
    cat << EOF > "${HOME}"/.tor-launcher/TorBrowser/Data/Browser/profiles.ini
15 16 17 18 19 20 21 22
[General]
StartWithLastProfile=1

[Profile0]
Name=default
IsRelative=1
Path=profile.default
EOF
Tails developers's avatar
Tails developers committed
23
    mkdir -p "${HOME}"/.tor-launcher/TorBrowser/Data/Browser/profile.default/preferences
24
    ln -s /var/lib/tails-user-session/browser-locale.js \
Tails developers's avatar
Tails developers committed
25
          "${HOME}"/.tor-launcher/TorBrowser/Data/Browser/profile.default/preferences/locale.js
26
fi
Tails developers's avatar
Tails developers committed
27
/usr/local/lib/tor-browser/Browser/firefox --app "${HOME}"/.tor-launcher/tor-launcher-standalone/application.ini