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}