Raspberry Pi - GLPA Video Racks

instructions to build rpi image for GLPA video front-of-room racks

  • two video outputs (HDMI-to-VGA for info display, USB-to-VGA for paper timer)
  • MQTT broker and control program for Extron VGA matrix
  • web interface to restart browsers and websocket interface to matrix
  • code tarball: rpi-video.tar.bz2
install raspbian lite image (sadly, no netinst for stretch yet)
login: pi - raspberry
sudo su -
passwd (set root password)
edit /etc/hostname and /etc/hosts to change hostname
edit /etc/ssh/sshd_config - uncomment PermitRootLogin line and set to "yes"
systemctl enable ssh.socket
raspi-config
6 - overclock, High (1 GHz)
4 - locale, change locale, enable (only) en_US.UTF-8, set as default
4 - locale, change timezone, America, Chicago
4 - locale, change keyboard layout, generic 101-key, english (US), default, no compose
reboot

connect with ssh, login as root
aptitude update
aptitude purge apt-listchanges avahi-daemon libnss-mdns blends-tasks pi-bluetooth bluez bluez-firmware debconf-i18n debconf-utils distro-info-data dmidecode dphys-swapfile ed gdb geoip-database libpam-chksshpwd gettext-base htop mountall plymouth initramfs-tools initramfs-tools-core info install-info iptables iso-codes nfs-common keyutils raspberrypi-net-mods klibc-utils linux-base lsb-release raspi-config lua5.1 luajit makedev nano ncdu ncurses-term netcat-openbsd openresolv parted paxctld python3 cifs-utils samba-common xml-core sgml-base shared-mime-info tasksel tasksel-data tcpd traceroute triggerhappy unzip usb-modeswitch usb-modeswitch-data v4l-utils xauth xdg-user-dirs isc-dhcp-client isc-dhcp-common
# note: whiptail used instead of dialog
aptitude -o Aptitude::Delete-Unused=1 install 
aptitude purge '~c'
rm -r /var/run/avahi-daemon

swapoff -a
rm /var/swap

aptitude forget-new
aptitude full-upgrade

> /etc/motd
sed -i 's/#hdmi_group=1/hdmi_group=2/g' /boot/config.txt
sed -i 's/#hdmi_mode=1/hdmi_mode=16/g' /boot/config.txt
sed -i 's/#hdmi_drive=2/hdmi_drive=2/g' /boot/config.txt
sed -i 's/#hdmi_force_hotplug=1/hdmi_force_hotplug=1/g' /boot/config.txt
sed -i 's/hdmi_mode=16/hdmi_mode=16\n\nhdmi_force_mode=1/g' /boot/config.txt

aptitude install screen ethtool tcpdump vim
aptitude install rng-tools
aptitude --without-recommends install dnsutils

aptitude install watchdog
sed -i -e 's/^#watchdog-device/watchdog-device/g' /etc/watchdog.conf
sed -i -e 's/^#max-load-1\t/max-load-1\t/g' /etc/watchdog.conf
echo "# Raspberry Pi doesn't work with the default timeout of 60; set it to 10 instead" >> /etc/watchdog.conf
echo $'watchdog-timeout\t= 10' >> /etc/watchdog.conf

usermod -l tdobes -d /home/tdobes -m pi
groupmod -n tdobes pi
passwd tdobes
chfn -f "Tom Dobes" tdobes
adduser tdobes systemd-journal

# VGA Matrix + MQTT Control
aptitude install mosquitto mosquitto-clients python-serial picocom
wget http://http.us.debian.org/debian/pool/main/m/mosquitto/python-mosquitto_1.3.4-2+deb8u1_all.deb
dpkg -i python-mosquitto_1.3.4-2+deb8u1_all.deb

echo '[Unit]' > /etc/systemd/system/mosquitto.service
echo 'Description=mosquitto MQTT v3.1 message broker' >> /etc/systemd/system/mosquitto.service
echo 'After=network.target' >> /etc/systemd/system/mosquitto.service
echo >> /etc/systemd/system/mosquitto.service
echo '[Service]' >> /etc/systemd/system/mosquitto.service
echo 'ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf' >> /etc/systemd/system/mosquitto.service
echo 'User=mosquitto' >> /etc/systemd/system/mosquitto.service
echo 'Restart=always' >> /etc/systemd/system/mosquitto.service
echo 'RestartSec=1' >> /etc/systemd/system/mosquitto.service
echo 'StartLimitInterval=10s' >> /etc/systemd/system/mosquitto.service
echo 'StartLimitBurst=10' >> /etc/systemd/system/mosquitto.service
echo >> /etc/systemd/system/mosquitto.service
echo '[Install]' >> /etc/systemd/system/mosquitto.service
echo 'WantedBy=multi-user.target' >> /etc/systemd/system/mosquitto.service
systemctl enable mosquitto.service

echo 'listener 1883' > /etc/mosquitto/conf.d/listen-mqtt.conf
echo 'protocol mqtt' >> /etc/mosquitto/conf.d/listen-mqtt.conf
echo 'listener 8000' > /etc/mosquitto/conf.d/listen-websockets.conf
echo 'protocol websockets' >> /etc/mosquitto/conf.d/listen-websockets.conf
systemctl restart mosquitto

aptitude --without-recommends install mini-httpd
sed -i -e 's/^START=0$/START=1/g' /etc/default/mini-httpd
sed -i -e 's/^host=localhost$/#host=localhost/g; s/^user=nobody$/user=www-data/g' /etc/mini-httpd.conf

echo '[Unit]' > /etc/systemd/system/mini-httpd.service
echo 'Description=mini_httpd - small HTTP server' >> /etc/systemd/system/mini-httpd.service
echo 'After=network.target' >> /etc/systemd/system/mini-httpd.service
echo >> /etc/systemd/system/mini-httpd.service
echo '[Service]' >> /etc/systemd/system/mini-httpd.service
echo 'ExecStart=/usr/sbin/mini_httpd -C /etc/mini-httpd.conf' >> /etc/systemd/system/mini-httpd.service
echo 'Type=forking' >> /etc/systemd/system/mini-httpd.service
echo 'Restart=always' >> /etc/systemd/system/mini-httpd.service
echo 'RestartSec=1' >> /etc/systemd/system/mini-httpd.service
echo >> /etc/systemd/system/mini-httpd.service
echo '[Install]' >> /etc/systemd/system/mini-httpd.service
echo 'WantedBy=multi-user.target' >> /etc/systemd/system/mini-httpd.service

systemctl enable mini-httpd.service
systemctl restart mini-httpd.service

echo >> /etc/sudoers
echo 'www-data ALL=(ALL:ALL) NOPASSWD:/bin/systemctl' >> /etc/sudoers

adduser --system --home /nonexistent --no-create-home matrix
adduser matrix dialout

echo '[Unit]' > /etc/systemd/system/mqtt_matrix_bridge_vga.service
echo 'Description=MQTT Matrix Bridge for VGA' >> /etc/systemd/system/mqtt_matrix_bridge_vga.service
echo 'After=network.target' >> /etc/systemd/system/mqtt_matrix_bridge_vga.service
echo 'Requires=mosquitto.service' >> /etc/systemd/system/mqtt_matrix_bridge_vga.service
echo 'After=mosquitto.service' >> /etc/systemd/system/mqtt_matrix_bridge_vga.service
echo >> /etc/systemd/system/mqtt_matrix_bridge_vga.service
echo '[Service]' >> /etc/systemd/system/mqtt_matrix_bridge_vga.service
echo 'ExecStart=/opt/mqtt_matrix_bridge/vga.py' >> /etc/systemd/system/mqtt_matrix_bridge_vga.service
echo 'WorkingDirectory=/opt/mqtt_matrix_bridge' >> /etc/systemd/system/mqtt_matrix_bridge_vga.service
echo 'User=matrix' >> /etc/systemd/system/mqtt_matrix_bridge_vga.service
echo 'Environment=PYTHONUNBUFFERED=1' >> /etc/systemd/system/mqtt_matrix_bridge_vga.service
echo >> /etc/systemd/system/mqtt_matrix_bridge_vga.service
echo 'Restart=always' >> /etc/systemd/system/mqtt_matrix_bridge_vga.service
echo 'RestartSec=1' >> /etc/systemd/system/mqtt_matrix_bridge_vga.service
echo 'StartLimitInterval=10s' >> /etc/systemd/system/mqtt_matrix_bridge_vga.service
echo 'StartLimitBurst=10' >> /etc/systemd/system/mqtt_matrix_bridge_vga.service
echo >> /etc/systemd/system/mqtt_matrix_bridge_vga.service
echo '[Install]' >> /etc/systemd/system/mqtt_matrix_bridge_vga.service
echo 'WantedBy=multi-user.target' >> /etc/systemd/system/mqtt_matrix_bridge_vga.service
systemctl enable mqtt_matrix_bridge_vga.service

# Browser
aptitude install xserver-xorg-video-fbturbo xserver-xorg-input-evdev
aptitude install xinit evilwm xdotool x11vnc unclutter x11-xserver-utils
sed -i -e 's/^allowed_users=console/allowed_users=anybody/g' /etc/X11/Xwrapper.config
aptitude install python-pyside.qtwebkit
aptitude install xserver-xorg-input-void

# argh - have to use chromium due to lack of certain features in webkit:
# (manually adding libgtk3 because it's not in the chromium deps, but it needs it to start)
aptitude --without-recommends install chromium-browser libgtk-3-0

sed -i 's/START_UNCLUTTER="true"/START_UNCLUTTER="false"/g' /etc/default/unclutter
sed -i -e 's/^use-ssh-agent$/#use-ssh-agent/g' /etc/X11/Xsession.options

echo '#!/usr/bin/env python' > /usr/local/bin/simplebrowser.py
echo >> /usr/local/bin/simplebrowser.py
echo 'import sys' >> /usr/local/bin/simplebrowser.py
echo 'from PySide.QtCore import *' >> /usr/local/bin/simplebrowser.py
echo 'from PySide.QtGui import *' >> /usr/local/bin/simplebrowser.py
echo 'from PySide.QtWebKit import *' >> /usr/local/bin/simplebrowser.py
echo >> /usr/local/bin/simplebrowser.py
echo 'app = QApplication(sys.argv)' >> /usr/local/bin/simplebrowser.py
echo >> /usr/local/bin/simplebrowser.py
echo 'if len(sys.argv) == 2:' >> /usr/local/bin/simplebrowser.py
echo '  url = QUrl(sys.argv[1])' >> /usr/local/bin/simplebrowser.py
echo 'else:' >> /usr/local/bin/simplebrowser.py
echo "  url = QUrl('http://www.google.com/')" >> /usr/local/bin/simplebrowser.py
echo >> /usr/local/bin/simplebrowser.py
echo 'web = QWebView()' >> /usr/local/bin/simplebrowser.py
echo 'web.load(url)' >> /usr/local/bin/simplebrowser.py
echo 'web.show()' >> /usr/local/bin/simplebrowser.py
echo >> /usr/local/bin/simplebrowser.py
echo 'sys.exit(app.exec_())' >> /usr/local/bin/simplebrowser.py
chmod +x /usr/local/bin/simplebrowser.py

echo 'Section "ServerLayout"' > /etc/X11/xorg.conf
echo '  Identifier "hdmi"' >> /etc/X11/xorg.conf
echo '  Screen 0 "hdmi-screen" 0 0' >> /etc/X11/xorg.conf
echo 'EndSection' >> /etc/X11/xorg.conf
echo >> /etc/X11/xorg.conf
echo 'Section "Device"' >> /etc/X11/xorg.conf
echo '  Identifier "RPi HDMI"' >> /etc/X11/xorg.conf
echo '  Driver "fbturbo"' >> /etc/X11/xorg.conf
echo '  Option "fbdev" "/dev/fb0"' >> /etc/X11/xorg.conf
echo '  Option "SwapbuffersWait" "true"' >> /etc/X11/xorg.conf
echo 'EndSection' >> /etc/X11/xorg.conf
echo >> /etc/X11/xorg.conf
echo 'Section "Screen"' >> /etc/X11/xorg.conf
echo '  Identifier "hdmi-screen"' >> /etc/X11/xorg.conf
echo '  Device "RPi HDMI"' >> /etc/X11/xorg.conf
echo 'EndSection' >> /etc/X11/xorg.conf
echo >> /etc/X11/xorg.conf
echo >> /etc/X11/xorg.conf
echo 'Section "ServerLayout"' >> /etc/X11/xorg.conf
echo '  Identifier "usb"' >> /etc/X11/xorg.conf
echo '  Screen 0 "usb-screen" 0 0' >> /etc/X11/xorg.conf
echo '  InputDevice "Void" "CorePointer"' >> /etc/X11/xorg.conf
echo '  InputDevice "Void" "CoreKeyboard"' >> /etc/X11/xorg.conf
echo '  Option "AutoAddDevices" "Off"' >> /etc/X11/xorg.conf
echo 'EndSection' >> /etc/X11/xorg.conf
echo >> /etc/X11/xorg.conf
echo 'Section "InputDevice"' >> /etc/X11/xorg.conf
echo '  Identifier "Void"' >> /etc/X11/xorg.conf
echo '  Driver "void"' >> /etc/X11/xorg.conf
echo 'EndSection' >> /etc/X11/xorg.conf
echo >> /etc/X11/xorg.conf
echo 'Section "Device"' >> /etc/X11/xorg.conf
echo '  Identifier "USB DisplayLink"' >> /etc/X11/xorg.conf
echo '  Driver "fbturbo"' >> /etc/X11/xorg.conf
echo '  Option "fbdev" "/dev/fb1"' >> /etc/X11/xorg.conf
echo '  Option "ShadowFB" "off"' >> /etc/X11/xorg.conf
echo 'EndSection' >> /etc/X11/xorg.conf
echo >> /etc/X11/xorg.conf
echo 'Section "Screen"' >> /etc/X11/xorg.conf
echo '  Identifier "usb-screen"' >> /etc/X11/xorg.conf
echo '  Device "USB DisplayLink"' >> /etc/X11/xorg.conf
echo 'EndSection' >> /etc/X11/xorg.conf

adduser --shell /bin/false --gecos "HDMI Browser" --disabled-password browser1
adduser --shell /bin/false --gecos "USB Browser" --disabled-password browser2

echo '#!/bin/sh' > /usr/local/bin/browser-xsession.sh
echo >> /usr/local/bin/browser-xsession.sh
echo 'pkill -9 evilwm' >> /usr/local/bin/browser-xsession.sh
echo 'pkill -9 x11vnc' >> /usr/local/bin/browser-xsession.sh
echo >> /usr/local/bin/browser-xsession.sh
echo 'x11vnc -q -usepw -N -ncache 0 -shared -forever &' >> /usr/local/bin/browser-xsession.sh
echo >> /usr/local/bin/browser-xsession.sh
echo 'xset s off #disable screensaver' >> /usr/local/bin/browser-xsession.sh
echo 'xset dpms 0 0 0 #disable automatic power saving' >> /usr/local/bin/browser-xsession.sh
echo 'unclutter -grab -idle 2 & #daemon to auto-hide mouse' >> /usr/local/bin/browser-xsession.sh
echo >> /usr/local/bin/browser-xsession.sh
echo '#SHELL=/bin/bash xterm &' >> /usr/local/bin/browser-xsession.sh
echo >> /usr/local/bin/browser-xsession.sh
echo "exec evilwm -fn '*-clean-*'" >> /usr/local/bin/browser-xsession.sh
chmod +x /usr/local/bin/browser-xsession.sh
ln -s /usr/local/bin/browser-xsession.sh /home/browser1/.xsession
ln -s /usr/local/bin/browser-xsession.sh /home/browser2/.xsession

