fix kiosk

This commit is contained in:
Aiden McClelland
2022-11-07 12:24:03 -07:00
committed by Aiden McClelland
parent a2f65de1ce
commit 327e873ef6

View File

@@ -10,8 +10,10 @@ apt install --no-install-recommends -y xserver-xorg x11-xserver-utils xinit fire
cat > /home/start9/kiosk.sh << 'EOF'
#!/bin/sh
PROFILE=$(mktemp -d)
use_https=
if [ -f /usr/local/share/ca-certificates/embassy-root-ca.crt ]; then
certutil -A -n "Embassy Local Root CA" -t "TCu,Cuw,Tuw" -i /usr/local/share/ca-certificates/embassy-root-ca.crt -d $PROFILE
use_https=yes
fi
cat >> $PROFILE/prefs.js << EOT
user_pref("network.proxy.autoconfig_url", "file:///usr/lib/embassy/proxy.pac");
@@ -22,7 +24,7 @@ user_pref("dom.securecontext.whitelist_onions", true);
user_pref("signon.rememberSignons", false);
EOT
matchbox-window-manager -use_titlebar yes &
if [ "$(hostname)" == "embassy" ]; then
if [ -z "$use_https" ]; then
firefox-esr --kiosk http://localhost --profile $PROFILE
else
firefox-esr --kiosk https://$(hostname).local --profile $PROFILE