sudo apt purge wolfram-engine scratch scratch2 nuscratch sonic-pi idle3 -y
sudo apt purge smartsim java-common minecraft-pi libreoffice* geany -y
sudo apt clean
sudo apt autoremove -y
sudo apt install unclutter xscreensaver ssmtp mailutils ufw
sudo apt update
sudo apt upgrade
Enable SSH and VNC Check display resolution Disable screen blanking
sudo raspi-config
echo "deb http://packages.azlux.fr/debian/ bullseye main" | sudo tee /etc/apt/sources.list.d/azlux.list
wget -qO - https://azlux.fr/repo.gpg.key | sudo apt-key add -
sudo apt update
sudo apt install log2ram
sudo nano /etc/log2ram.conf
This service helps you extend your SD card’s potential life span by reducing the amount of data being written to it.
Your Raspberry Pi’s logs will now be written to the temporary disk located within the RAM. When you shut down, Log2RAM will save these files by synchronizing them back to the disk.
If you want to find the log files that are synchronized to your SD Card, you can find them at /var/hdd.log/
.
Log2RAM will also synchronize these files daily if a restart or shutdown has not happened in the meantime.
https://pimylifeup.com/raspberry-pi-log2ram/
Enable openssh and vnc rules
sudo ufw allow OpenSSH
sudo ufw allow VNC
sudo ufw enable
sudo ufw status
curl -fsSL https://tailscale.com/install.sh | sh
And authenticate with jadwigo@gmail,.com
sudo nano /etc/ssmtp/ssmtp.conf
#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
# root=postmaster
root=pictureframe@immerblei.space
# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named mail.domain.com
# mailhub=mail
mailhub=mail.gandi.net:587
# Where will the mail seem to come from?
#rewriteDomain=
# The full hostname
hostname=pictureframezero.immerblei.space
# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address
# FromLineOverride=YES
FromLineOverride=NO
AuthUser=pictureframe@immerblei.space
AuthPass={YOURPASSWORDHERE}
UseSTARTTLS=YES
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xset -display :0 s off
@xset -display :0 -dpms
@xset -display :0 s noblank
@xscreensaver -no-splash
@chromium-browser --kiosk https://pictureframe.immerblei.space
note Make sure this is done as the pi
user and not as root.
nano /home/pi/chromium_restart.sh; chmod +x /home/pi/chromium_restart.sh
#!/bin/bash
echo "Subject: `date` Restarting pictureframe" > log.txt
echo "From: pictureframe@immerblei.space" >> log.txt
echo "To: pictureframe_log@jadwigo.nl" >> log.txt
echo "" >> log.txt
echo "" >> log.txt
echo "`date` restarting chromium" >> log.txt
echo "IP adresses IPV6" >> log.txt
wget -qO- icanhazip.com 2>&1 >> log.txt
echo "IP adresses IPV4" >> log.txt
wget -qO- http://ipecho.net/plain 2>&1 >> log.txt
echo "" >> log.txt
echo "killing old chromes" >> log.txt
pkill chromium 2>&1 >> log.txt
echo "setting up display" >> log.txt
export DISPLAY=:0
echo "start chromium browser" >> log.txt
chromium-browser \
--check-for-update-interval=1 \
--simulate-critical-update \
--kiosk https://pictureframe.immerblei.space -- 2>&1 >> log.txt &
echo "`date` chromium restarted" >> log.txt
echo "" >> log.txt
note Make sure this is done as the pi
user and not as root.
MAILTO=pictureframe_log@jadwigo.nl
# m h dom mon dow command
15 0 * * * /bin/bash /home/pi/chromium_restart.sh >/home/pi/chromium_restart.log 2>&1
18 0 * * * /usr/sbin/ssmtp pictureframe_log@jadwigo.nl < /home/pi/log.txt
Edit /etc/wpa_supplicant/wpa_supplicant.cfg
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=NL
network={
ssid="jadwigo-ax"
psk=""
key_mgmt=WPA-PSK
}
network={
ssid="jadwigonet"
psk=""
key_mgmt=WPA-PSK
}
network={
ssid="KPN5991B6"
psk=""
key_mgmt=WPA-PSK
}
network={
ssid="GGzBreburgClienten"
psk=""
key_mgmt=WPA-PSK
}
On raspian bullseye the screen needs to be rotated from within the graphical UI:
Preferences
=>Screen configuration
- right click on the hdmi1
- select rotation
- select left
- confirm in the dialog
The screen rotation is set in /boot/config.txt
sudo nano /boot/config.txt
Add the following
# screen rotation (0 = normal, 1 = 90, 2 = 180, 3 = 270)
display_hdmi_rotate=3
sudo reboot now