Skip to content

Instantly share code, notes, and snippets.

@mniip
Created July 27, 2014 12:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mniip/192bcb5edf32c5569ab6 to your computer and use it in GitHub Desktop.
Save mniip/192bcb5edf32c5569ab6 to your computer and use it in GitHub Desktop.
if [ $EUID != 0 ]; then
su -c $0
exit
fi
for i in /tmp/.X11-unix/X*; do
ln -f $i $(sed 's:^/::' <<< "$i")
done
xauth extract - $DISPLAY | xauth -f root/.Xauthority merge -
export XAUTHORITY=/root/.Xauthority
mount -t proc proc proc
chroot .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment