Skip to content

Instantly share code, notes, and snippets.

@maltoe
Created March 20, 2013 11:45
Show Gist options
  • Save maltoe/5204055 to your computer and use it in GitHub Desktop.
Save maltoe/5204055 to your computer and use it in GitHub Desktop.
Take a snapshot from a website in memory
#!/bin/sh
echo "Starting up XServer in memory..."
#Xvfb :11 -screen 0 1920x1080x24 &
Xvfb :11 -screen 0 1680x1024x24 &
sleep 2
echo "Starting Chrome..."
#firefox --display :11
#firefox --display :11 "http://google.de/" &
#google-chrome --display=:11 --app="http://google.de/" &
#google-chrome --display=:11 --kiosk "http://google.de/" &
google-chrome --display=:11 --kiosk --app="http://google.de/" &
sleep 5
echo "Taking snapshot..."
import -display :11 -window root light.jpg
echo "Destroy X server..."
killall Xvfb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment