Compare commits

..

7 Commits
main ... 1.0.13

Author SHA1 Message Date
d755794ecf add hyperion.ng support 2025-07-18 10:20:48 +01:00
deebd533ce fixing services 2025-07-18 10:10:48 +01:00
ab39f114a8
Update main.yml 2025-07-18 09:44:29 +01:00
cd48e6e86a
Update main.yml 2025-07-18 09:33:59 +01:00
e37514fac3 revert 2025-07-18 09:33:11 +01:00
63e614985a strip out x86 2025-07-18 09:28:42 +01:00
968a171c6f update build script to use new name 2025-06-09 15:00:27 +01:00
20 changed files with 68 additions and 53 deletions

View File

@ -24,9 +24,12 @@ jobs:
sudo apt update -qq sudo apt update -qq
sudo apt install -yqq libguestfs-tools qemu-utils qemu-system-arm qemu-efi-aarch64 qemu-block-extra qemu-user-static binfmt-support rsync sudo wget xz-utils pigz mount dosfstools libarchive-tools sudo apt install -yqq libguestfs-tools qemu-utils qemu-system-arm qemu-efi-aarch64 qemu-block-extra qemu-user-static binfmt-support rsync sudo wget xz-utils pigz mount dosfstools libarchive-tools
- name: Make build script executable
run: chmod +x build.sh
- name: Build firmware - name: Build firmware
run: | run: |
sudo ./build_raspberry_pi.sh sudo ./build.sh
- name: Release build artifacts - name: Release build artifacts
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1

View File

