FR:RPi Beginners

From eLinux.org
Revision as of 14:43, 4 June 2013 by Xavier (talk | contribs) (Word Processing/Internet Browsing etc)
Jump to: navigation, search


RaspPi.png Retour vers le Hub


Bien démarrer :

Guide d'achat - conseils pour acheter un Raspberry Pi.

Préparation carte SD - informations sur comment préparer la carte SD utilisée pour amorcer votre Raspberry Pi.

Configuration de base - aide pour l'achat/choix d'autre matériel et leurs configurations.

Guide de départ - c'est prêt et ça fonctionne, que faire maintenant ?

Configuration avancée - plus d'informations sur la configuration.

Dépannage - points à vérifier si les choses ne fonctionnent pas comme prévu.

Restructuration en cours, nous vous prions de nous excuser pour les désagréments.

Par où commencer ?

Une très bonne question, mais sans réponse facile !

  1. Si vous voulez des informations sur les cartes SD et leur configuration, voir ici
  2. Si vous désirez acheter un RPi, alors voir le Guide d'achat.
  3. Si vous désirez connaître l'équipement de base requis et comment brancher le tout, voir la page sur la configuration matérielle de base.
  4. Si vous avez besoin de programmer une carte SD, voir la section Préinstaller votre carte.
  5. Si vous avez des problèmes à faire fonctionner le tout, regardez la section Dépannage.
  6. Si vous avez besoin d'aide avec Debian, essayez le Wiki Debian.
  7. Si votre carte SD est programmée avec la version Wheezy de Debian, vous trouverez quelques conseils sur ce quevous verrez en premier - le menu raspi-config RPi_raspi-config
  8. Un peu d'aide pour les débutants avec une disposition originale sur les installations Wheezy ou Raspbian ici
  9. Si vous n'avez pas de moniteur composite ou HDMI alors, peut-être seriez-vous intéressé par une méthode de connexion en aveugle
  10. Construisez vous-même un serveur web LAMP avec Wheezy.
  11. Connexion VNC pour les débutants intéressés par la télésurveillance VNC sur une installation wheezy (débutants qui se connectent en aveugle)
  12. Si vous avez déjà fait tout ça, et que vous attendez la suite...bienvenue et poursuivez votre lecture !


References needed (idea for new section Living Without RPi, which can guide users or link to info to users who haven't got RPis)
     Link to emulation builds or live linux cds setup for beginners (RacyPy2 for example)

If you don't have a Raspberry Pi yet, you can still try things out, see Windows RPi Emulator for details.

Qu'est-ce-que Linux et pourquoi ne pas utiliser Windows ?

Linux est un système d'exploitation tout comme Windows, cependant, au contraire de Windows (qui a besoin d'un ensemble de matériel requis pour fonctionner, par exemple : ceci convient sinon achetez autre chose), Linux est disponible sous plusieurs variantes et configurations ce qui signifie que vous pouvez habituellement trouver une version (ou distribution) qui convient à votre matériel, petit ou gros, rapide ou lent.

Le Raspberry Pi n'est pas conçu pour fonctionner sous Windows en raison de son matériel limité, mais de nombreuses distributions Linux conviennent à merveille. De plus, presque toutes les distributions Linux sont gratuites, alors que Windows coute plusieurs fois le prix du Raspberry Pi lui-même.

Il est d'ailleurs probable que vous possédiez déjà chez vous des équipements sous Linux sans que vous le sachiez, car Linux est très souvent utilisé dans les liseuses d'ebook Kindle, télévisions modernes, décodeurs vidéo et box internet pour s'assurer que l'enregistrement de Inbetweeners ou Prison Break se passe bien !

Plus plus d'informations sur Linux, voir Wikipedia

Voir aussi la FAQ de l'utilisateur final Et Exécuter XXX sur le RPi

Configuration Debian RPi de base

Lorsque vous allumerez votre Raspberry Pi avec une image Debian toute neuve sur votre carte SD, vous aurez probablement envie de modifier quelques paramètres du système.

Utilisateur et mot de passe par défaut

Voir la colonne Username:Password du tableau des distributions pour accéder à votre Pi.

Paramètres régionaux

En configurant les paramètres régionaux, vous pouvez changer les options de langue et de pays (e.g. pour obtenir l'ordre correct des dates) pour la plupart des logiciels disponibles pour le RPi. Par défaut, le RPi est configuré sur English/Great Britain ("en_GB").

Vous pouvez modifier cela avec

   sudo dpkg-reconfigure locales

Vous obtiendrez une très longue liste des paramètres possibles. Vous pouvez activer/désactiver un choix en pressant la barre espace (pas Entrée), et faire défiler la liste avec les touches fléchées ou PageHaut/PageBas.

Choisir "All locales" générera toutes les valeurs possibles, nécessitant beaucoup de temps et d'espace. Ne sélectionnez que celles que vous utiliserez.

Il est très fortement recommandé de s'en tenir uniquement à des caractères UTF-8, et de laisser en_GB.UTF-8 sélectionné, en plus des éventuels autres paramètres que vous avez choisis.

Si vous n'êtes pas sûr du choix à faire, recherchez un code de langue à deux lettres et un code de pays à deux lettres sur Wikipédia, et voyez si vous pouvez trouver quelque chose qui correspond à votre zone géographique.

Lorsque vous aurez terminé, appuyez sur Entrée. On vous demandera de choisir une valeur par défaut.

Disposition du clavier

Si les caractères apparaissant à l'écran ne sont pas ceux que vous avez tapé, il faut modifier la disposition du clavier. Avec Debian, dans un terminal tapez la commande :

sudo dpkg-reconfigure keyboard-configuration

Suivez les instructions.

Ou : Tapez sur la ligne de commande :

sudo nano /etc/default/keyboard

Puis trouvez la ligne suivante

XKBLAYOUT="gb"

et changez le gb pour le code à deux lettres de votre pays. [1]

Voir aussi le Guide de dépannage pour plus d'informations sur la disposition des touches du clavier.

Vous aurez peut-être besoin de redémarrer pour que la modification prenne effet.

Si la prise en compte de la disposition du clavier prend un temps exagéré au démarrage, tapez une fois pour toutes la commande suivante après vous être connecté :

sudo setupcon

Si la configuration du clavier choisi n'est pas appliquée en mode console (autrement dit quand vous n'êtes pas sous X), essayez :

sudo apt-get install console-data

Fuseaux horaires

À moins de vivre en Grande-Bretagne, vous allez devoir modifier le fuseau horaire par défaut :

   sudo dpkg-reconfigure tzdata

Choisissez une zone géographique - Europe, Amérique ou autre. Etc permet d'utiliser des zones compatibles UNIX telles que CUT, GMT, UTC

Sélectionnez un ville

Suivez les instructions pour finaliser la configuration. La modification devrait être immédiate.

Création d'un nouvel utilisateur doté du privilège sudo

REMARQUE : Soyez prudent avec visudo ! Si nous n'utilisez pas le bon format, plus aucun utilisateur ne pourra utiliser sudo !

Si vous rendez le fichier /etc/sudoers inutilisable, reportez-vous à la section "Réparation du fichier /etc/sudoers" pour le restaurer

Vous pouvez créer un nouveau compte utilisateur pour vous-même.

Tapez la commande suivante dans un terminal pour créer un nouvel utilisateur (l'utilisateur jean par exemple) :

sudo adduser jean

Suivez les instructions.

Pour permettre à l'utilisateur nouvellement créé d'utiliser la commande "sudo", tapez :

sudo visudo

Sous la ligne "root ALL=(ALL) ALL", ajoutez :

jean ALL=(ALL) ALL

Appuyez maintenant sur CTRL+O, X pour enregistrer et quitter l'éditeur.

Sinon, au lieu d'ajouter l'utilisateur à la liste des utilisateurs de sudo, vous pouvez l'ajouter au groupe sudo avec la commande suivante :

adduser jean sudo

Repair /etc/sudoers file

sudo: parse error in /etc/sudoers near line 29
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

If you have edited your sudoers file and get the message above, do not worry - it is easy to recover

pkexec bash

You will be prompted for the pi password. The initial password for pi is "raspberry"

You will now be connected as root user. Use "visudo" to repair the configuration file

Debian Wheezy, utilisation de raspi-config

Debian Wheezy dispose d'un menu permettant d'effectuer certaines des actions citées plus haut et d'autres encore. Voir raspi-config

Introduction à l'interface en ligne de commande (CLI)

Pour administrer votre RPi, vous aurez forcément besoin d'utiliser l'interface en ligne de commande à un moment ou à un autre. Il s'agit d'un moyen très puissant pour interagir avec le Raspberry Pi et il est avantageux d'apprendre quelques commandes de base pour débuter avec.

Pour un guide d'introduction à quelques commandes de base, veuillez consulter : Command Line Interface "Must Have" Commands. Accessible depuis la page d'accueil Raspberry Pi, se trouve un lien vers le site "learning the shell"

Votre carte SD peut démarrer en mode graphique, si ce n'est pas le cas et que vous vous retrouvez avec l'interface texte mais que vous souhaitez utiliser un environnement graphique à la place, lancez :

   startx

Accès à distance

Votre installation par défaut fait sans doute tourner un "daemon" ssh (shell sécurisé). Cela signifie que vous pouvez tout exécuter sur votre Rpi avec seulement un câble réseau branché. À condition de connaître son adresse IP. Avec le bon logiciel installé sur votre ordinateur personnel, PC Linux, Mac ou Windows, vous aurez également accès à une interface graphique à distance.

Avant votre premier accès distant, il est conseillé de regénérer une paire de clés publique/privée unique avec la commande suivante

 rm /etc/ssh/ssh_host_* && dpkg-reconfigure openssh-server

De plus amples informations sur l'accès à distance (dont l'affichage graphique distant) sont disponibles sur RPi Remote Access

Installing and updating software to your Raspberry Pi

You will probably want to add software to your Raspberry Pi, as well as keep the current packages up to date. With Raspbian this is performed using apt-get. The most common commands can be found in the adding software page. It is good practice to regularly ensure you run the update and upgrade commands detailed in the guide to ensure you have the most up to date software packages.

The apt-get package for Raspbian will also keep the GPU firmware updated to the latest stable release. If you'd like to try the bleeding edge releases you can read more on the RPi Software.

Adding USB Storage to Your Raspberry Pi

Sooner or later, you're going to run out of room on the SD card used to boot up your Raspberry Pi. For a tutorial on how to connect USB flash drives and hard drives to your Pi to expand storage, see: Adding USB Drives to a Raspberry Pi

Beginner Projects

Here are a few things you can try out with your Raspberry Pi, in most cases all you'll need is your SD Card loaded with a particular preconfigured OS Distribution.

It will be worth getting a few spare SD Cards if you think you will switch between setups regularly or become familiar with how to back up and restore your card.

Reference needed - a good guide on how to backup and restore cards or software to do this easily

Backup your SD card

For Windows users the 'Raw HDD Copy Tool' from HDD Guru works well to backup and restore your SD card between projects. This can backup and restore the entire card sector by sector to/from an img file, and doesn't care which file system is on the card.

Raw HDD Copy Tool

Linux and Mac OS(X) users can use the dd tool that comes with most versions of Linux (including Raspbian) to save the contents of an SD card as an image file. Warning: be sure to use this tool carefully as accidentally choosing your hard drive as the output will destroy all data on it.

Mac OSX users can use PiCloner. The PiCloner app is easy to use and will help you detect your SD card, back it up to an img file and is able to compress the img using GZIP to decrease backup size. PiCloner is Free Open Source Software (FOSS) released under a BSD License so it's Free as in; Free Beer!

Media Player

With this configuration you will typically have the Raspberry Pi connected to a TV or large monitor and a source of videos/music/photos etc you wish to play (i.e. Internet/hard-drive/local network etc).

DesignSpark have written an article on this, which is worth a look, DesignSpark - Raspberry Pi goes to the movies

You can download an installer from www.raspbmc.com which will install to your desktop (IOS, Windows, Linux) and write the latest install to your SD card. You then boot your Pi with the card and go through the config steps.

