mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
torbrowser: wrapper improvements
This brings the wrapper closer to the upstream wrapper. Briefly, - exec to prevent the shell from hanging around - do not connect to session manager - set WM_CLASS to "Tor Browser" - use fonts.conf from the torbrowser bundle
This commit is contained in:
parent
85aece2f8e
commit
c3f54960c6
1 changed files with 4 additions and 2 deletions
|
@ -50,15 +50,17 @@ stdenv.mkDerivation rec {
|
|||
cp -R * $out/share/tor-browser
|
||||
|
||||
cat > "$out/bin/tor-browser" << EOF
|
||||
#!${stdenv.shell}
|
||||
#! ${stdenv.shell}
|
||||
unset SESSION_MANAGER
|
||||
export HOME="\$HOME/.torbrowser4"
|
||||
if [ ! -d \$HOME ]; then
|
||||
mkdir -p \$HOME && cp -R $out/share/tor-browser/Browser/TorBrowser/Data \$HOME/ && chmod -R +w \$HOME
|
||||
echo "pref(\"extensions.torlauncher.tordatadir_path\", \"\$HOME/Data/Tor/\");" >> \
|
||||
~/Data/Browser/profile.default/preferences/extension-overrides.js
|
||||
fi
|
||||
export FONTCONFIG_PATH=\$HOME/Data/fontconfig
|
||||
export LD_LIBRARY_PATH=${libPath}:$out/share/tor-browser/Browser/TorBrowser/Tor
|
||||
$out/share/tor-browser/Browser/firefox -no-remote -profile ~/Data/Browser/profile.default "\$@"
|
||||
exec $out/share/tor-browser/Browser/firefox --class "Tor Browser" -no-remote -profile ~/Data/Browser/profile.default "\$@"
|
||||
EOF
|
||||
chmod +x $out/bin/tor-browser
|
||||
|
||||
|
|
Loading…
Reference in a new issue