Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
projets:biohacklab:borne_arcade [2026/03/20 19:57]
emoc [mars 2026]
projets:biohacklab:borne_arcade [2026/03/20 19:57] (Version actuelle)
emoc [mars 2026]
Ligne 256: Ligne 256:
   xdotool search --onlyvisible --class chromium windowactivate --sync %1 key F5 windowactivate $(xdotool getactivewindow)   xdotool search --onlyvisible --class chromium windowactivate --sync %1 key F5 windowactivate $(xdotool getactivewindow)
 Ça fonctionne **si** la page a déjà été correctement chargée mais comme ce n'est pas le cas, ce n'est toujours pas la solution ... Ça fonctionne **si** la page a déjà été correctement chargée mais comme ce n'est pas le cas, ce n'est toujours pas la solution ...
 +
 +Pour la suite 
 +<​code>​
 +#!/bin/bash
 +
 +# X plutôt que Wayalnd doit être activé (via raspi-config)
 +cd /​home/​xor/​borne_biohacklab_ui_v5/​
 +/​usr/​bin/​python -m http.server &
 +unclutter -idle 1 &  # ne fonctionne qu'​avec X pas wayland
 +sleep 8
 +#chromium --start-fullscreen --start-maximized --noerrdialogs --disable-infobars --kiosk http://​localhost:​8000
 +chromium --kiosk --noerrdialogs --disable-session-crashed-bubble --disable-infobars http://​localhost:​8000/​index.html &
 +#​chromium-browser --kiosk "​http://​localhost:​8000/​index.html"​ --noerrdialogs --disable-session-crashed-bubble --disable-infobars --remote-debugging-port=9222 --remote-allow-origins=http://​localhost:​9222 &
 +#​chromium-browser --kiosk --noerrdialogs --disable-session-crashed-bubble --disable-infobars &
 +#sleep 15
 +#/​home/​xor/​.config/​labwc/​chromium_reload_first_tab.py
 +sleep 15
 +xdotool search --onlyvisible --class chromium key F5 # ne fonctionne pas avec wayland!
 +#wtype -M ctrl r -m ctrl
 +#firefox --kiosk "​http://​localhost:​8000/​index.html"​
 +
 +
 +xdotool search --onlyvisible --class chromium windowactivate --sync %1 key F5 windowactivate $(xdotool getactivewindow)
 +
 +
 +Petite fonction pour vérifier que la page recharge bien
 +
 +function changeBackground(color) {
 +   ​document.body.style.background = '#'​+(Math.random()*0xFFFFFF<<​0).toString(16);​
 +}
 +window.addEventListener("​load",​function() { changeBackground('​red'​) });
 +
 +
 +</​code>​
  • projets/biohacklab/borne_arcade.txt
  • Dernière modification: 2026/03/20 19:57
  • par emoc