| README.md | ||
| setup-signage.sh | ||
Alpine Linux Weston/Chromium Kiosk Setup
This script automates the setup of a minimal Alpine Linux system to function as a digital signage kiosk. It installs and configures Weston (a Wayland compositor), Chromium (web browser), and necessary supporting services to automatically display a specific webpage in fullscreen kiosk mode upon system boot.
Features
- Automated installation and configuration on a base Alpine Linux system.
- Uses the modern Wayland display protocol via the Weston compositor.
- Employs
elogindfor session and seat management. - Uses
greetdwithagreetyfor lightweight, automatic user login. - Configurable target URL displayed in Chromium's kiosk mode.
- Includes basic Mesa graphics drivers and essential firmware.
- Checks for the problematic
nomodesetkernel parameter.
How to Use
- Download/Save Script: Obtain the
setup_signage.shscript and place it on your target Alpine machine (e.g., usingwget,scp, or copy-paste via SSH). - Configure:
- Edit the script using a text editor (like
nano):nano setup_signage.sh - Modify the following variables near the top of the script:
KIOSK_URL: Set this to the full URL of the webpage you want to display (e.g.,"https://your-status-board.com").SIGNAGE_USER: You can change the username if desired, but"signage"is standard for this setup.
- Save the changes (
Ctrl+O,Enterin nano) and exit (Ctrl+X).
- Edit the script using a text editor (like
- Make Executable:
chmod +x setup_signage.sh - Run as Root:
./setup_signage.sh - Review Output: Watch the script output for any errors. Pay attention to any warnings, especially regarding
nomodeset. - Reboot: If the script completes successfully, reboot the system:
reboot
Upon rebooting, the system should automatically log in as the signage user and launch Weston with Chromium displaying the configured KIOSK_URL.
How It Works (Technical Details)
The script performs the following main steps:
- Checks for root privileges.
- Checks
/proc/cmdlinefor thenomodesetkernel parameter and issues a warning if found (as this prevents Weston's DRM backend from working). - Updates Alpine package repositories (
apk update). - Runs
setup-wayland-baseto install and configureelogind,eudev, enable the community repository, and set up related services. - Installs core packages:
weston,weston-backend-drm,weston-shell-desktop,chromium,mesa-dri-gallium,mesa-va-gallium,dbus, fonts,util-linux(for dependencies),linux-firmware,greetd,greetd-agreety. - Ensures the
dbusservice is enabled and started. - Creates the non-root user (
signageby default) with/bin/shas the shell. - Creates Weston configuration (
~/.config/weston.ini) settingidle-time=0(no screen blanking) and specifying Chromium as the client, ensuring the--ozone-platform=waylandflag is used. - Creates
greetdconfiguration (/etc/greetd/config.toml) to useagreetyon VT1, perform autologin for thesignageuser, and set the session command to/usr/bin/weston. - Modifies
/etc/inittabto start/usr/sbin/greetdon tty1 instead of the default getty/login prompt. - Attempts to add
pam_elogind.soto the PAM configuration (/etc/pam.d/greetdor/etc/pam.d/system-auth) to ensureelogindhandles session setup correctly (including$XDG_RUNTIME_DIR).
IMPORTANT: nomodeset Boot Parameter
Weston requires Kernel Mode Setting (KMS) graphics drivers to function with its primary (drm) backend. The kernel parameter nomodeset disables KMS drivers.
If the setup script warned you about nomodeset being present, the graphical kiosk WILL NOT WORK.
You MUST remove nomodeset from your kernel boot arguments. Edit your bootloader configuration file:
- Syslinux/Extlinux: Edit
/boot/extlinux.conf. Find the line(s) starting withAPPENDand delete the wordnomodeset. - GRUB: Edit
/etc/default/grub. Find the line(s) starting withGRUB_CMDLINE_LINUX_DEFAULT=andGRUB_CMDLINE_LINUX=and delete the wordnomodesetfrom within the quotes. After saving, runupdate-grub.
Reboot after modifying the bootloader configuration.
Troubleshooting
If the kiosk doesn't start correctly after rebooting:
- Switch TTY: Press
Alt+F2(orF3,F4, etc.) to get to another virtual console login prompt. - Login as Root: Use the root username and password.
- Check Logs & Status:
- Greetd:
cat /var/log/messages | grep greetd(Look for errors starting or running greetd) - Weston:
cat /home/signage/.local/share/weston/weston.log(Look for DRM errors, GL errors, client launch errors) - XDG Runtime Dir:
ls -ld /run/user/$(id -u signage)(Should exist, owned bysignage, permissionsdrwx------) - Services:
rc-service elogind status && rc-service dbus status(Both should be started) - inittab:
grep ^tty1 /etc/inittab(Should show/usr/sbin/greetd) - Kernel Messages:
dmesg | tail -n 50(Look for graphics/DRM driver errors, especially if you suspectnomodesetissues) - Greetd Config:
cat /etc/greetd/config.toml(Verify syntax, command path, user) - Weston Config:
cat /home/signage/.config/weston.ini(Verify syntax, client path, Chromium flags)
- Greetd: