Those of you that live in a cave may not know what the Raspberry Pi is…then you might want to google it and discover what this puppy is capable of.
Once you’ve been lucky enough to grab one, you might want to start hacking around, but you might need a few steps of configuration.
First, you need a operating system. Choose one from this page: http://elinux.org/RPi_Distributions .
Then, you will need to raw-write it to an SD card. 4Gb is the minimum, the bigger the better. Write process is described here: http://elinux.org/RPi_Easy_SD_Card_Setup
I found a nifty python script that automates all the image writing process. It’s called RasPiWrite, and you can grab it here: http://exaviorn.com/raspiwrite/
Once this done, plug a keyboard, a HDMI display and a power source and there you go, your Pi is alive!
Now what? The raw OS you’re using only has default parameters and might need a bit of further tweaking.
- Step 1: setting keyboard layout
|
1 |
sudo dpkg-reconfigure keyboard-configuration |
- Step 2: set locales (language and such)
|
1 |
sudo dpkg-reconfigure locales |
- Step 3: setup SSH to enable remote access
|
1 2 |
sudo apt-get install ssh sudo update-rc.d ssh defaults |
- Step 4: start user interface
|
1 |
startx |
- Step 4: setup a static IP
|
1 |
sudo nano /etc/network/interfaces |
|
1 |
iface eth0 inet dhcp |
|
1 |
iface eth0 inet static |
|
1 2 3 4 5 6 7 8 |
#your static IP address 192.168.1.118 gateway 192.168.1.1 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 |
- Step 5: headless Raspi
With the Raspi you cannot use VGA display, but if you don’t have a display you may use SSH and a computer that’s on the same network to “view” Raspi’s video output. Here’s how:
First, connect through SSH to your raspi (or this example, RasPi’s IP will be 192.168.1.99 and computer’s will be 192.168.1.100) :
|
1 |
ssh -X pi@192.168.1.99 |
The “-X” allows X forwarding.
On your computer, launch an X host that will accept connections from your Pi:
|
1 |
xhost +192.168.1.99 |
Then, back to your Pi, export display to your X host:
|
1 |
export DISPLAY=192.168.1.100:0 |
Tada, you’re done! To check that it works, just type
|
1 |
midori |
midori, a lightweight web browser, should appear in your X host!
By these days I’ll add more tips and tricks, stay tuned!
Français
Then find the ling concerning your eth0: it should be something like:
iface eth0 inet dhcp
Change it to static:
iface eth0 inet dhcp
Which bit actually changes?
Woops
Corrected it, thanks for proof-reading!
Pingback: vulussu» Blog Archive » Beginning with a Raspberry Pi: one step further
Pingback: Beginning with a Raspberry Pi: one step further | pense-bête Arduino | Scoop.it
Pingback: Beginning with a Raspberry Pi: one step further...