Update first-boot configuration and scripts for enhanced kiosk functionality</message>
<message>Modify the first-boot configuration to include the gir1.2-gtklayershell-0.1 package for improved GTK layer shell support. Update the first-boot script to enhance the portal status reporting with connection timeouts. Additionally, implement a restart mechanism for the kanshi service in rotation scripts to ensure immediate application of configuration changes. Introduce a Chromium kiosk extension to disable text selection, improving user experience in kiosk mode. These changes streamline the setup process and enhance the overall functionality of the kiosk environment.
This commit is contained in:
@@ -4,6 +4,16 @@
|
||||
step_04_kiosk_files() {
|
||||
mkdir -p "$AUTOSTART" "$PI_HOME/Desktop" "$PI_HOME/.local/share/applications"
|
||||
|
||||
# Extension: disable text selection so touch-drag scrolls
|
||||
EXT_DIR="$PI_HOME/.local/share/chromium-kiosk-no-select"
|
||||
mkdir -p "$EXT_DIR"
|
||||
if curl -fsSL "${FILE_SERVER}/chromium-kiosk-no-select/manifest.json" -o "$EXT_DIR/manifest.json" 2>/dev/null && \
|
||||
curl -fsSL "${FILE_SERVER}/chromium-kiosk-no-select/no-select.css" -o "$EXT_DIR/no-select.css" 2>/dev/null && \
|
||||
curl -fsSL "${FILE_SERVER}/chromium-kiosk-no-select/inject.js" -o "$EXT_DIR/inject.js" 2>/dev/null; then
|
||||
chown -R "$PI_USER:$PI_USER" "$EXT_DIR"
|
||||
log "Chromium kiosk no-select extension installed"
|
||||
fi
|
||||
|
||||
curl -fsSL "${FILE_SERVER}/start-chromium.sh" -o "$PI_HOME/start-chromium.sh"
|
||||
curl -fsSL "${FILE_SERVER}/chromium-kiosk.desktop" -o "$AUTOSTART/chromium-kiosk.desktop"
|
||||
chmod 755 "$PI_HOME/start-chromium.sh"
|
||||
@@ -17,6 +27,8 @@ step_04_kiosk_files() {
|
||||
chmod 755 "$PI_HOME/Desktop/Chromium Kiosk.desktop"
|
||||
chmod 644 "$PI_HOME/.local/share/applications/chromium-kiosk-launcher.desktop"
|
||||
chown "$PI_USER:$PI_USER" "$PI_HOME/Desktop/Chromium Kiosk.desktop" "$PI_HOME/.local/share/applications/chromium-kiosk-launcher.desktop"
|
||||
# Mark as trusted so pcmanfm shows the icon instead of a text file
|
||||
sudo -u "$PI_USER" gio set "$PI_HOME/Desktop/Chromium Kiosk.desktop" metadata::trusted true 2>/dev/null || true
|
||||
rm -f /tmp/chromium-kiosk-launcher.desktop
|
||||
log "Chromium kiosk launcher installed"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user