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

set -e

5
# Import exec_firefox() and configure_best_tor_launcher_locale()
6 7
. /usr/local/lib/tails-shell-library/tor-browser.sh

8 9 10 11 12 13
# 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
14 15 16 17
    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
18 19 20 21 22 23 24 25
[General]
StartWithLastProfile=1

[Profile0]
Name=default
IsRelative=1
Path=profile.default
EOF
Tails developers's avatar
Tails developers committed
26
    mkdir -p "${HOME}"/.tor-launcher/TorBrowser/Data/Browser/profile.default/preferences
27
    configure_best_tor_launcher_locale "${HOME}"/.tor-launcher/TorBrowser/Data/Browser/profile.default
28
fi
29

30
exec_firefox -app "${HOME}"/.tor-launcher/tor-launcher-standalone/application.ini