Skip to content

Instantly share code, notes, and snippets.

@nicr9
Last active February 16, 2016 08:05
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 nicr9/5950d050744c24a1d7ff to your computer and use it in GitHub Desktop.
Save nicr9/5950d050744c24a1d7ff to your computer and use it in GitHub Desktop.
# Build the demo dockerfile
docker build -f Dockerfile.screenshot -t xattacks:screenshot .
# Allow Docker processes to access X
xhost local:root
# Run container that takes a screenshot on the host (imagemagick) and displays it for you (feh)
docker run -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY xattacks:screenshot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment