Skip to content

Instantly share code, notes, and snippets.

@jhrcz
Last active December 17, 2015 18:59
Show Gist options
  • Save jhrcz/5656982 to your computer and use it in GitHub Desktop.
Save jhrcz/5656982 to your computer and use it in GitHub Desktop.
# hotfix for this issue:
# X11 connection rejected because of wrong authentication
# debug2: X11 connection uses different authentication protocol.
#
# credits go to contributors in this bugzilla entry:
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=49944
#
n=$(xauth list | grep unix:"$(echo $DISPLAY | cut -d : -f 2 | cut -d . -f 1)" | sed -e 's,/unix:,:,')
echo "INFO: $n"
xauth list | grep -q "$n" && echo already-in || xauth add $n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment