mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
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:
8
build/lib/scripts/check-monitor
Executable file
8
build/lib/scripts/check-monitor
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
if cat /sys/class/drm/*/status | grep -qw connected; then
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
@@ -57,6 +57,15 @@ EOT
|
||||
while ! curl "http://localhost" > /dev/null; do
|
||||
sleep 1
|
||||
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 &
|
||||
firefox-esr http://localhost --profile $PROFILE
|
||||
rm -rf $PROFILE
|
||||
|
||||
@@ -44,7 +44,7 @@ systemctl stop tor
|
||||
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user