Skip to content

Instantly share code, notes, and snippets.

@oozman
Last active March 25, 2019 10:49
Show Gist options
  • Save oozman/1af968d9b96fc5b0cd39599db3f2b9bd to your computer and use it in GitHub Desktop.
Save oozman/1af968d9b96fc5b0cd39599db3f2b9bd to your computer and use it in GitHub Desktop.
How to install and run Headless nightmare.js based scripts in Ubuntu.
Steps:
1. Spin Ubuntu 16.04 x64 server
2. Run: apt-get update
3. Run: apt-get upgrade
4. Run: apt-get install -y libgtk2.0-0 libgconf-2-4 libasound2 libxtst6 libxss1 libnss3 xvfb
5. Install Node.js 6+. See: https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
You can then run your script using this command:
xvfb-run -a --server-args="-screen 0 1024x768x24" node [YOUR-SCRIPT.js]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment