#!/usr/bin/env bash # {{ ansible_managed }} # # Run the native front-end on the kiosk's X display. The web UI stays where it is; # both talk to the same backend, so they can be compared on the same screen. # # musikdelfin the display, as the kiosk uses it # SLINT_BACKEND=winit-software musikdelfin no GPU, for comparison # SLINT_FULLSCREEN=0 musikdelfin a normal window, beside the browser # SLINT_DEBUG_PERFORMANCE=overlay,refresh_lazy musikdelfin frame timings on screen set -eu # The kiosk's X session belongs to {{ pi_slint_frontend_x_user }}, and its cookie is # the only way onto that display - without it the connection is refused before winit # gets far enough to report anything more useful than "could not initialize backend". export DISPLAY="${DISPLAY:-:0}" export XAUTHORITY="${XAUTHORITY:-{{ pi_slint_frontend_x_home }}/.Xauthority}" # Nunito is the face the design is drawn in; without it Slint falls back to whatever # fontconfig hands back, which changes how this looks but not whether it runs. for candidate in \ /usr/share/fonts/truetype/nunito/Nunito[wght].ttf \ /usr/share/fonts/truetype/nunito/Nunito-Regular.ttf \ {{ pi_slint_frontend_root }}/fonts/Nunito.ttf do if [ -f "$candidate" ]; then export SLINT_DEFAULT_FONT="$candidate" break fi done {% if pi_slint_frontend_fullscreen %} export SLINT_FULLSCREEN="${SLINT_FULLSCREEN:-1}" {% endif %} {% if pi_slint_frontend_debug_performance %} export SLINT_DEBUG_PERFORMANCE="${SLINT_DEBUG_PERFORMANCE:-{{ pi_slint_frontend_debug_performance }}}" {% endif %} exec {{ pi_slint_frontend_root }}/target/release/musicmouse-slint \ --server {{ pi_slint_frontend_server }} "$@"