From ef66c141d673c8b23d07a74057277b55c73e6ab1 Mon Sep 17 00:00:00 2001 From: Eric Bouchard Date: Thu, 12 Oct 2023 17:27:11 -0400 Subject: [PATCH] Make flags easier to maintain --- .../home/pi/scripts/start_chromium_browser | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/modules/fullpageos/filesystem/home/pi/scripts/start_chromium_browser b/src/modules/fullpageos/filesystem/home/pi/scripts/start_chromium_browser index d1c434c..8b32535 100755 --- a/src/modules/fullpageos/filesystem/home/pi/scripts/start_chromium_browser +++ b/src/modules/fullpageos/filesystem/home/pi/scripts/start_chromium_browser @@ -1,12 +1,25 @@ #!/bin/bash +flags=( + --kiosk + --touch-events=enabled + --disable-pinch + --noerrdialogs + --disable-session-crashed-bubble + --simulate-outdated-no-au='Tue, 31 Dec 2099 23:59:59 GMT' + --disable-component-update + --overscroll-history-navigation=0 + --disable-features=Translate + --autoplay-policy=no-user-gesture-required +) + # Standard behavior - runs chrome -chromium-browser --kiosk --touch-events=enabled --disable-pinch --noerrdialogs --disable-session-crashed-bubble --simulate-outdated-no-au='Tue, 31 Dec 2099 23:59:59 GMT' --disable-component-update --overscroll-history-navigation=0 --disable-features=Translate --autoplay-policy=no-user-gesture-required --app=$(/home/pi/scripts/get_url) +chromium-browser "${flags[@]}" --app=$(/home/pi/scripts/get_url) exit; # Remove the two lines above to enable signage mode - refresh the browser whenever errors are seen in log -chromium-browser --enable-logging --log-level=2 --v=0 --kiosk --touch-events=enabled --disable-pinch --noerrdialogs --simulate-outdated-no-au='Tue, 31 Dec 2099 23:59:59 GMT' --disable-session-crashed-bubble --disable-component-update --overscroll-history-navigation=0 --disable-features=Translate --autoplay-policy=no-user-gesture-required --app=$(head -n 1 /boot/fullpageos.txt | sed -e "s/{serial}/${SERIAL}/g") & +chromium-browser --enable-logging --log-level=2 --v=0 "${flags[@]}" --app=$(head -n 1 /boot/fullpageos.txt | sed -e "s/{serial}/${SERIAL}/g") & export logfile="/home/pi/.config/chromium/chrome_debug.log"