stream-clients/pack-chrome.sh
2021-06-15 14:44:12 +02:00

20 lines
492 B
Bash
Executable File

#!/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}"
${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}