Einstellungen für raspian/pi angepasst
This commit is contained in:
parent
d9c34b6c40
commit
f9457ebf7b
@ -3,21 +3,34 @@
|
||||
while true; do
|
||||
|
||||
# Clean up previously running apps, gracefully at first then harshly
|
||||
killall -TERM chromium 2>/dev/null;
|
||||
which chromium /dev/null && killall -TERM chromium 2>/dev/null;
|
||||
which chromium-browser /dev/null && killall -TERM chromium-browser 2>/dev/null;
|
||||
killall -TERM matchbox-window-manager 2>/dev/null;
|
||||
sleep 2;
|
||||
killall -9 chromium 2>/dev/null;
|
||||
which chromium > /dev/null && killall -9 chromium 2>/dev/null;
|
||||
which chromium-browser > /dev/null && killall -9 chromium-browser 2>/dev/null;
|
||||
killall -9 matchbox-window-manager 2>/dev/null;
|
||||
|
||||
# Clean out existing profile information
|
||||
rm -rf /home/thinnote/.cache;
|
||||
rm -rf /home/thinnote/.config;
|
||||
rm -rf /home/thinnote/.pki;
|
||||
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
|
||||
|
||||
|
||||
# Generate the bare minimum to keep Chromium happy!
|
||||
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);";
|
||||
|
||||
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
|
||||
# Disable DPMS / Screen blanking
|
||||
xset -dpms
|
||||
xset s off
|
||||
@ -35,7 +48,7 @@ while true; do
|
||||
|
||||
# Start the browser (See http://peter.sh/experiments/chromium-command-line-switches/)
|
||||
|
||||
#chromium-browser --app="https://wiki.lebenshilfe-bbg.de/wiki/doku.php?id=hidden:portal"
|
||||
chromium --app="https://wiki.lebenshilfe-bbg.de/wiki/doku.php?id=hidden:portal"
|
||||
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"
|
||||
|
||||
done;
|
||||
|
20
etc/rc.local
20
etc/rc.local
@ -11,6 +11,8 @@
|
||||
#
|
||||
# By default this script does nothing.
|
||||
|
||||
which chromium-browser > /dev/null && [ -d /etc/chromium ] && mv /etc/chromium/ /etc/chromium-browser
|
||||
|
||||
sleep 10
|
||||
|
||||
|
||||
@ -26,7 +28,14 @@ fi
|
||||
#fi
|
||||
|
||||
#Hostname wird anhand des WLAN0 erstell / kann auch entsprechend auf anderes Geraet umgestellt werden
|
||||
echo thin$(cat /sys/class/net/wlan0/address | sed '/://g') > /tmp/hostname && hostname --file /tmp/hostname
|
||||
#ip a s wlan1 2&>1 /dev/null ||
|
||||
#Check einbauen der aktive Verbindung prüft
|
||||
if [ -d /home/pi ]; then
|
||||
echo pi$(cat /sys/class/net/wlan0/address | sed '/://g') > /tmp/hostname && hostname --file /tmp/hostname
|
||||
else
|
||||
echo thin$(cat /sys/class/net/wlan0/address | sed '/://g') > /tmp/hostname && hostname --file /tmp/hostname
|
||||
fi
|
||||
|
||||
#Fuer eth0, wenn kein WLAN vorhanden ist. Kann dann auskommentiert werden.
|
||||
#echo rpi$(cat /sys/class/net/eth0/address | sed '/://g') > /tmp/hostname && hostname --file /tmp/hostname
|
||||
|
||||
@ -34,8 +43,13 @@ echo thin$(cat /sys/class/net/wlan0/address | sed '/://g') > /tmp/hostname && ho
|
||||
|
||||
# start X environment
|
||||
if [ -f /boot/client-cfg/xinitrc ]; then
|
||||
ln -fs /boot/client-cfg/xinitrc /home/thinnote/.xinitrc;
|
||||
su -l thinnote -s /bin/bash -c 'startx -- vt1' &
|
||||
if [ -d /home/pi ]; then
|
||||
ln -fs /boot/client-cfg/xinitrc /home/pi/.xinitrc;
|
||||
su -l pi -s /bin/bash -c 'startx -- vt1' &
|
||||
else
|
||||
ln -fs /boot/client-cfg/xinitrc /home/thinnote/.xinitrc;
|
||||
su -l thinnote -s /bin/bash -c 'startx -- vt1' &
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
@ -1 +0,0 @@
|
||||
../../boot/client-cfg/xinitrc
|
Loading…
Reference in New Issue
Block a user