Skip to content

Instantly share code, notes, and snippets.

@jakub300
Last active January 9, 2022 01:48
Show Gist options
  • Save jakub300/dc31866cb8e3cf4e135dd623ca2e2b81 to your computer and use it in GitHub Desktop.
Save jakub300/dc31866cb8e3cf4e135dd623ca2e2b81 to your computer and use it in GitHub Desktop.
Compile headless shell (Chromium)
# Based on:
# https://web.archive.org/web/20200212121848/http://www.zackarychapple.guru/chrome/2016/08/24/chrome-headless.html
# https://www.chromium.org/developers/how-tos/get-the-code
# https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md
apt-get update
apt-get install -y curl git htop man unzip vim wget python
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=$PATH:`pwd`/depot_tools
mkdir Chromium && cd Chromium
fetch --no-history chromium
cd src
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
./build/install-build-deps.sh --no-prompt
gclient runhooks
mkdir -p out/Headless
echo 'import("//build/args/headless.gn")' > out/Headless/args.gn
echo 'is_debug = false' >> out/Headless/args.gn
gn gen out/Headless
ninja -C out/Headless headless_shell
tar -zcvf ChromeHeadless.tar.gz out/Headless
@CarlosVilasAlvarez
Copy link

I think the first link is not working... xD

@lom-chargebacks
Copy link

I think the first link is not working... xD

Definitely, NSFW

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment