diff --git a/boot/client-cfg/xinitrc b/boot/client-cfg/xinitrc new file mode 100644 index 0000000..e3e7978 --- /dev/null +++ b/boot/client-cfg/xinitrc @@ -0,0 +1,40 @@ +#!/bin/sh + +while true; do + + # Clean up previously running apps, gracefully at first then harshly + killall -TERM chromium 2>/dev/null; + killall -TERM matchbox-window-manager 2>/dev/null; + sleep 2; + killall -9 chromium 2>/dev/null; + killall -9 matchbox-window-manager 2>/dev/null; + + # Clean out existing profile information + rm -rf /home/pi/.cache; + rm -rf /home/pi/.config; + rm -rf /home/pi/.pki; + + # Generate the bare minimum to keep Chromium happy! + 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);"; + + # 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/) + + chromium-browser --app="https://wiki.lebenshilfe-bbg.de/wiki/doku.php?id=hidden:portal" + +done; \ No newline at end of file diff --git a/etc/chromium-browser/default b/etc/chromium-browser/default new file mode 100644 index 0000000..be52f96 --- /dev/null +++ b/etc/chromium-browser/default @@ -0,0 +1 @@ +CHROMIUM_FLAGS="--no-default-browser-check" diff --git a/etc/chromium-browser/policies/managed/no-password-management.json b/etc/chromium-browser/policies/managed/no-password-management.json new file mode 100644 index 0000000..cab937b --- /dev/null +++ b/etc/chromium-browser/policies/managed/no-password-management.json @@ -0,0 +1,4 @@ +{ + "AutoFillEnabled": false, + "PasswordManagerEnabled": false +} \ No newline at end of file diff --git a/etc/chromium-browser/policies/managed/startup.json b/etc/chromium-browser/policies/managed/startup.json new file mode 100644 index 0000000..984ac93 --- /dev/null +++ b/etc/chromium-browser/policies/managed/startup.json @@ -0,0 +1,3 @@ +{ + "NewTabPageLocation" : "https://wiki.lebenshilfe-bbg.de/wiki/doku.php?id=hidden:portal" +} \ No newline at end of file diff --git a/etc/chromium-browser/policies/managed/startup2.json b/etc/chromium-browser/policies/managed/startup2.json new file mode 100644 index 0000000..984ac93 --- /dev/null +++ b/etc/chromium-browser/policies/managed/startup2.json @@ -0,0 +1,3 @@ +{ + "NewTabPageLocation" : "https://wiki.lebenshilfe-bbg.de/wiki/doku.php?id=hidden:portal" +} \ No newline at end of file diff --git a/etc/rc.local b/etc/rc.local new file mode 100755 index 0000000..1407c0f --- /dev/null +++ b/etc/rc.local @@ -0,0 +1,36 @@ +#!/bin/sh -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +sleep 10 + + +# Print the IP address +_IP=$(hostname -I) || true +if [ "$_IP" ]; then + printf "My IP address is %s\n" "$_IP" +fi + +# set hostname +if [ -f /boot/client-cfg/hostname.txt ]; then + hostname --file /boot/client-cfg/hostname.txt +fi + +# set network + +# start X environment +if [ -f /boot/client-cfg/xinitrc ]; then + ln -fs /boot/client-cfg/xinitrc /home/pi/.xinitrc; + su -l pi -s /bin/bash -c 'startx' & +fi + +exit 0 diff --git a/home/pi/xinitrc b/home/pi/xinitrc new file mode 120000 index 0000000..119f5cc --- /dev/null +++ b/home/pi/xinitrc @@ -0,0 +1 @@ +../../boot/client-cfg/xinitrc \ No newline at end of file