about summary refs log tree commit diff
path: root/pkgs/tools/security
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@fastmail.fm>2016-04-29 18:42:09 +0200
committerJoachim Fasting <joachifm@fastmail.fm>2016-04-29 18:42:09 +0200
commitc3f54960c6983f7c590a00a1acedea4b80b9673a (patch)
tree1a811902323a2c9fdb6ddba717c872f1b802d6af /pkgs/tools/security
parent85aece2f8e0a2b9a410d7ae57b61c763c03c764b (diff)
downloadnixlib-c3f54960c6983f7c590a00a1acedea4b80b9673a.tar
nixlib-c3f54960c6983f7c590a00a1acedea4b80b9673a.tar.gz
nixlib-c3f54960c6983f7c590a00a1acedea4b80b9673a.tar.bz2
nixlib-c3f54960c6983f7c590a00a1acedea4b80b9673a.tar.lz
nixlib-c3f54960c6983f7c590a00a1acedea4b80b9673a.tar.xz
nixlib-c3f54960c6983f7c590a00a1acedea4b80b9673a.tar.zst
nixlib-c3f54960c6983f7c590a00a1acedea4b80b9673a.zip
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
Diffstat (limited to 'pkgs/tools/security')
-rw-r--r--pkgs/tools/security/tor/torbrowser.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/tools/security/tor/torbrowser.nix b/pkgs/tools/security/tor/torbrowser.nix
index 126c7940849c..11988d9435f6 100644
--- a/pkgs/tools/security/tor/torbrowser.nix
+++ b/pkgs/tools/security/tor/torbrowser.nix
@@ -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