|
|
@@ -0,0 +1,74 @@
|
|
|
+#!/bin/bash
|
|
|
+#
|
|
|
+# Copyright (c) 2021 Clementine Computing LLC.
|
|
|
+#
|
|
|
+# This file is part of PopuFare.
|
|
|
+#
|
|
|
+# PopuFare is free software: you can redistribute it and/or modify
|
|
|
+# it under the terms of the GNU Affero General Public License as published by
|
|
|
+# the Free Software Foundation, either version 3 of the License, or
|
|
|
+# (at your option) any later version.
|
|
|
+#
|
|
|
+# PopuFare is distributed in the hope that it will be useful,
|
|
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
+# GNU Affero General Public License for more details.
|
|
|
+#
|
|
|
+# You should have received a copy of the GNU Affero General Public License
|
|
|
+# along with PopuFare. If not, see <https://www.gnu.org/licenses/>.
|
|
|
+#
|
|
|
+
|
|
|
+# This is the front end interface to the PIU that will run chromium
|
|
|
+# browser (on startup) and ultimately connect to a local web
|
|
|
+# server serving up the passenger facing interface
|
|
|
+#
|
|
|
+
|
|
|
+export BASEDIR=/home/pi
|
|
|
+
|
|
|
+export DISPLAY=:0
|
|
|
+
|
|
|
+export fqADDRESS="http://127.0.0.1:8001"
|
|
|
+
|
|
|
+# turn off screensave/screen blanking
|
|
|
+#
|
|
|
+xset s noblank
|
|
|
+xset s off
|
|
|
+xset -dpms
|
|
|
+
|
|
|
+# hide mouse after 0.5 seconds of idle time
|
|
|
+#
|
|
|
+unclutter -idle 0.05 -root &
|
|
|
+
|
|
|
+# hide mouse completely
|
|
|
+#
|
|
|
+#unclutter -root &
|
|
|
+
|
|
|
+
|
|
|
+# clear out warning bar on chromium
|
|
|
+#
|
|
|
+tmpfn=`mktemp`
|
|
|
+jq '.profile.exited_cleanly = true' $BASEDIR/.config/chromium/Preferences | jq '.profile.exit_type = "Normal"' > $tmpfn
|
|
|
+mv $tmpfn $BASEDIR/.config/chromium/Preferences
|
|
|
+
|
|
|
+# start chromium in kiosk mode
|
|
|
+#
|
|
|
+
|
|
|
+#/usr/bin/chromium-browser --noerrdialogs --disable-infobars --kiosk ./html/index.html
|
|
|
+#
|
|
|
+# --disable-application-cache \
|
|
|
+/usr/bin/chromium-browser \
|
|
|
+ --noerrdialogs \
|
|
|
+ --disable-infobars \
|
|
|
+ --aggressive-cache-discard \
|
|
|
+ --incognito \
|
|
|
+ --disable-pinch \
|
|
|
+ --overscroll-history-navigation=0 \
|
|
|
+ --kiosk \
|
|
|
+ $fqADDRESS
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+# refresh
|
|
|
+#
|
|
|
+#xdotool keydown ctrl+r; xdotool keyup ctrl+r;
|
|
|
+
|