From bce47ea9d5fa962736ddd4a254a27a5fd2cdee9a Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Wed, 17 Apr 2019 16:25:49 +0200 Subject: tor-browser-bundle-bin: defaults for XAUTHORITY and DBUS_SESSION_BUS_ADDRESS See https://github.com/NixOS/nixpkgs/issues/55082 and https://github.com/NixOS/nixpkgs/issues/20157#issuecomment-272767442 --- .../networking/browsers/tor-browser-bundle-bin/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'pkgs/applications/networking/browsers/tor-browser-bundle-bin') 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 283c63dcd6fc..f37677b05213 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" \ -- cgit 1.4.1