diff --git a/scripts/gen-xauth b/scripts/gen-xauth index 924fd89..b9e99d4 100755 --- a/scripts/gen-xauth +++ b/scripts/gen-xauth @@ -10,12 +10,12 @@ mkdir -p $(dirname $XAUTH_FILE) # attempt to bring host DISPLAY/xauth to container rm -f $XAUTH_FILE && touch $XAUTH_FILE -DOCKER_XAUTH=$(xauth list $DISPLAY | awk '{print $3}') +DOCKER_XAUTH=$(xauth list $DISPLAY | grep $(uname -n) | awk '{print $3}') DOCKER_DISPLAY=$DISPLAY # assume that :# displays are TCP displays, use docker host IP as display in container # this requres sshd_config option "X11UseLocalhost no" -if [[ $DISPLAY == $(hostname)* ]]; then +if [[ $DISPLAY == $(uname -n)* ]]; then DOCKER_DISPLAY="172.17.0.1:$(echo $DISPLAY | cut -d : -f 2)" fi