mkdir ~browser1/.vnc
x11vnc -storepasswd **PASSWORD** ~browser1/.vnc/passwd
chown -R browser1:browser1 ~browser1/.vnc
chmod 0600 ~browser1/.vnc/passwd
mkdir ~browser2/.vnc
x11vnc -storepasswd **PASSWORD** ~browser2/.vnc/passwd
chown -R browser2:browser2 ~browser2/.vnc
chmod 0600 ~browser2/.vnc/passwd

echo '#!/bin/sh' > /usr/local/bin/browser1.sh
echo >> /usr/local/bin/browser1.sh
echo 'NETWORK_CHECK=router' >> /usr/local/bin/browser1.sh
echo 'URL=http://glpa.org:9090/bundles/glpa-infodisplay/graphics/info-display.html?stream=1' >> /usr/local/bin/browser1.sh
# TODO: update above parameter based on hostname instead of hardcoding.  For now, video1 => stream=1, video2 => stream=2, etc.
echo >> /usr/local/bin/browser1.sh
echo 'echo -n waiting for network' >> /usr/local/bin/browser1.sh
echo 'while ! ping -c 1 $NETWORK_CHECK > /dev/null 2> /dev/null ; do' >> /usr/local/bin/browser1.sh
echo '  echo -n .' >> /usr/local/bin/browser1.sh
echo '  sleep 1' >> /usr/local/bin/browser1.sh
echo 'done' >> /usr/local/bin/browser1.sh
echo 'echo done!' >> /usr/local/bin/browser1.sh
echo >> /usr/local/bin/browser1.sh
echo 'echo -n waiting for server' >> /usr/local/bin/browser1.sh
echo 'while ! wget -q -O /dev/null $URL ; do' >> /usr/local/bin/browser1.sh
echo '  echo -n .' >> /usr/local/bin/browser1.sh
echo '  sleep 1' >> /usr/local/bin/browser1.sh
echo 'done' >> /usr/local/bin/browser1.sh
echo 'echo done!' >> /usr/local/bin/browser1.sh
echo >> /usr/local/bin/browser1.sh
echo '# start chromium' >> /usr/local/bin/browser1.sh
echo 'exec nice -n 1 /usr/lib/chromium-browser/chromium-browser --disable-gpu --disable-preconnect --disable-breakpad --disable-sync --no-sandbox --disable-plugins --disable-translate --dns-prefetch-disable --data-reduction-proxy-server-experiments-disabled --disable-bundled-ppapi-flash --no-pings --no-first-run --chrome-frame --disable-session-crashed-bubble --start-fullscreen --kiosk --app=$URL' >> /usr/local/bin/browser1.sh
chmod +x /usr/local/bin/browser1.sh

