1/ installation du RPI standard
interface par défaut ligne de commandes,activation du SSH
internationalisation --> FR
modification de la taille de police standart (screen mode)
pi > sudo apt-get update
pi > sudo apt-get upgrade (et c'est long cette étape...)
2/ configuration du réseau wifi (avec dongle compatible)
PI > sudo nano /ect/network/interfacesauto lo eth0
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
auto wlan0
iface wlan0 inet dhcp
wpa-ssid "NOM DU RESEAU WIFI"
wpa-psk "MOT DE PASSE WIFI"
wireless-power off
puis IMPORTANT POUR FREEBOX
http://blog.aube-tech.com/2013/06/se-connecter-au-wifi-en-ligne-de-commande-unix/
soit sudo apt-get install wicd-curses
sudo wicd-curses
P pour préférence
fleche droite dans les reseaux pour sélectionner
puis use static DNS 192.168.0.254
renseigner key
F10 pour enregistrer
C pour connecter
supprimer les messages de lancement du boot
changer console=tty9 en console=tty9 loglevel=3 dans /boot/cmdline.txt (ce qui permet de faire crtl + alt + F9 en cas de bug majeur.
desactiver le powersave avec Setterm
http://www.raspberrypi.org/forums/viewtopic.php?f=29&t=35054You need to edit the following file /etc/kbd/config
then change BLANK_TIME= to BLANK_TIME=0
and POWERDOWN_TIME= to POWERDOWN_TIME=0 then reboot..
/usr/bin/setterm -blank 0 -powerdown off
voir aussi un excellent article sur xset et unclutter
http://www.pobot.org/Configurer-la-Raspberry-Pi-en-mode-kiosk.html
et aussi la version plus complexe avec chromium
http://pikiosk.tumblr.com/post/38721623944/setup-raspberry-ssh-overclock-static-ip
une solution toute prete ?
http://www.alandmoore.com/blog/2011/11/05/creating-a-kiosk-with-linux-and-x11-2011-edition/
3/ Créer le BASH de kiosque avec Javascript
soit avec MIDORI
https://github.com/MobilityLab/TransitScreen/wiki/Raspberry-Pi
Soit avec Chromium
http://blogs.wcode.org/2013/09/howto-boot-your-raspberry-pi-into-a-fullscreen-browser-kiosk/
c'est à dire commencer par installer des packets supp
sudo apt-get update sudo apt-get dist-upgrade sudo apt-get install matchbox chromium x11-xserver-utils ttf-mscorefonts-installer xwit sqlite3 libnss3 sudo reboot
puis editer le fichier /boot/config.txt pour configurer l'affichage automatique
# 1900x1200 at 32bit depth, DMT mode
disable_overscan=1
framebuffer_width=1900
framebuffer_height=1200
framebuffer_depth=32
framebuffer_ignore_alpha=1
hdmi_pixel_encoding=1
hdmi_group=2
Puis ajouter ceci au /etc/rc.local
# Wait for the TV-screen to be turned on...
while ! $( tvservice --dumpedid /tmp/edid | fgrep -qv 'Nothing written!' ); do
bHadToWaitForScreen=true;
printf "===> Screen is not connected, off or in an unknown mode, waiting for it to become available...\n"
sleep 10;
done;
printf "===> Screen is on, extracting preferred mode...\n"
_DEPTH=32;
eval $( edidparser /tmp/edid | fgrep 'preferred mode' | tail -1 | sed -Ene 's/^.+(DMT|CEA) \(([0-9]+)\) ([0-9]+)x([0-9]+)[pi]? @.+/_GROUP=\1;_MODE=\2;_XRES=\3;_YRES=\4;/p' );
printf "===> Resetting screen to preferred mode: %s-%d (%dx%dx%d)...\n" $_GROUP $_MODE $_XRES $_YRES $_DEPTH
tvservice --explicit="$_GROUP $_MODE"
sleep 1;
printf "===> Resetting frame-buffer to %dx%dx%d...\n" $_XRES $_YRES $_DEPTH
fbset --all --geometry $_XRES $_YRES $_XRES $_YRES $_DEPTH -left 0 -right 0 -upper 0 -lower 0;
sleep 1;
et ceci (toujours dans le rclocal) pour lancer chrome
if [ -f /boot/xinitrc ]; then
ln -fs /boot/xinitrc /home/pi/.xinitrc;
su - pi -c 'startx' &
fi
Enfin, créer le fichier xinitrc dans /boot/
#!/bin/sh
while true; do
# Clean up previously running apps, gracefully at first then harshly
killall -TERM chromium 2>/dev/null;
killall -TERM matchbox-window-manager 2>/dev/null;
sleep 2;
killall -9 chromium 2>/dev/null;
killall -9 matchbox-window-manager 2>/dev/null;
# Clean out existing profile information
rm -rf /home/pi/.cache;
rm -rf /home/pi/.config;
rm -rf /home/pi/.pki;
# Generate the bare minimum to keep Chromium happy!
mkdir -p /home/pi/.config/chromium/Default
sqlite3 /home/pi/.config/chromium/Default/Web\ Data "CREATE TABLE meta(key LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY, value LONGVARCHAR); INSERT INTO meta VALUES('version','46'); CREATE TABLE keywords (foo INTEGER);";
# Disable DPMS / Screen blanking
xset -dpms
xset s off
# Reset the framebuffer's colour-depth
fbset -depth $( cat /sys/module/*fb*/parameters/fbdepth );
# Hide the cursor (move it to the bottom-right, comment out if you want mouse interaction)
xwit -root -warp $( cat /sys/module/*fb*/parameters/fbwidth ) $( cat /sys/module/*fb*/parameters/fbheight )
# Start the window manager (remove "-use_cursor no" if you actually want mouse interaction)
matchbox-window-manager -use_titlebar no -use_cursor no &
# Start the browser (See http://peter.sh/experiments/chromium-command-line-switches/) chromium --disable-translate --app=http://www.actephoto.com/kiosk/?kiosk=$hostname #test avec Midori (un arrangement à ma sauce pour visualiser une page en fonction du hostname du RPI #idHost=$(cat /etc/hostname) #eval midori -e Fullscreen -a http://www.actephoto.com/kiosk/?kiosk="$idHost"
et pour info a propos du kiosque chromium (supprimer la trad auto) :
http://stackoverflow.com/questions/11598988/chrome-extension-to-monitor-a-kiosk-and-reload-if-needed
Puis installer Apache / PHP
http://raspbian-france.fr/installer-serveur-web-raspberry/
vérifier le log : sudo cat /var/log/apache2/error.logsudo cat /var/log/apache2/error.log
ET installer la lib GD
régler le cron pour éteindre l'écran
/opt/vc/bin/tvservice -o
(le rallumer ??? /opt/vc/bin/tvservice -p && fbset "1920x1080")
Peux être voir de ce coté la pour la commande du kiosque
http://blog.donaldderek.com/2013/06/build-your-own-google-tv-using-raspberrypi-nodejs-and-socket-io/
Peux être voir de ce coté la pour la commande du kiosque
http://blog.donaldderek.com/2013/06/build-your-own-google-tv-using-raspberrypi-nodejs-and-socket-io/
UTILISER RSYNC pour synchroniser
http://www.tecmint.com/sync-two-apache-websites-using-rsync/
1/ ne pas utiliser un identifiant multi-ftp sur ovh, cela ne marche pas
2/ tester la connection ssh avec la commande suivante :
ssh login@ssh.cluster001.ovh.net (vous pouvez trouver le cluster dans le résumé hebergement ovh
3/ créer une clef
ssh-keygen -t rsa -b 2048 (ne pas mettre de passphrase pour le cron
reste a envisager l'option delete ainsi que l'utilisation de CRON.
Il est aussi possible de faire de la synchro avec lftp du type :
sudo lftp ftp://identifiant:password@ftp.nomdedomaine.tld -e "mirror -R -e /photos/ /sav/ ; quit"
ce qui permet d'utiliser la fonction de multi utilisateurs d'Ovh.
La création d'un script pour créer un fichier txt de monitoring
#date de mise a jour
echo "<DIV class="date_pi">derniere mise a jour :" > /home/pi/info/info.txt
date "+%H:%M:%S %d-%m-%Y" >> /home/pi/info/info.txt
echo "</DIV></BR>" >> /home/pi/info/info.txt
#temperature
TEMP=`/opt/vc/bin/vcgencmd measure_temp`
echo "<DIV class="temp_pi">temperature :" >> /home/pi/info/info.txt
echo ${TEMP:5:2} >> /home/pi/info/info.txt
echo " °C </DIV></BR>" >> /home/pi/info/info.txt
#ip adress
echo "<DIV class="ip_pi">adresse IP : " >> /home/pi/info/info.txt
IPAD=`ip route show`
echo ${#IPAD[@]}
echo ${IPAD:30} >> /home/pi/info/info.txt
echo "</DIV></BR>" >> /home/pi/info/info.txt
#macadress
echo "<DIV class="mac_pi">macadress :" >> /home/pi/info/info.txt
NA=`sudo cat /sys/class/net/eth0/address`
echo $NA >> /home/pi/info/info.txt
echo "</DIV></BR>" >> /home/pi/info/info.txt
#processus
echo "<DIV class="grep_pi">processus omxplayer en cours :" >> /home/pi/info/info.txt
ps ax | grep omxplayer >> /home/pi/info/info.txt
echo "</DIV></BR>" >> /home/pi/info/info.txt
#renommer le fichier texte en fonction de la macadress
eval sudo mv info.txt $NA.txt
#envoyer le tout par ftp pour monitoring
sudo lftp ftp://identifiant:motdepasse@ftp.plusquedeladetermination.com -e "mirror -R /home/pi/info/ / ; quit"
http://www.tecmint.com/sync-two-apache-websites-using-rsync/
1/ ne pas utiliser un identifiant multi-ftp sur ovh, cela ne marche pas
2/ tester la connection ssh avec la commande suivante :
ssh login@ssh.cluster001.ovh.net (vous pouvez trouver le cluster dans le résumé hebergement ovh
3/ créer une clef
ssh-keygen -t rsa -b 2048 (ne pas mettre de passphrase pour le cron
ssh-copy-id -i /home/pi/.ssh/id_rsa.pub login@ssh.cluster001.ovh.net
vous pouvez vérifer la présence de la clef avec la commande
cat ~/.ssh/authorized_keys (sous ssh)
4/synchroniser avec rsync (mirror est mon répertoire sur mon hébergement, image dans mon rpi
il faut penser a créer les répertoire avant !
rsync -avzhe ssh login@ssh.cluster001.ovh.net:www/mirror/ /var/www/images/
il faut penser a créer les répertoire avant !
rsync -avzhe ssh login@ssh.cluster001.ovh.net:www/mirror/ /var/www/images/
Il est aussi possible de faire de la synchro avec lftp du type :
sudo lftp ftp://identifiant:password@ftp.nomdedomaine.tld -e "mirror -R -e /photos/ /sav/ ; quit"
ce qui permet d'utiliser la fonction de multi utilisateurs d'Ovh.
La création d'un script pour créer un fichier txt de monitoring
#date de mise a jour
echo "<DIV class="date_pi">derniere mise a jour :" > /home/pi/info/info.txt
date "+%H:%M:%S %d-%m-%Y" >> /home/pi/info/info.txt
echo "</DIV></BR>" >> /home/pi/info/info.txt
#temperature
TEMP=`/opt/vc/bin/vcgencmd measure_temp`
echo "<DIV class="temp_pi">temperature :" >> /home/pi/info/info.txt
echo ${TEMP:5:2} >> /home/pi/info/info.txt
echo " °C </DIV></BR>" >> /home/pi/info/info.txt
#ip adress
echo "<DIV class="ip_pi">adresse IP : " >> /home/pi/info/info.txt
IPAD=`ip route show`
echo ${#IPAD[@]}
echo ${IPAD:30} >> /home/pi/info/info.txt
echo "</DIV></BR>" >> /home/pi/info/info.txt
#macadress
echo "<DIV class="mac_pi">macadress :" >> /home/pi/info/info.txt
NA=`sudo cat /sys/class/net/eth0/address`
echo $NA >> /home/pi/info/info.txt
echo "</DIV></BR>" >> /home/pi/info/info.txt
#processus
echo "<DIV class="grep_pi">processus omxplayer en cours :" >> /home/pi/info/info.txt
ps ax | grep omxplayer >> /home/pi/info/info.txt
echo "</DIV></BR>" >> /home/pi/info/info.txt
#renommer le fichier texte en fonction de la macadress
eval sudo mv info.txt $NA.txt
#envoyer le tout par ftp pour monitoring
sudo lftp ftp://identifiant:motdepasse@ftp.plusquedeladetermination.com -e "mirror -R /home/pi/info/ / ; quit"
Bonjour à tous ! sur mon site vous trouverez des codes Free Wifi privé et qui ne ce désactive jamais ou du moin pour longtemps !
RépondreSupprimer︻̷̿┻̿═━一 identifiant free wifi gratuit