Raspberry:Astuces : Différence entre versions

De DiouxX's Wiki
Aller à : navigation, rechercher
m (Ajout des sources)
Ligne 33 : Ligne 33 :
 
Sources''
 
Sources''
 
* http://raspberrypi.stackexchange.com/questions/4123/running-a-python-script-at-startup
 
* http://raspberrypi.stackexchange.com/questions/4123/running-a-python-script-at-startup
 +
 +
== Rotation de l'écran ==
 +
 +
Pour changer l'orientation de l'affichage, il faut ajouter au fichier {{ File | /boot/config.txt}} la ligne suivante :
 +
 +
<pre>
 +
display_rotate=x
 +
</pre>
 +
 +
Où x peut prendre les valeurs suivantes :
 +
 +
{| class="wikitable sortable"
 +
|-
 +
! Valeur !! Orientation
 +
|-
 +
| 0 || Normal
 +
|-
 +
| 1 || 90°
 +
|-
 +
| 2 || 180°
 +
|-
 +
| 3 || 270°
 +
|-
 +
| 0x10000 || Horizontal Flip
 +
|-
 +
| 0x20000 || Vertical Flip
 +
|}
 +
 +
''Sources''
 +
* http://elinux.org/RPiconfig
  
 
[[Catégorie:Raspberry]]
 
[[Catégorie:Raspberry]]

Version du 26 novembre 2015 à 14:07

Script au démarrage

Pour lancer un script au démarrage du Raspberry, il faut l'ajouter au fichier {{{1}}}

@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xscreensaver -no-splash
@sh ${HOME}/.config/lxsession/LXDE-pi/autokey.sh
@xset s noblank
@xset s off
@xset -dpms
@/home/pi/script-at-boot.sh

Script python au démarrage

Pour lancer un script python au démarrage, j'ai trouvé l'astuce suivante :

On crée un fichier .desktop dans le dossier /home/pi/.config/autostart/ qui portera le nom de l'application. Dans mon cas, ca sera button-refresh.py . Voici le contenu :

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=button-refresh
Comment=
Exec= sudo python /home/pi/button-refresh.py
StartupNotify=false
Terminal=true
Hidden=false

Sources

Rotation de l'écran

Pour changer l'orientation de l'affichage, il faut ajouter au fichier /boot/config.txt la ligne suivante :

display_rotate=x

Où x peut prendre les valeurs suivantes :

Valeur Orientation
0 Normal
1 90°
2 180°
3 270°
0x10000 Horizontal Flip
0x20000 Vertical Flip

Sources