Raspberry
Contents
Raspberry pi learnings
Some life issues
- A RPi with an old firmware version may cause errors to create the SD card partitions with a latest raspbianOS full installed. The work around was to boot with a basic raspianOS and run
rpi-update. More info can be found here
Create SD card with BSPWM
Dowloand and create
Get the latest version from here , preferable the Raspberry Pi OS Lite 64-bit
Decompress the image
xz -d <image>-arm64-lite.img.xz
Create the copy in the SD card
dd of=/dev/sdx if=<image>-arm64-lite.img status=progress
First boot it will resize and generate ssh keys, and reboot. If a screen is connected, will ask to: Select keyboard layout Create user and password
Start NetworkManager and setup network
sudo systemctl start NetworkManager
sudo systemctl enable NetworkManager
sudo nmtui
It’s also possible to change hostname
Enable and start ssh
sudo systemctl start ssh
sudo systemctl enable ssh
reboot
Install and setup
Update and upgrade the system
sudo apt update
sudo apt full-upgrade
Install and configure BSPWM
sudo apt update
sudo apt install -y bspwm sxhkd xinit lxterminal fonts-firacode feh \
fonts-font-awesome wget rofi chromium-browser cups neofetch cmatrix \
slurm glances nmap micro xsel xclip compton
This script should download and configure the BSPWM for raspbery pi
wget -O - www.33co.de/scripts/bspwm/setup | bash
RPi autologin
To create autologin when systemd is in charge
Create a directory:
mkdir -pv /etc/systemd/system/getty@tty1.service.d/
Create a configuration file:
nano /etc/systemd/system/getty@tty1.service.d/autologin.conf
Copy and paste this code, and change the $username:
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin $username --noclear %I 38400 linux
Enable the service:
systemctl enable getty@tty1.service
RPi run startx after login
Edit .bash_profile
sudo nano ~/.bash_profile
Copy and paste this code
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
exec startx
fi
Edit .xinitrc and make sure the DE is being executed
sudo nano ~/.xinitrc
Copy and paste this code
exec bspwm