Last active
February 8, 2023 06:49
-
-
Save schnerd/d3456f49b53942639b3fafa32a6d6a83 to your computer and use it in GitHub Desktop.
setup.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install Google Chrome | |
# https://askubuntu.com/questions/79280/how-to-install-chrome-browser-properly-via-command-line | |
sudo apt-get install libxss1 libappindicator1 libindicator7 | |
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
sudo dpkg -i google-chrome*.deb # Might show "errors", fixed by next line | |
sudo apt-get install -f | |
# Install Node Stable (v7) | |
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
# Run Chrome as background process | |
# https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md | |
# --disable-gpu currently required, see link above | |
google-chrome --headless --hide-scrollbars --remote-debugging-port=9222 --disable-gpu & | |
# Install script dependencies | |
npm install chrome-remote-interface minimist | |
# Take the screenshot | |
nodejs index.js --url="http://www.eff.org" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment