Skip to content

Instantly share code, notes, and snippets.

@ndvo
Created June 6, 2019 13:18
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 ndvo/751a2111b5b9d2d925d862d43aa826b2 to your computer and use it in GitHub Desktop.
Save ndvo/751a2111b5b9d2d925d862d43aa826b2 to your computer and use it in GitHub Desktop.
source ~/scripts/android.sh
nvm use node
sudo update-alternatives --config java
export JAVA_HOME=$(update-alternatives --query javac | sed -n -e 's/Best: *\(.*\)\/bin\/javac/\1/p')
export J2REDIR=''
export J2SDKDIR=''
source ~/scripts/fixjava.sh
echo "To use puppeteer you'll need node 10+, a CHROME_DEVEL_SANDBOX environment variable and authorization for non priviledged users to clone processes (i guess...)";
echo "... you are now using node version "$(node -v);
echo "... setting up the environment variable";
export CHROME_DEVEL_SANDBOX=/usr/local/sbin/chrome_sandbox
echo "CHROME_DEVEL_SANDBOX set to "$CHROME_DEVEL_SANDBOX;
echo "... allowing non-priviledged users to clone (sudo needed):";
sudo echo 1 > /proc/sys/kernel/unprivileged_userns_clone;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment