From d5fd350e88d5949caa650092efb7e85b41c2e3a4 Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Wed, 15 Apr 2026 10:09:09 +0200 Subject: [PATCH] fix(kiosk): Skip X11 config on bare metal in kiosk launcher too Same fix as build-live-usb.sh X11 setup - the kiosk launcher was also creating X11 config files that corrupted on bare metal. - Skip config creation entirely for bare metal (vm_type=none) - Intel/AMD/NVIDIA auto-detection works perfectly without configs - Sanitize gpu_info for VMs (remove special chars) - Only create explicit driver configs for VMs that need them Fixes: "M2G_" parse error in /etc/X11/xorg.conf.d/10-kiosk.conf Co-Authored-By: Claude Opus 4.5 --- image/sbin/secubox-kiosk-launcher | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/image/sbin/secubox-kiosk-launcher b/image/sbin/secubox-kiosk-launcher index b06e5add..c07ea74b 100755 --- a/image/sbin/secubox-kiosk-launcher +++ b/image/sbin/secubox-kiosk-launcher @@ -261,15 +261,30 @@ XWRAP log "No GPU detected → vesa driver (safe mode)" fi - # Clean existing configs + # Clean existing configs that might cause issues rm -f /etc/X11/xorg.conf /etc/X11/xorg.conf.d/*.conf mkdir -p /etc/X11/xorg.conf.d - # Write X11 config with VM-appropriate settings + # BARE METAL: Skip X11 config entirely - auto-detection works best + # Intel/AMD/NVIDIA drivers work perfectly without explicit config + if [[ "$vm_type" == "none" ]]; then + log "Bare metal detected - skipping X11 config (auto-detection is best)" + # Just ensure Xwrapper is configured + cat > /etc/X11/Xwrapper.config <<'XWRAP' +allowed_users=anybody +needs_root_rights=yes +XWRAP + return 0 + fi + + # VMs only: Write X11 config with explicit driver + # Sanitize gpu_info to avoid special chars breaking the config + local gpu_info_safe + gpu_info_safe=$(echo "$gpu_info" | tr -d '<>()[]{}' | head -c 100) cat > /etc/X11/xorg.conf.d/10-kiosk.conf <