From 65472480302118d92a797b2cae96883bced98068 Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Tue, 15 Jun 2021 14:44:12 +0200 Subject: [PATCH] add fake xorg --- pack-chrome.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pack-chrome.sh b/pack-chrome.sh index a34a62e..ae75e2c 100755 --- a/pack-chrome.sh +++ b/pack-chrome.sh @@ -1,10 +1,19 @@ #!/usr/bin/env sh dir=$(dirname $(realpath $0)) +export DISPLAY=:8819 +screen -dmS xvfb Xvfb :8819 + ${dir}/icons.sh +browser=$(which chromium-browser 2> /dev/null) +if [[ "$?" -ne "0" ]] +then + browser=$(which chromium 2> /dev/null) +fi + temp_name=$(head -c 20 /dev/random | xxd -p | tr -dc a-f0-9) temp_dir="/tmp/${temp_name}" -chromium-browser --no-sandbox --user-data-dir=${temp_dir} --pack-extension="${dir}/chrome" --pack-extension-key=${HOME}/keys/privkey.pem +${browser} --disable-gpu --no-sandbox --user-data-dir=${temp_dir} --pack-extension="${dir}/chrome" --pack-extension-key=${HOME}/keys/privkey.pem rm -rf ${temp_dir}