Skip to content

Commit

Permalink
share XAUTHORITY environment variable and mount the file if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
tomeichlersmith committed Aug 28, 2024
1 parent 853c75e commit dbaa3e5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions denv
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ _denv_run() {
# we will be running now and not writing the config
# so we can update the denv_mounts list
[ -d /tmp/.X11-unix ] && denv_mounts="${denv_mounts} /tmp/.X11-unix"
[ -f "${XAUTHORITY}" ] && denv_mounts="${denv_mounts} ${XAUTHORITY}"
denv_mounts="${denv_mounts} ${denv_entrypoint}"
case "${denv_runner}" in
docker|podman)
Expand Down Expand Up @@ -426,6 +427,7 @@ _denv_deduce_environment() {
# specify localhost as an allowed source
_display="host.docker.internal:0"
fi
denv_environment="${denv_environment} XAUTHORITY=${XAUTHORITY}"
denv_environment="${denv_environment} DISPLAY=${_display}"
denv_environment="${denv_environment} DENV_NAME=${denv_name}"
denv_environment="${denv_environment} DENV_RUNNER=${denv_runner}"
Expand Down

0 comments on commit dbaa3e5

Please sign in to comment.