-
Notifications
You must be signed in to change notification settings - Fork 2
/
browser.sh
42 lines (37 loc) · 1.1 KB
/
browser.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/sh
#
# Perform chromium
if [ -n "${DEBUG}" ]; then
set -x
fi
# check dependency
command -v chromium-browser > /dev/null || { echo "chromium is not installed in this system" 1>&2; exit 1; }
# More flag details see: https://peter.sh/experiments/chromium-command-line-switches/
args="--headless=new \
--disable-gpu \
--no-sandbox \
--remote-debugging-address=0.0.0.0 \
--remote-debugging-port=9222 \
--disable-dev-shm-usage \
--disable-translate \
--disable-extensions \
--disable-software-rasterizer \
--disable-sync \
--disable-default-apps \
--disable-renderer-backgrounding \
--disable-backgrounding-occluded-windows \
--disable-background-timer-throttling \
--ignore-certificate-errors \
--use-fake-ui-for-media-stream \
--use-gl=swiftshader \
--hide-scrollbars \
--mute-audio \
--no-default-browser-check \
--no-first-run"
if [ -n "${CHROMEDP_USER_AGENT}" ]; then
args="${args} --user-agent=${CHROMEDP_USER_AGENT}"
fi
if [ -n "${PROXY_SERVER}" ]; then
args="${args} --proxy-server=${PROXY_SERVER}"
fi
chromium-browser $args