The Start


Hi, What and Why

Compare to Arduino

What do you need to buy ?

It's plugged in, what's first ?

How to install packages.

Recommended packages.

Essential Linux Commands.

How to use the vi editor.

The next step


Set up I2C.

My first program - blink.

VNC - Use your computer to control your Pi.

Samba - copy files.

Recommended software packages

Raspbian contains the basic packages to get the system up and running; However, new users are likely to need suggestions as to what is available and what is recommended.

Whenever a package is installed, documentation is installed as well. In the terminal, type man <command> to see the linux manual page for usage of the command.

All of these packages are available using the graphical package manager, synaptic. You can install them from synaptic if it's easier; I have used apt-get in the examples below.

A note about sudo bash: you only need to run it once to enter superuser mode. If your prompt is the dollar sign $, then you are logged in as pi, with regular user privileges. If your prompt is the hash sign #, then you are running a superuser shell with superuser (root) privileges.

synaptic - graphical package manager

If you haven't already installed synaptic, then do so now. It allows you to browse all the available packages.

$
$ sudo bash
#
# apt-get install synaptic
#
( note: Once installed, you can either run synaptic manually from the terminal, or from the Menu -> Preferences -> Synaptic package manager. )
 

locate - how to find files

There are fantastic tools to find files on a linux system. As well as the find command, there is the locate command. It requires a periodic check to update the internal list of files (using the updatedb command) and then locate will quickly find any file for you.

$
$ sudo bash
#
# apt-get install locate
#
( note: wait for it to install. )
#
# updatedb
#
( note: give it a minute to create a list of all files. )
#
# locate jpg
#
( note: It will immediately give you a list of all files with jpg in the name. )
 

SSH - remote terminal access

You are likely to want to connect to the pi over your network, from another computer.
ssh is best installed from raspi-config. Note that you want to install the ssh server daemon, the package name is sshd. Raspi-config will do this automatically for you, but not explain.
sshd runs in the background, waiting for you to connect via ssh from another computer.

$
$ sudo bash
#
# raspi-config
#
( note: the option to install ssh is under the 'advanced' menu option of raspi-config )
 

