From 0b4e7cb77a274fa3370149adbbaa13385172b691 Mon Sep 17 00:00:00 2001 From: webreflection Date: Sat, 28 Sep 2024 17:55:15 +0200 Subject: [PATCH] Added a fresh take at cog installation on Pi --- init-pi | 40 ++++++++++++++++++++++++++++++++++++++++ install/weston | 7 ++++++- kiosk/spotipi | 4 ++-- 3 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 init-pi diff --git a/init-pi b/init-pi new file mode 100644 index 0000000..55eb733 --- /dev/null +++ b/init-pi @@ -0,0 +1,40 @@ +#!/usr/bin/env sh + +# RPi3 - RPi4 => boot 512M +# root: init +if [ "$USER" = "root" ] || [ "$(whoami)" = "root" ]; then + pacman-key --init + pacman-key --populate archlinuxarm + pacman -Syyu --noconfirm + + # optional RPi arm64 - Enables RPi5 too + yes y | pacman -S --needed linux-rpi +else + # alarm + if [ "$(which sudo 2> /dev/null)" = "" ]; then + bash <(curl -s https://archibold.io/install/sudo) + else + sudo pacman -Syu --noconfirm + fi + + # weston + sudo pacman -S --needed --noconfirm libdisplay-info + bash <(curl -s https://archibold.io/install/weston) + bash <(curl -s https://archibold.io/install/weston-launch) + + # optional cog + wpewebkit dependencies + sudo pacman -S --needed --noconfirm \ + wpewebkit wpebackend-fdo meson wayland-protocols \ + pipewire-jack libbluray \ + gst-plugins-base gst-plugins-good gst-plugins-ugly gst-plugins-bad \ + gstreamer-vaapi gst-libav \ + geoip geoclue \ + weston mesa ttf-dejavu + + if [ "$(which aur 2> /dev/null)" = "" ]; then + bash <(curl -s https://archibold.io/install/aur) + fi + if [ "$(which cog 2> /dev/null)" = "" ]; then + aur --no-pgp cog + fi +fi diff --git a/install/weston b/install/weston index 10c13df..cea3702 100644 --- a/install/weston +++ b/install/weston @@ -13,7 +13,11 @@ if [ "$(which sudo 2> /dev/null)" = "" ]; then bash <(curl -s https://archibold.io/install/sudo) fi -sudo pacman -S --needed --noconfirm weston +while ! sudo pacman -S --needed --noconfirm weston +do + : +done + sudo groupadd weston 2> /dev/null sudo groupadd weston-launch 2> /dev/null sudo usermod -a -G wheel,games,power,optical,storage,scanner,lp,audio,video,render,weston,weston-launch ${USER} @@ -26,6 +30,7 @@ repaint-window=15 require-input=false [shell] +client=$(which weston-terminal) animation=none close-animation=none startup-animation=none diff --git a/kiosk/spotipi b/kiosk/spotipi index 20e44d0..fae7c37 100644 --- a/kiosk/spotipi +++ b/kiosk/spotipi @@ -3,7 +3,7 @@ if [ "$(which sudo 2> /dev/null)" = "" ]; then bash <(curl -s https://archibold.io/utils/sudo) else - # sudo installs already the + # sudo installs already the sudo pacman-key --init sudo pacman-key --populate archlinuxarm fi @@ -35,7 +35,7 @@ if [ "$(pacman -Qmq wpewebkit-bin 2> /dev/null)" = "" ]; then fi yes y | sudo pacman -S --needed \ - jack libbluray \ + pipewire-jack libbluray \ gst-plugins-base gst-plugins-good gst-plugins-ugly gst-plugins-bad \ gstreamer-vaapi gst-libav \ geoip geoclue \