summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2017-07-17 23:53:31 -0700
committerJamey Sharp <jamey@minilop.net>2017-07-18 00:03:22 -0700
commit09bae7cb706bf37f2da1e4d49c38e6bc78efb611 (patch)
tree35e47f24c4f8c064ff828a753a800ed101e0e5c7 /pkgs/build-support
parentf59e71e9c7a41618908fbab1f7517fd3af2c6855 (diff)
downloadnixlib-09bae7cb706bf37f2da1e4d49c38e6bc78efb611.tar
nixlib-09bae7cb706bf37f2da1e4d49c38e6bc78efb611.tar.gz
nixlib-09bae7cb706bf37f2da1e4d49c38e6bc78efb611.tar.bz2
nixlib-09bae7cb706bf37f2da1e4d49c38e6bc78efb611.tar.lz
nixlib-09bae7cb706bf37f2da1e4d49c38e6bc78efb611.tar.xz
nixlib-09bae7cb706bf37f2da1e4d49c38e6bc78efb611.tar.zst
nixlib-09bae7cb706bf37f2da1e4d49c38e6bc78efb611.zip
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.
Diffstat (limited to 'pkgs/build-support')
-rwxr-xr-xpkgs/build-support/build-fhs-userenv/chroot-user.rb1
1 files changed, 1 insertions, 0 deletions
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',