From 09bae7cb706bf37f2da1e4d49c38e6bc78efb611 Mon Sep 17 00:00:00 2001 From: Jamey Sharp Date: Mon, 17 Jul 2017 23:53:31 -0700 Subject: [PATCH] build-fhs-userenv: Propagate $XAUTHORITY The `DISPLAY` environment variable is propagated into chroots built with `buildFHSUserEnv`, but currently the `XAUTHORITY` variable is not. When the latter is set, its value is usually necessary in order to connect to the X server identified by the former. This matters for users running gdm3, for example, who have `XAUTHORITY` set to something like `/run/user/1000/gdm/Xauthority` instead of the X default of `~/.Xauthority`, which doesn't exist in that setup. Fixes #21532. --- pkgs/build-support/build-fhs-userenv/chroot-user.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/build-support/build-fhs-userenv/chroot-user.rb b/pkgs/build-support/build-fhs-userenv/chroot-user.rb index 11f672acb9ff..833aab16ceb1 100755 --- a/pkgs/build-support/build-fhs-userenv/chroot-user.rb +++ b/pkgs/build-support/build-fhs-userenv/chroot-user.rb @@ -16,6 +16,7 @@ mounts = { '/' => 'host', # Propagate environment variables envvars = [ 'TERM', 'DISPLAY', + 'XAUTHORITY', 'HOME', 'XDG_RUNTIME_DIR', 'LANG',