summary refs log tree commit diff
path: root/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix')
-rw-r--r--pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix10
1 files changed, 6 insertions, 4 deletions
diff --git a/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix b/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix
index 283c63dcd6f..f37677b0521 100644
--- a/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix
+++ b/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix
@@ -302,10 +302,12 @@ stdenv.mkDerivation rec {
     # easily generated by firefox at startup.
     rm -f "\$HOME/TorBrowser/Data/Browser/profile.default"/{compatibility.ini,extensions.ini,extensions.json}
 
+    # XDG
+    : "\''${XDG_RUNTIME_DIR:=/run/user/\$(id -u)}"
+    : "\''${XDG_CONFIG_HOME:=\$REAL_HOME/.config}"
+
     ${optionalString pulseaudioSupport ''
       # Figure out some envvars for pulseaudio
-      : "\''${XDG_RUNTIME_DIR:=/run/user/\$(id -u)}"
-      : "\''${XDG_CONFIG_HOME:=\$REAL_HOME/.config}"
       : "\''${PULSE_SERVER:=\$XDG_RUNTIME_DIR/pulse/native}"
       : "\''${PULSE_COOKIE:=\$XDG_CONFIG_HOME/pulse/cookie}"
     ''}
@@ -336,9 +338,9 @@ stdenv.mkDerivation rec {
       \
       TMPDIR="\''${TMPDIR:-/tmp}" \
       HOME="\$HOME" \
-      XAUTHORITY="\''${XAUTHORITY:-}" \
+      XAUTHORITY="\''${XAUTHORITY:-\$HOME/.Xauthority}" \
       DISPLAY="\$DISPLAY" \
-      DBUS_SESSION_BUS_ADDRESS="\$DBUS_SESSION_BUS_ADDRESS" \
+      DBUS_SESSION_BUS_ADDRESS="\''${DBUS_SESSION_BUS_ADDRESS:-unix:path=\$XDG_RUNTIME_DIR/bus}" \\
       \
       XDG_DATA_HOME="\$HOME/.local/share" \
       XDG_DATA_DIRS="$WRAPPER_XDG_DATA_DIRS" \