wait for monitor to be attached before launching firefox (#2005)

* wait for monitor to be attached before launching firefox

* add code to kill firefox on monitor disconnect

* fix detection for the pi

* Remove Pi only logic

* chore: Remove the kiosk mode

Co-authored-by: Aiden McClelland <me@drbonez.dev>
Co-authored-by: J M <2364004+Blu-J@users.noreply.github.com>
Co-authored-by: BluJ <mogulslayer@gmail.com>
This commit is contained in:
Chris Guida
2022-12-01 17:41:08 -06:00
committed by GitHub
parent ed22e53cb6
commit 1d6c61cc5b
3 changed files with 18 additions and 1 deletions

View File

@@ -0,0 +1,8 @@
#!/bin/sh
if cat /sys/class/drm/*/status | grep -qw connected; then
exit 0
else
exit 1
fi

View File

@@ -57,6 +57,15 @@ EOT
while ! curl "http://localhost" > /dev/null; do while ! curl "http://localhost" > /dev/null; do
sleep 1 sleep 1
done done
while ! /usr/lib/embassy/scripts/check-monitor; do
sleep 15
done
(
while /usr/lib/embassy/scripts/check-monitor; do
sleep 15
done
killall firefox-esr
) &
matchbox-window-manager -use_titlebar no & matchbox-window-manager -use_titlebar no &
firefox-esr http://localhost --profile $PROFILE firefox-esr http://localhost --profile $PROFILE
rm -rf $PROFILE rm -rf $PROFILE

View File

@@ -44,7 +44,7 @@ systemctl stop tor
systemctl enable embassyd.service embassy-init.service systemctl enable embassyd.service embassy-init.service
. /usr/lib/embassy/scripts/enable-kiosk # . /usr/lib/embassy/scripts/enable-kiosk
sed -i 's/^/usb-storage.quirks=152d:0562:u,14cd:121c:u,0781:cfcb:u /g' /boot/cmdline.txt sed -i 's/^/usb-storage.quirks=152d:0562:u,14cd:121c:u,0781:cfcb:u /g' /boot/cmdline.txt