add fake xorg

This commit is contained in:
Roy Olav Purser 2021-06-15 14:44:12 +02:00
parent c4ca29f29b
commit 6547248030
Signed by: roypur
GPG Key ID: E14D26A036F21656

View File

@ -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}