diff --git a/pi-setup.sh b/pi-setup.sh index e3de1f4..66b0787 100644 --- a/pi-setup.sh +++ b/pi-setup.sh @@ -92,10 +92,33 @@ if ! grep -q "startx" ~/.bash_profile 2>/dev/null; then echo '[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && startx -- -nocursor' >> ~/.bash_profile fi -# Configureer automatische login +# Configureer automatische login (VERBETERD) echo "👤 Automatische login configureren..." sudo raspi-config nonint do_boot_behaviour B4 +# Extra: Schakel splash screen uit voor snellere boot +echo "🚀 Boot optimalisaties..." +sudo raspi-config nonint do_boot_splash 1 + +# Extra: Schakel wachtwoord login uit voor console (optioneel) +echo "🔒 Console login optimaliseren..." +sudo raspi-config nonint do_boot_behaviour B2 + +# Schakel lightdm greeter uit (geen login scherm) +echo "🖥️ Login scherm uitschakelen..." +sudo systemctl set-default multi-user.target +sudo systemctl disable lightdm + +# Configureer automatische startx zonder login manager +cat > /tmp/getty-override.conf << 'EOF' +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin USER_PLACEHOLDER --noclear %I $TERM +EOF + +sed "s/USER_PLACEHOLDER/$USER/g" /tmp/getty-override.conf | sudo tee /etc/systemd/system/getty@tty1.service.d/override.conf > /dev/null +sudo mkdir -p /etc/systemd/system/getty@tty1.service.d/ + # Maak systemd service voor Docker echo "🔄 Docker service configureren..." cat > /tmp/adhan-docker.service << 'EOF' @@ -123,11 +146,16 @@ echo "✅ Setup voltooid!" echo "" echo "📋 Volgende stappen:" echo "1. Herstart de Pi: sudo reboot" -echo "2. De Pi start automatisch in kiosk mode" +echo "2. De Pi start automatisch ZONDER login scherm" echo "3. Docker containers starten automatisch" -echo "4. Webpagina opent automatisch op http://localhost:5090" +echo "4. Webpagina opent automatisch fullscreen" echo "" echo "🔧 Handmatige bediening:" echo "- Alt+F4: Sluit browser" echo "- Ctrl+Alt+T: Open terminal" -echo "- sudo systemctl status adhan-docker: Check Docker status" \ No newline at end of file +echo "- sudo systemctl status adhan-docker: Check Docker status" +echo "" +echo "⚠️ BELANGRIJK:" +echo "- Geen login scherm meer na herstart" +echo "- SSH blijft beschikbaar voor remote toegang" +echo "- Voor lokale terminal: Ctrl+Alt+F2" \ No newline at end of file