There is a breif video basic tutorial here: http://www.instructables.com/id/RaspberryPi-Media-center-XMBC/

Reference needed - More information is needed on specific configuration choices for raspbmc, although raspbmc.com does have a wiki.

Play Games

While there are not any commercial games for the Raspberry Pi (yet) there are plenty ways to play games on it.

Many distributions will have games built into them, and some may well support emulation of other platforms so you can run those games.

Also, a lot of Raspberry Pi users will be writing simple games which will be available for others to enjoy (and if desired added to or modified).

Reference needed - game section is empty at the moment!

See the Games Section for more details


Introducing Young Children To Computers

Reference needed - some kid friendly and fun stuff!


Teaching

There is a huge number of groups, links and resources available within the Education section.

Reference needed - links to the learning pages, education links and school/university groups


Learn To Program

There is a huge selection of programming languages which you can use to write interesting programs, games, applications and utilities. There are also more great links within the Education section.

There is a huge selection to choose from (not just Python...) which should suit any ability and a range of purposes.

If you are new to programming, there are plenty of tutorials for getting started in the Tutorials Section.

Books about programming can be found in the Books Section.

In the latest Debian, Python (+Pygame) and MIT Scratch are pre-installed.

Reference needed - links to the learning pages, recommended books?

Interface With Hardware

  1. Interfacing with Arduino
Reference needed - links to basic circuits tutorials and expansion boards

Traitement de texte/Navigation Internet etc

Oui, le Raspberry Pi peut faire la majorité des choses ennuyeuses que peuvent faire aussi les autres ordinateurs.

Debian est fourni actuellement avec Midori pour la navigation web et des logiciels de traitement de texte peuvent être installés facilement.

  • Entrer "sudo apt-get install chromium-browser" dans un terminal installera Chromium qui est globalement un navigateur plus rapide et plus fonctionnel que Midori
  • Entrer "sudo apt-get install openoffice.org" dans un terminal installera OpenOffice.org, une suite logicielle libre du genre Microsoft Office
  • Entrer "sudo apt-get install abiword-common" dans un terminal installera AbiWord, un traitement de texte poids plume mais néanmoins totalement fonctionnel
  • Entrer "sudo apt-get install gnumeric" dans un terminal installera Gnumeric, un tableur poids plume mais néanmoins totalement fonctionnel
 Plus d'informations requises

Your Own Pet Project!

The sky is the limit really, with some time and effort any number of projects can be achieved.

Even if you don't have the skill to do it yourself, you can join like minded people by getting involved with one of the numerous groups in the Community Section, also within the Education pages or learn what you need in from the Guides & Tutorials sections.

Of course, if you do anything interesting then please let us know in the Projects section.

Living Without RPi

Even if you do not have any Raspberry Pi hardware there are a number things you can do to learn about linux, programming or even controlling hardware.

Using Linux

You can install a version of Linux on most computers, and many you will be able to "try out" Linux by using a "Live CD" - this will start your computer up running from a CD or DVD and run Linux (without installing anything to the computer itself).

RacyPy - This is a simple LiveCD of Puppy Linux which includes some basic programming languages and a light-weight graphical user interface (GUI).

You can get it from here:

teampython RacyPy

Trying Programming

Many of the programming languages you can use on the Raspberry Pi can be installed on a Windows or Mac machine. Just visit the websites of the languages you are interested in and see if they have an installer for your operating system.

Controlling Hardware

As discussed in the Easy GPIO Hardware & Software tutorials, there are lots of alternative hardware you can use to experiment with (some as little as $5).

About This Page - For Contributors

The intention of this page is to provide a starting point for beginners and to direct them to the kind of information a person would need in order to start doing something useful or interesting with a Raspberry Pi.

It is not intended to contain or replicate much of the information already available on-line or elsewhere in the wiki, however please create new wiki pages and link them here if there is information beginners will find useful (similarly any section which grows too much here, should be separated into new pages as and when needed)!

At the moment building up ideas of content of typical things beginners will want to know and the kind of things they will want to do first.


Références