To connect from another computer that is connected to your network: ssh pi@192.168.1.184
(replace 192.168.1.184 with your own Pi's local IP address)
If you want a GUI to connect with, then microsoft uses tools such as putty. Linux uses the command line.

Finding your local IP address

To connect to your pi from another computer, using ssh or ftp or vnc, requires you to know the IP address of your pi.
If you right-click on the wifi icon (right hand side of your menu bar) and click 'status', if will tell you. From the terminal, the command is ifconfig. You don't need to install additional software for this - but it's an important step so I have listed it here.

$
$ ifconfig
 
( note: lots of information will be displayed for each interface. If you're connected via an ethernet cable, then you're using interface eth0. If you're connected via wifi, then you're using interface wlan0. You are expected to read the screen output, and work it out).
 

Thunar file manager

Different people like different file managers. I recommend thunar. It's stable, fast, reliable; I like it. For choices, you can search in synaptic for other file managers.

$
$ sudo bash
#
# apt-get install thunar
#
 

gedit - text file editor

Raspbian comes with the text editor 'leafpad'. I haven't used this before, but I assume it does what's needed. I'm familiar with the editor 'gedit', which also requires a number of other useful dependencies which are also installed. So I install gedit.

$
$ sudo bash
#
# apt-get install gedit
#
 

FTP - an easy way to put files on your pi

You are likely to want to put files on your pi, such as pictures, movies, music. You can use a USB memory stick; I prefer ftp since I don't need to stand up and walk to copy files. There are a number of FTP servers available, I use vsftpd.

$
$ sudo bash
#
# apt-get install vsftpd
#
 

Once installed, you will need to make changes to the vsftpd configuration file. The file is /etc/vsftpd.conf, and yes it needs root privileges to modify it. Once modified, the easiest way to check all is working is to reboot your pi.

Image viewer - geeqie

To view normal jpg files, Raspbian installs an image viewer. Most people will want to install a better image viewer. Although the package eog is good, geeqie is better because it also installs imagemagick as a dependency. imagemagick allows you to alter jpg files; in its most basic form, you can resize pictures.

$
$ sudo bash
#
# apt-get install geeqie
#
 

Once installed, run the file manager thunar. Navigate to a jpg file, and right-click it. There are options under this menu to allow to use geeqie as the default application for all files of type 'jpeg image'.

image-magick - image manipulation

If you installed geeqie, then image-magick will have installed also. If you haven't installed it yet, then do so using apt-get as usual. Running the command 'convert' (with no parameters) will bring up a list of the possible parameters for image maniplulation. Apply a sepia filter, resize, alter quality; there's a lot there.

$
$ convert
( note: the convert command is installed as part of the image-magick package. Running the command with no parameters will bring up a list of all the possibilities. Feel free to explore.)
 

Playing music

mp3 files can be played both from the command line and from GUIs, by installing one of several possibilities. To test the basic functionality, first copy a music file, that you know works elsewhere, to your pi. I copied a file that I renamed p1.mp3

$
$ sudo bash
#
# apt-get install mpg123
#
# exit
$
$ mpg123 p1.mp3
( note: my music file then played; I had to plug the headphones in, it didn't initially send the output over the hdmi cable to my TV. There is an option raspi-config to switch the audio output to the HDMI port.)
 

There are several linux GUI music players available; I recommend nightingale, also look at amarok.

wicd-curses: maintain wifi networks without a GUI

There are times when it is better to see or edit your wifi networks, without using the GUI. You can either edit the underlying text files manually (eg /etc/wpa_supplicant/wpa_supplicant.conf); or, you can use a curses interface.
Several curses programs exist; they're programs that use basic text prompts to manage the system.

$
$ sudo bash
#
# apt-get install wicd-curses
#
 

vlc - media player

To play media files such as .mp4, .avi, I recommend vlc. Installing this package also installs a variety of very useful dependencies.

$
$ sudo bash
#
# apt-get install vlc
#
 

k3b - Media controller

k3b is one of the most useful programs ever created, and happens to install many dependencies that are hugely useful elsewhere, including dvd authoring tools and mp3 decoding tools.

$
$ sudo bash
#
# apt-get install k3b
#
 

spe - simple python editor

Most of the first step tutorials give you a python program to type in, and an LED to connect to the GPIO pins. The objective is to make the LED blink. However, none of the tutorials tell you how to type the program in. spe is a text editor designed for python programs; it highlights appropriate commands, and does some syntax checking.

There are several packages that you can investigate for editing different types of programs. For example, I use bluefish for my web pages (php scripts).

If you install spe, you will get a good idea of how these text editors work, and I would encourage you to look in synaptic for other editors. Installing several editors will not harm you, and you should find the perfect editor for you. I've chosen spe simply because it seemed like a good place to start.

$
$ sudo bash
#
# apt-get install spe
#
 

libreoffice - word processor, spreadsheet, etc

The free equivalent of Microsoft Office; it amazes me that people think they need to pay microsoft to write a letter or create a presentation or a spreadsheet. Install libreoffice, it does the same thing. Yes, it reads and writes all existing microsoft files as well.

$
$ sudo bash
#
# apt-get install libreoffice
#
 

gphoto2

The gphoto2 libraries are possibly already installed, but the gphoto2 package itself provides command-line access to USB cameras; both webcams and digital cameras.

$
$ sudo bash
#
# apt-get install gphoto2
#
# exit
$
$ gphoto2 --auto-detect
 

cheese, luvcview, fswebcam

When you plug in a USB webcam, the first thing you need to check is that your pi has recognized it and can use it. cheese is the perfect application for this job, plus it also installs a very useful number of dependencies.

cheese may not work on the pi, for this reason: The Raspberry Pi firmware currently only supports OpenGL ES , not regular OpenGL. Ergo GLX does not work , and lots of apps rely on that. however, the dependencies that are installed will still be useful.

A number of other webcam programs also exist; luvcview works with uvc and my old logitech webcam works with fswebcam. I recommend you install a few to see which one works best with your webcam.

motion is a package that monitors a webcam stream to detect movement. (ie when part of the image changes).

$
$ sudo bash
#
# apt-get install cheese
#
# apt-get install luvcview
#
# apt-get install fswebcam
# exit
$
 

gimp - image editor

Despite a poor name, the graphics image manipulation program is an excellent photoshop alternative.

$
$ sudo bash
#
# apt-get install gimp
#
# exit
$
 

moc - terminal music player

I found moc in the getting started guide. It gives you a text-based screen (ie it runs in a terminal, without the GUI) that sllows you to navigate your music files and play music.

$
$ sudo bash
#
# apt-get install moc
#
# exit
$