echo '#!/bin/sh' > /usr/local/bin/browser2.sh
echo >> /usr/local/bin/browser2.sh
echo 'NETWORK_CHECK=router' >> /usr/local/bin/browser2.sh
echo 'URL=http://live.glpa.org/timer/' >> /usr/local/bin/browser2.sh
echo >> /usr/local/bin/browser2.sh
echo 'echo -n waiting for network' >> /usr/local/bin/browser2.sh
echo 'while ! ping -c 1 $NETWORK_CHECK > /dev/null 2> /dev/null ; do' >> /usr/local/bin/browser2.sh
echo '  echo -n .' >> /usr/local/bin/browser2.sh
echo '  sleep 1' >> /usr/local/bin/browser2.sh
echo 'done' >> /usr/local/bin/browser2.sh
echo 'echo done!' >> /usr/local/bin/browser2.sh
echo >> /usr/local/bin/browser2.sh
echo 'echo -n waiting for server' >> /usr/local/bin/browser2.sh
echo 'while ! wget -q -O /dev/null $URL ; do' >> /usr/local/bin/browser2.sh
echo '  echo -n .' >> /usr/local/bin/browser2.sh
echo '  sleep 1' >> /usr/local/bin/browser2.sh
echo 'done' >> /usr/local/bin/browser2.sh
echo 'echo done!' >> /usr/local/bin/browser2.sh
echo >> /usr/local/bin/browser2.sh
echo '# move the window to appropriate location' >> /usr/local/bin/browser2.sh
echo 'sh -c '"'"'sleep 1 ; echo -n attempting to move simplebrowser ; while ! xdotool search --onlyvisible --name simplebrowser.py windowmove 0 0 windowsize 800 600; do echo -n . ; sleep 1 ; done ; echo done!'"'"' &' >> /usr/local/bin/browser2.sh
echo >> /usr/local/bin/browser2.sh
echo '# start simplebrowser' >> /usr/local/bin/browser2.sh
echo 'exec nice -n 1 simplebrowser.py $URL' >> /usr/local/bin/browser2.sh
chmod +x /usr/local/bin/browser2.sh

echo '[Unit]' > /etc/systemd/system/startx1.service
echo 'Description=Start Xorg for HDMI' >> /etc/systemd/system/startx1.service
echo >> /etc/systemd/system/startx1.service
echo '[Service]' >> /etc/systemd/system/startx1.service
echo 'ExecStart=-/usr/bin/startx -- :0 -layout hdmi -nolisten tcp vt2' >> /etc/systemd/system/startx1.service
echo 'ExecStopPost=-/usr/bin/pkill -9 -U browser1 evilwm' >> /etc/systemd/system/startx1.service
echo 'User=browser1' >> /etc/systemd/system/startx1.service
echo 'Restart=always' >> /etc/systemd/system/startx1.service
echo 'RestartSec=1' >> /etc/systemd/system/startx1.service
echo 'StartLimitInterval=10s' >> /etc/systemd/system/startx1.service
echo 'StartLimitBurst=10' >> /etc/systemd/system/startx1.service
echo >> /etc/systemd/system/startx1.service
echo '[Install]' >> /etc/systemd/system/startx1.service
echo 'WantedBy=multi-user.target' >> /etc/systemd/system/startx1.service

echo '[Unit]' > /etc/systemd/system/startx2.service
echo 'Description=Start Xorg for USB' >> /etc/systemd/system/startx2.service
echo >> /etc/systemd/system/startx2.service
echo '[Service]' >> /etc/systemd/system/startx2.service
echo 'ExecStart=-/usr/bin/startx -- :1 -layout usb -nolisten tcp -sharevts vt2' >> /etc/systemd/system/startx2.service
echo 'ExecStopPost=-/usr/bin/pkill -9 -U browser2 evilwm' >> /etc/systemd/system/startx2.service
echo 'User=browser2' >> /etc/systemd/system/startx2.service
echo 'Restart=always' >> /etc/systemd/system/startx2.service
echo 'RestartSec=1' >> /etc/systemd/system/startx2.service
echo 'StartLimitInterval=10s' >> /etc/systemd/system/startx2.service
echo 'StartLimitBurst=10' >> /etc/systemd/system/startx2.service
echo >> /etc/systemd/system/startx2.service
echo '[Install]' >> /etc/systemd/system/startx2.service
echo 'WantedBy=multi-user.target' >> /etc/systemd/system/startx2.service

systemctl enable startx1.service
systemctl enable startx2.service

