From 5e767d99f819ea14dc8ca2f0417793df5bf50444 Mon Sep 17 00:00:00 2001 From: Karl Date: Tue, 22 Jul 2025 14:01:54 +0100 Subject: [PATCH] correct code --- kiosk_skeleton/boot/custom.toml | 17 +++++++++++++---- kiosk_skeleton/build.sh | 6 +++--- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/kiosk_skeleton/boot/custom.toml b/kiosk_skeleton/boot/custom.toml index 11266da..8e40055 100644 --- a/kiosk_skeleton/boot/custom.toml +++ b/kiosk_skeleton/boot/custom.toml @@ -1,6 +1,15 @@ -# Raspberry Pi OS "Bookworm" First-Boot Configuration -# This file is ONLY used to get the device onto the network. -# All other kiosk configuration is handled by kioskbrowser.ini. +# ============================================================================== +# == Raspberry Pi OS - First-Boot Wi-Fi Configuration +# ============================================================================== +# +# This file is used ONLY to get the device onto a Wi-Fi network on its +# very first boot. The filename "custom.toml" is required by the OS. +# +# -> Edit the "ssid" and "password" values below with your network details. +# +# All other kiosk-specific configuration (hostname, SSH keys, etc.) is +# handled by the "kioskbrowser.ini" file after this initial boot. +# config_version = 1 @@ -8,4 +17,4 @@ config_version = 1 ssid = "YOUR_WIFI_SSID" password = "YOUR_WIFI_PASSWORD" password_encrypted = false -country = "US" \ No newline at end of file +country = "GB" \ No newline at end of file diff --git a/kiosk_skeleton/build.sh b/kiosk_skeleton/build.sh index 64c7b38..5a6204b 100755 --- a/kiosk_skeleton/build.sh +++ b/kiosk_skeleton/build.sh @@ -5,6 +5,7 @@ apt update DEBIAN_FRONTEND=noninteractive apt install -y lightdm openbox nginx php-fpm php-cli chromium autossh unclutter x11-xserver-utils xdotool htop nano openssh-server rsync x11vnc lm-sensors ntpdate scrot wireless-regdb fontconfig php-cli rsync -a --chown=root:root "/kiosk_skeleton/." "/" +# Ensure all our custom scripts are executable chmod +x /usr/bin/kiosk-* /usr/bin/get-ini /usr/bin/refresh-screen /usr/bin/schedule-* /usr/bin/setup-refresh-timer # Add emoji support @@ -55,8 +56,8 @@ echo "tmpfs /root/.ssh/ tmpfs mode=0700,nosuid,nodev,uid=0,gid=0 0 0" >> # Create symlinks for configuration files which will later get created at runtime (in /tmp) mkdir -p /etc/wpa_supplicant/ -touch "${BUILD_DIR}/etc/hostname" -touch "${BUILD_DIR}/etc/hosts" +touch /etc/hostname +touch /etc/hosts ln -sf /tmp/hostname /etc/hostname ln -sf /tmp/hosts /etc/hosts ln -sf /tmp/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant.conf @@ -71,7 +72,6 @@ systemctl disable bluetooth || true systemctl enable kiosk-ssh-keys systemctl enable NetworkManager -systemctl enable NetworkManager systemctl enable kiosk-set-hostname systemctl enable kiosk-autossh systemctl enable kiosk-watchdog