Skip to content

Commit

Permalink
Update raspberry pi build instructions
Browse files Browse the repository at this point in the history
Add linux .bash_profile and openbox autostart config for Pi OS Lite
  • Loading branch information
jay-m-dev committed Aug 15, 2023
1 parent d60413b commit ce01b96
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 12 deletions.
1 change: 1 addition & 0 deletions raspberrypi/build_rpi/.bash_profile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && startx --
18 changes: 18 additions & 0 deletions raspberrypi/build_rpi/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Raspberry Pi OS Setup Instructions
1. Use the raspberry pi imager to write Raspberry Pi OS Lite (64-bit) onto an sd card
2. Boot the Raspberry Pi OS and setup the locale, keyboard layout and initial username and password. Enable **Auto-Login** in **System Options**
**NOTE:** The following steps require that the Raspberry Pi have an active internet connection. Wifi can be configured by running `sudo raspi-config` and setting up the **Wireless LAN** in **System Options**.
3. run install.sh
a. verify that docker is installed. Run `docker --version`
4. save the autostart file in /etc/xdg/openbox/
5. copy the .bash_profile file into the initial user's home directory (~/.bash_profile)
6. copy the ./Aliro/raspberrypi/intropage directory into the user's home directory (~/intropage)
7. copy the extracted contents of the Aliro-*.zip file from the GitHub release page into the user's home page. (~/target)
8. change directory into ~/target/production/Aliro-*/ and run `docker compose pull`
**NOTE:** The docker images will only be **pulled**. The containers will not be built inside the Pi (to keep the final custom OS as light as possible)
9. run clean.sh

# Building the aliro-image executable
## Windows

## Linux
13 changes: 13 additions & 0 deletions raspberrypi/build_rpi/autostart
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Place this file in /etc/xdg/openbox/
# Disable any form of screen saver / screen blanking / power management
xset s off
xset s noblank
xset -dpms

# Allow quitting the X server with CTRL-ATL-Backspace
setxkbmap -option terminate:ctrl_alt_bksp

# Start Chromium in kiosk mode
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' ~/.config/chromium/'Local State'
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/; s/"exit_type":"[^"]\+"/"exit_type":"Normal"/' ~/.config/chromium/Default/Preferences
chromium-browser --disable-infobars --kiosk 'file:///intropage/index.html'
14 changes: 14 additions & 0 deletions raspberrypi/build_rpi/clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#/bin/bash
# disable and remove bluetooth
# not needed in kiosk mode
sudo systemctl disable hciuart.service
sudo systemctl disable bluealsa.service
sudo systemctl disable bluetooth.service
sudo apt purge bluez -y
# remove unnecessary packages and clean up apt
sudo apt autoremove -y
sudo apt autoclean -y
sudo apt clean -y
# clear bash history
history -c

6 changes: 0 additions & 6 deletions raspberrypi/build_rpi/docker_load.sh

This file was deleted.

6 changes: 0 additions & 6 deletions raspberrypi/build_rpi/docker_save.sh

This file was deleted.

15 changes: 15 additions & 0 deletions raspberrypi/build_rpi/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#/bin/bash
# update and upgrade to latest packages
sudo apt update
sudo apt upgrade
# install xserver, xinit, openbox, chromium-browser, pcmanfm, docker
sudo apt install --no-install-recommends xserver-xorg x11-xserver-utils xinit openbox
sudo apt install --no-install-recommends chromium-browser
sudo apt install pcmanfm
# use the convenience script to install docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh ./get-docker.sh
# post install docker
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker

0 comments on commit ce01b96

Please sign in to comment.