@ -3,6 +3,7 @@ N-AnotterKiosk (Not-AnotterKiosk)
### I have hacked this about alot from the main branch, mainly Raspberry Pi changes ### I have hacked this about alot from the main branch, mainly Raspberry Pi changes
- Removed x86 support
- Added scheduled screen on/off - Added scheduled screen on/off
- Added scheduled chrome page refresh - Added scheduled chrome page refresh
- Rpi3 Overclock settings - Rpi3 Overclock settings
@ -17,7 +18,7 @@ This project aims to solve a lot of those (at least for the author), it might al
#### Key features #### Key features
- [Images built via CI](https://github.com/Manawyrm/N-AnotterKiosk/blob/main/.github/workflows/main.yml) - [Images built via CI](https://github.com/Manawyrm/AnotterKiosk/blob/main/.github/workflows/main.yml)
- WiFi connection support - WiFi connection support
- Raspberry Pi (Arm64) compatibility - Raspberry Pi (Arm64) compatibility
- [USB flash drive, USB SSD, etc. compatible](#how-to-use) - [USB flash drive, USB SSD, etc. compatible](#how-to-use)
@ -31,7 +32,6 @@ This project aims to solve a lot of those (at least for the author), it might al
- VNC support - VNC support
- SSH tunneling support (for remote-access without port-forwarding, etc.) - SSH tunneling support (for remote-access without port-forwarding, etc.)
- Basic API for Rpi Actions - Basic API for Rpi Actions
- Hyperion-NG support for ambilight
#### Planned features: #### Planned features:
@ -47,13 +47,13 @@ This project aims to solve a lot of those (at least for the author), it might al
### How-To Use ### How-To Use
Like any other Raspberry Pi image: download the current .img file from the [Releases](https://github.com/Manawyrm/N-AnotterKiosk/releases) page and flash it to a storage device of your choice. Like any other Raspberry Pi image: download the current .img file from the [Releases](https://github.com/Manawyrm/AnotterKiosk/releases) page and flash it to a storage device of your choice.
SD cards, USB flash drives, USB SSDs, SATA SSDs, NVMe SSDs are all good options. SD cards, USB flash drives, USB SSDs, SATA SSDs, NVMe SSDs are all good options.
You can use a tool like the [Raspberry Pi Imager](https://www.raspberrypi.com/software/), [BalenaEtcher](https://etcher.balena.io/), [Win32DiskImager](https://sourceforge.net/projects/win32diskimager/) or plain "dd" on \*nix-like systems. You can use a tool like the [Raspberry Pi Imager](https://www.raspberrypi.com/software/), [BalenaEtcher](https://etcher.balena.io/), [Win32DiskImager](https://sourceforge.net/projects/win32diskimager/) or plain "dd" on \*nix-like systems.
When using the latter two, make sure to extract the .gz compression first (using a tool like 7zip). When using the latter two, make sure to extract the .gz compression first (using a tool like 7zip).
After flashing, re-plug the storage device and open the FAT32 partition. After flashing, re-plug the storage device and open the FAT32 partition.
Open the [`kioskbrowser.ini`](https://github.com/Manawyrm/N-AnotterKiosk/blob/main/kiosk_skeleton/boot/kioskbrowser.ini) file in a text editor and change everything to your needs. Open the [`kioskbrowser.ini`](https://github.com/Manawyrm/AnotterKiosk/blob/main/kiosk_skeleton/boot/kioskbrowser.ini) file in a text editor and change everything to your needs.
More complex WiFi setups (like WPA2-Enterprise) can be configured by creating a wpa_supplicant.conf. More complex WiFi setups (like WPA2-Enterprise) can be configured by creating a wpa_supplicant.conf.
Adding your own SSH keys can be done by creating a authorized_keys file. Adding your own SSH keys can be done by creating a authorized_keys file.
If you want to use the autossh tunneling features, copy an SSH private key as either "id_rsa" or "id_ed25519". If you want to use the autossh tunneling features, copy an SSH private key as either "id_rsa" or "id_ed25519".
@ -122,11 +122,6 @@ Starts the screen-refresh.service to refresh the screen.
`GET /script.php?action=reboot&key=YOUR_API_KEY` `GET /script.php?action=reboot&key=YOUR_API_KEY`
Reboots the Raspberry Pi. Reboots the Raspberry Pi.
### Hyperion-NG
The kiosk now supports Hyperion-NG for ambilight control.
Manage Hyperion via its web interface, which is available on port 8090.
### Inspiration / Other Kiosk-OSes: ### Inspiration / Other Kiosk-OSes:
- https://github.com/jareware/chilipie-kiosk/ - https://github.com/jareware/chilipie-kiosk/

10
build_raspberry_pi.sh → build.sh Executable file → Normal file
View File

@ -42,9 +42,8 @@ sudo losetup -P /dev/loop0 raspikiosk.img
sudo mount /dev/loop0p2 "${BUILD_DIR}" sudo mount /dev/loop0p2 "${BUILD_DIR}"
sudo mount /dev/loop0p1 "${BUILD_DIR}/boot" sudo mount /dev/loop0p1 "${BUILD_DIR}/boot"
# Copy the (raspberry pi-specific) skeleton files # Copy the skeleton files
sudo rsync -a "${SCRIPT_DIR}/raspberry_pi_skeleton/." "${BUILD_DIR}" sudo rsync -a "${SCRIPT_DIR}/kiosk_skeleton/." "${BUILD_DIR}"
sudo rsync -a "${SCRIPT_DIR}/kiosk_skeleton/." "${BUILD_DIR}/kiosk_skeleton"
# Make fstab read-only # Make fstab read-only
sed -i 's/vfat defaults/vfat ro,defaults/g' "${BUILD_DIR}/etc/fstab" sed -i 's/vfat defaults/vfat ro,defaults/g' "${BUILD_DIR}/etc/fstab"
@ -63,9 +62,10 @@ sudo mount devpts -t devtmpfs -o mode=0755,nosuid "${BUILD_DIR}/dev/"
sudo chroot "${BUILD_DIR}" /raspberry_pi_bullseye.sh sudo chroot "${BUILD_DIR}" /raspberry_pi_bullseye.sh
# and then actually install everything. # and then actually install everything.
sudo chroot "${BUILD_DIR}" /kiosk_skeleton/build.sh sudo chroot "${BUILD_DIR}" /build.sh
sudo rm -r "${BUILD_DIR}/kiosk_skeleton" # remove the build scripts
sudo rm "${BUILD_DIR}/build.sh"
sudo rm "${BUILD_DIR}/raspberry_pi_bullseye.sh" sudo rm "${BUILD_DIR}/raspberry_pi_bullseye.sh"
cp "${BUILD_DIR}/version-info" version-info cp "${BUILD_DIR}/version-info" version-info

View File

@ -1 +1 @@
console=serial0,115200 console=tty1 root=PARTUUID=544c6228-02 rootfstype=ext4 rw rootwait logo.nologo consoleblank=0 loglevel=0 quiet console=serial0,115200 console=tty1 root=PARTUUID=544c6228-02 rootfstype=ext4 ro rootwait logo.nologo consoleblank=0 loglevel=0 quiet

View File

@ -60,4 +60,5 @@ over_voltage=4
arm_boost=1 arm_boost=1
[all] [all]
avoid_warnings=1 avoid_warnings=1
dtparam=spi=on

View File

@ -15,7 +15,7 @@ reboot_time = 04:00
; set screen rotation to be used (normal, left, right, inverted) ; set screen rotation to be used (normal, left, right, inverted)
;rotate_screen = "normal" ;rotate_screen = "normal"
; configure screen to power on/off as specific time of day (time format in 24 hours) ; configure screen to power on/off as specific time of day (time format in 24 hours)
;screen_off_time=23:00 screen_off_time=22:30
;screen_on_time=07:00 ;screen_on_time=07:00
; configure chrome to refresh the page every x minutes ; configure chrome to refresh the page every x minutes
;refresh_screen_every_x_min=15 ;refresh_screen_every_x_min=15

View File

@ -81,20 +81,7 @@ systemctl enable ssh
systemctl enable kiosk-sechedule-screen.service systemctl enable kiosk-sechedule-screen.service
systemctl enable schedule-reboot.service systemctl enable schedule-reboot.service
systemctl enable setup-refresh-timer.service systemctl enable setup-refresh-timer.service
systemctl enable hyperiond
# Install Hyperion
curl -sSL https://apt.hyperion-project.org/hyperion.pub.key | gpg --dearmor -o /usr/share/keyrings/hyperion.pub.gpg
echo "deb [signed-by=/usr/share/keyrings/hyperion.pub.gpg] https://apt.hyperion-project.org/ $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/hyperion.list
apt update
apt install -y hyperion
# Run Hyperion as the 'pi' user
mkdir -p /etc/systemd/system/hyperiond.service.d
echo -e "[Service]\nUser=pi\nGroup=pi" > /etc/systemd/system/hyperiond.service.d/override.conf
chown -R pi:pi /var/lib/hyperion || true
chown -R pi:pi /etc/hyperion
usermod -a -G video pi
# generate a version info/build info file # generate a version info/build info file
echo -n "Chromium version: " >> /version-info echo -n "Chromium version: " >> /version-info
@ -103,7 +90,3 @@ dpkg --list | grep "ii chromium " >> /version-info
echo -n "Linux kernel version: " >> /version-info echo -n "Linux kernel version: " >> /version-info
ls /lib/modules/ | sort -r | head -n 1 >> /version-info ls /lib/modules/ | sort -r | head -n 1 >> /version-info
echo >> /version-info echo >> /version-info
# Clean up apt cache and remove unused packages
apt-get clean
apt-get autoremove -y

View File

@ -0,0 +1,20 @@
{
"device" :
{
"name" : "MyPi",
"type" : "ws281x",
"leds" : 50,
"colorOrder" : "grb",
"gpio" : 18,
"freq" : 800000,
"dmanum" : 5
},
"grabber-framebuffer" :
{
"width" : 64,
"height" : 64,
"frequency_Hz" : 10.0,
"priority" : 890
}
}

View File

@ -1,2 +1,2 @@
N-AnotterKiosk \n \l AnotterKiosk \n \l

View File

@ -1,3 +1,4 @@
Welcome to N-AnotterKiosk! Welcome to AnotterKiosk!
Run "mount -o remount,rw /" to make the root filesystem writeable.
FAT32 / config partition is located in /boot. FAT32 / config partition is located in /boot.

View File

@ -0,0 +1,16 @@
[Unit]
Description=Hyperion ambient light systemd service
After=network.target
[Service]
ExecStart=/usr/bin/hyperiond
WorkingDirectory=/usr/share/hyperion/bin
User=root
Group=root
TimeoutStopSec=5
KillMode=mixed
Restart=on-failure
RestartSec=2
[Install]
WantedBy=multi-user.target

View File

@ -1,4 +1,4 @@
# /etc/systemd/system/kiosk-sechedule-screen.service # /etc/systemd/system/kiosk-schedule-screen.service
[Unit] [Unit]
Description=Schedule Screen On/Off Timers Description=Schedule Screen On/Off Timers
After=multi-user.target After=multi-user.target

View File

@ -11,4 +11,11 @@ APT_LISTCHANGES_FRONTEND=none DEBIAN_FRONTEND=noninteractive apt -o Dpkg::Option
# This step is a bit risky, as the current kernel in https://github.com/raspberrypi/rpi-firmware might # This step is a bit risky, as the current kernel in https://github.com/raspberrypi/rpi-firmware might
# be less tested as the currently shipping kernel in the Raspberry Pi images. # be less tested as the currently shipping kernel in the Raspberry Pi images.
apt install -y rpi-update apt install -y rpi-update
SKIP_CHECK_PARTITION=1 SKIP_WARNING=1 rpi-update SKIP_CHECK_PARTITION=1 SKIP_WARNING=1 rpi-update
# Install Hyperion.ng
wget -qO- https://apt.hyperion-project.org/hyperion.pub | gpg --dearmor -o /usr/share/keyrings/hyperion.pub
echo "deb [signed-by=/usr/share/keyrings/hyperion.pub] https://apt.hyperion-project.org/ bookworm main" > /etc/apt/sources.list.d/hyperion.list
apt update
apt install -y hyperion
systemctl enable hyperion.service

View File

@ -6,8 +6,7 @@ then
if [ -f "/boot/id_rsa" ]; then if [ -f "/boot/id_rsa" ]; then
cp /boot/id_rsa /root/.ssh/id_rsa cp /boot/id_rsa /root/.ssh/id_rsa
AUTOSSH_KEYPATH="-i /root/.ssh/id_rsa" AUTOSSH_KEYPATH="-i /root/.ssh/id_rsa"
fi elif [ -f "/boot/id_ed25519" ]; then
if [ -f "/boot/id_ed25519" ]; then
cp /boot/id_ed25519 /root/.ssh/id_ed25519 cp /boot/id_ed25519 /root/.ssh/id_ed25519
AUTOSSH_KEYPATH="-i /root/.ssh/id_ed25519" AUTOSSH_KEYPATH="-i /root/.ssh/id_ed25519"
fi fi

View File

@ -16,14 +16,7 @@ remount_root() {
get_ini_value() { get_ini_value() {
local section=$1 key=$2 get-ini "$INI_FILE" "$1" "$2"
awk -F '=' -v sec="$section" -v k="$key" '
$0 ~ /^\[.*\]/ { in_section = ($0 == "[" sec "]") }
in_section && $1 ~ "^"k"$" {
gsub(/^[ \t]+|[ \t]+$/, "", $2)
print $2
exit
}' "$INI_FILE"
} }
create_recurring_timer() { create_recurring_timer() {

View File

@ -1,9 +1,7 @@
#!/bin/bash #!/bin/bash
INI_FILE="/boot/kioskbrowser.ini" INI_FILE="/boot/kioskbrowser.ini"
REFRESH_INTERVAL=$(awk -F '=' '/^\[screen\]/ { in_screen=1; next } REFRESH_INTERVAL=$(get-ini "$INI_FILE" screen refresh_screen_every_x_min)
in_screen && /^\[/ { in_screen=0 }
in_screen && $1 ~ /refresh_screen_every_x_min/ { gsub(/ /, "", $2); print $2 }' "$INI_FILE")
# Function to safely remount root FS # Function to safely remount root FS
remount_root() { remount_root() {

View File

@ -1,5 +1,4 @@
<h1>Kioskbrowser</h1> <h1>Kioskbrowser</h1>
<h2>Version: <?php echo exec('git describe --tags --abbrev=0'); ?></h2>
CPU temperature: <br> CPU temperature: <br>
<?php passthru("sudo vcgencmd measure_temp"); ?> <?php passthru("sudo vcgencmd measure_temp"); ?>