Le Serveur Panda utilise le matériel suivant :
Avant d'exécuter le script d'installation, activez l'autologin en mode console :
sudo raspi-config
Sélectionnez : System Options > Boot / Auto Login > Console Autologin.
gx-ini.sh
:nano gx-ini.sh
chmod +x gx-ini.sh
sudo ./gx-ini.sh
#!/bin/bash
#!/bin/bash
# Installation complète du Kiosk Chromium + serveur Node.js "panda" + boot silencieux
# Pour Raspberry Pi OS Lite Bookworm (avec /boot/firmware)
USER=kb
HOME_DIR="/home/$USER"
SERVER_DIR="$HOME_DIR/server/panda"
PUBLIC_DIR="$SERVER_DIR/public"
URL="http://localhost:3000"
echo "####################################################"
echo "AUTO CONFIG GX-CODE -> Mise à jour du système..."
echo "####################################################"
apt update && apt upgrade -y
echo "📦 Installation de l’environnement graphique, Chromium, Node.js et PM2..."
apt install --no-install-recommends -y \
xserver-xorg x11-xserver-utils xinit openbox chromium-browser curl unclutter
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
apt install -y nodejs
npm install -g pm2
echo "📁 Création du projet Node.js Express..."
mkdir -p "$PUBLIC_DIR"
chown -R "$USER:$USER" "$HOME_DIR/server"
sudo -u "$USER" bash < panda.js < {
console.log('🐼 Serveur panda en ligne sur http://localhost:' + PORT);
});
JS
# HTML d'accueil avec fond noir + bouton refresh
cat > public/index.html <
Panda Server
🐼 Bienvenue sur Panda
HTML
# Lancement serveur avec PM2
pm2 start panda.js --name panda --watch
pm2 save
# Auto-start PM2
STARTUP_CMD=\$(pm2 startup systemd -u $USER --hp $HOME_DIR | grep sudo)
eval \$STARTUP_CMD
EOF
echo "🖼 .xinitrc : Chromium fullscreen sans écran blanc..."
cat > "$HOME_DIR/.xinitrc" <> "$HOME_DIR/.bash_profile" <<'EOF'
if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
startx
fi
EOF
echo "🔒 Droits utilisateur $USER..."
chown "$USER:$USER" "$HOME_DIR/.xinitrc" "$HOME_DIR/.bash_profile"
echo "👥 Groupes video/tty..."
usermod -aG video,tty "$USER"
echo "🛠 Service systemd kiosk..."
cat > /etc/systemd/system/chromium-kiosk.service <