Skip to content

Commit

Permalink
Fixed headless documentation
Browse files Browse the repository at this point in the history
– Chromium package and executable are named ```chromium-browser``` in Ubuntu 16.04. 
– setting $DISPLAY seems not to be required
– chromium has a --temp-profile flag that seems to do the same previously done manually
  • Loading branch information
MatthiasWinkelmann authored Aug 31, 2016
1 parent ee92529 commit 58e5be5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions API-and-internals.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,17 @@ curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs

# get chromium (stable) and Xvfb
apt-get install chromium xvfb
apt-get install chromium-browser xvfb

# install lighthouse
git clone https://github.com/GoogleChrome/lighthouse
cd lighthouse && npm i && npm link
```

```sh
TMP_PROFILE_DIR=$(mktemp -d -t lighthouseXXXX)
export DISPLAY=:1.5

# start up chromium inside xvfb
xvfb-run --server-args='-screen 0, 1024x768x16' chromium --start-maximized --remote-debugging-port=9222 --no-first-run --user-data-dir=$TMP_PROFILE_DIR "about:blank"
xvfb-run --server-args='-screen 0, 1024x768x16' chromium-browser --temp-profile --start-maximized --no-first-run --remote-debugging-port=9222 "about:blank"

# kick off your lighthouse run, saving assets to verify for later
lighthouse http://github.com --save-assets
Expand Down

0 comments on commit 58e5be5

Please sign in to comment.