echo '[Unit]' > /etc/systemd/system/browser1.service
echo 'Description=Browser for HDMI' >> /etc/systemd/system/browser1.service
echo 'After=startx1.service' >> /etc/systemd/system/browser1.service
echo 'Requires=startx1.service' >> /etc/systemd/system/browser1.service
echo >> /etc/systemd/system/browser1.service
echo '[Service]' >> /etc/systemd/system/browser1.service
echo 'ExecStart=-/usr/local/bin/browser1.sh' >> /etc/systemd/system/browser1.service
echo 'User=browser1' >> /etc/systemd/system/browser1.service
echo 'Environment=DISPLAY=:0' >> /etc/systemd/system/browser1.service
echo 'Restart=always' >> /etc/systemd/system/browser1.service
echo 'RestartSec=1' >> /etc/systemd/system/browser1.service
echo 'StartLimitInterval=10s' >> /etc/systemd/system/browser1.service
echo 'StartLimitBurst=10' >> /etc/systemd/system/browser1.service
echo >> /etc/systemd/system/browser1.service
echo '[Install]' >> /etc/systemd/system/browser1.service
echo 'WantedBy=multi-user.target' >> /etc/systemd/system/browser1.service

echo '[Unit]' > /etc/systemd/system/browser2.service
echo 'Description=Browser for HDMI' >> /etc/systemd/system/browser2.service
echo 'After=startx2.service' >> /etc/systemd/system/browser2.service
echo 'Requires=startx2.service' >> /etc/systemd/system/browser2.service
echo >> /etc/systemd/system/browser2.service
echo '[Service]' >> /etc/systemd/system/browser2.service
echo 'ExecStart=-/usr/local/bin/browser2.sh' >> /etc/systemd/system/browser2.service
echo 'User=browser2' >> /etc/systemd/system/browser2.service
echo 'Environment=DISPLAY=:1' >> /etc/systemd/system/browser2.service
echo 'Restart=always' >> /etc/systemd/system/browser2.service
echo 'RestartSec=1' >> /etc/systemd/system/browser2.service
echo 'StartLimitInterval=10s' >> /etc/systemd/system/browser2.service
echo 'StartLimitBurst=10' >> /etc/systemd/system/browser2.service
echo >> /etc/systemd/system/browser2.service
echo '[Install]' >> /etc/systemd/system/browser2.service
echo 'WantedBy=multi-user.target' >> /etc/systemd/system/browser2.service

systemctl enable browser1.service
systemctl enable browser2.service

# Clean-up and optimization

systemctl disable rsyslog.service
systemctl disable rsync.service
systemctl disable sshswitch.service
systemctl stop rsyslog.service
rm /var/log/auth.log* /var/log/daemon.log* /var/log/debug /var/log/kern.log* /var/log/messages /var/log/user.log* /var/log/syslog

# stuff in tarball
wget http://wiki.mcpstars.org/_media/computer/rpi-video.tar.bz2
tar -xjf rpi-video.tar.bz2

chmod 644 windows7_fonts/*
mv windows7_fonts/* /usr/local/share/fonts/
rmdir windows7_fonts
fc-cache -s -v

chown -R tdobes:tdobes opt-mqtt_matrix_bridge
chmod -R 755 opt-mqtt_matrix_bridge
mv opt-mqtt_matrix_bridge /opt/mqtt_matrix_bridge

chown -R tdobes:tdobes var-www-html
chmod -R 755 var-www-html
chmod 644 var-www-html/index.html var-www-html/matrix/*
mv var-www-html/* /var/www/html/
rmdir var-www-html
rm /var/www/html/index.mini-httpd.html

rm rpi-video.tar.bz2

# misc - sound stuff
aptitude install alsa-utils

systemctl start alsa-restore.service
amixer sset PCM 0
systemctl restart alsa-restore.service

reboot

# TODO: ?maybe? Uninstall build-essential and dependent libraries/tools
computer/raspberry_pi_video_setup.txt · Last modified: 2017/10/08 22:15 by tdobes
Recent changes RSS feed Driven by DokuWiki Valid XHTML 1.0 Valid CSS