2021-06-25 23:15:16 +02:00
#!/bin/sh
while true; do
# Clean up previously running apps, gracefully at first then harshly
2021-09-07 16:03:42 +02:00
which chromium /dev/null && killall -TERM chromium 2>/dev/null;
which chromium-browser /dev/null && killall -TERM chromium-browser 2>/dev/null;
2021-06-25 23:15:16 +02:00
killall -TERM matchbox-window-manager 2>/dev/null;
sleep 2;
2021-09-07 16:03:42 +02:00
which chromium > /dev/null && killall -9 chromium 2>/dev/null;
which chromium-browser > /dev/null && killall -9 chromium-browser 2>/dev/null;
2021-06-25 23:15:16 +02:00
killall -9 matchbox-window-manager 2>/dev/null;
# Clean out existing profile information
2021-09-07 16:03:42 +02:00
if [ -d /home/pi ]; then
rm -rf /home/pi/.cache;
rm -rf /home/pi/.config;
rm -rf /home/pi/.pki;
else
rm -rf /home/thinnote/.cache;
rm -rf /home/thinnote/.config;
rm -rf /home/thinnote/.pki;
fi
2021-06-25 23:15:16 +02:00
2021-09-07 16:03:42 +02:00
# Generate the bare minimum to keep Chromium happy!
if [ -d /home/pi ]; then
mkdir -p /home/pi/.config/chromium/Default
sqlite3 /home/pi/.config/chromium/Default/Web\ Data "CREATE TABLE meta(key LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY, value LONGVARCHAR); INSERT INTO meta VALUES('version','46'); CREATE TABLE keywords (foo INTEGER);";
else
mkdir -p /home/thinnote/.config/chromium/Default
sqlite3 /home/thinnote/.config/chromium/Default/Web\ Data "CREATE TABLE meta(key LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY, value LONGVARCHAR); INSERT INTO meta VALUES('version','46'); CREATE TABLE keywords (foo INTEGER);";
fi
2021-06-25 23:15:16 +02:00
# Disable DPMS / Screen blanking
xset -dpms
xset s off
xhost +local:
# Reset the framebuffer's colour-depth
fbset -depth $( cat /sys/module/*fb*/parameters/fbdepth );
# Hide the cursor (move it to the bottom-right, comment out if you want mouse interaction)
# xwit -root -warp $( cat /sys/module/*fb*/parameters/fbwidth ) $( cat /sys/module/*fb*/parameters/fbheight )
# Start the window manager (remove "-use_cursor no" if you actually want mouse interaction)
# matchbox-window-manager -use_titlebar no -use_cursor no &
matchbox-window-manager -use_titlebar no &
# Start the browser (See http://peter.sh/experiments/chromium-command-line-switches/)
2021-09-07 16:03:42 +02:00
which chromium-browser > /dev/null && chromium-browser --app="https://wiki.lebenshilfe-bbg.de/wiki/doku.php?id=hidden:portal"
which chromium > /dev/null && chromium --app="https://wiki.lebenshilfe-bbg.de/wiki/doku.php?id=hidden:portal"
2021-06-25 23:15:16 +02:00
2021-08-12 13:12:08 +02:00
done;