Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
|
projets:biohacklab:borne_arcade [2026/03/20 18:48] emoc [mars 2026] |
projets:biohacklab:borne_arcade [2026/03/26 22:34] (Version actuelle) emoc [mars 2026] |
||
|---|---|---|---|
| Ligne 250: | Ligne 250: | ||
| Passage en mode écriture \\ | Passage en mode écriture \\ | ||
| - | On peut choisir entre X et Wayland (via raspi-config / advanced options) | + | On peut choisir entre X et Wayland (via raspi-config / advanced options / Wayland) : je choisis openbox + Xorg \\ |
| + | Infos sur X.org : https://doc.ubuntu-fr.org/xorg \\ | ||
| + | Ce qui rend possible l'utilisation de xdotool, nouveau test réalisé après modification du fichier autostart \\ | ||
| + | On peut recharger la page avec | ||
| + | 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 ... | ||
| + | |||
| + | utilisation de xdotool : https://unix.stackexchange.com/a/87839 | ||
| + | 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> | ||