First Time Linux

Raspbian

Raspbian (see raspbian.org or wikipedia) is a variety of Debian linux specially made for running on the Raspberry Pi. Hence Raspberry + Debian. It's one of the distributions specifically recommended by the raspberrypi.org downloads page, and currently appears to be the most popular distribution. Note that Debian is the same kind of linux I currently have running on the barebone and on the netbook, so I'm hoping to find some familiar ground here.

Installing

As with OpenELEC, installing Raspbian on the SD card is surprisingly simple. In this case you can download the image from a torrent (see the "wheezy" torrent file on raspberrypi.org's download page), unzip the file to get an .img file, and then use dd to copy this onto the SD card (thereby wiping OpenELEC off it). And that's it, put it in the Pi and boot!

One problem I faced was that I didn't have a keyboard attached, just a mouse. (I now have a Measy RC12 wireless keyboard so this isn't an issue any more). But back then my idea was to connect from the netbook via ssh and thereby use the netbook's keyboard instead. This would work fine if I could start the SSH server on the Raspberry Pi, which I wasn't sure I could do without a keyboard... With OpenELEC I could use the mouse to change the settings, and activate "enable SSH server at startup", but Raspbian doesn't go into a GUI at startup so I wouldn't be able to use a mouse to change the settings... As it turned out this wasn't a problem in the end, because this Raspbian "wheezy" image does automatically start up an SSH server at boot, so I didn't need to do anything special.

Playing

Screenshot of Raspbian

As suspected, there's not a lot you can do without a keyboard. At first boot it wants to run a raspi-config TUI tool to setup the basic settings, but that requires the keyboard. From ssh I was able to run startx to get the basic LXDE GUI up on the tv, and I could control this with the mouse, for example running the Midori browser, but the python games all seem to require keyboard control too so I wasn't able to try out the delights in there such as the squirrels eating squirrels game.

A screenshot of the default Raspbian desktop is shown on the right. It uses LXDE rather than Gnome or Xfce, but it's easy to figure out what's going on. The reason it looks so low-resolution is because of my old tv, I'm using composite analogue output and so the picture is quite awful as a desktop. If you can use the HDMI output then it'll look much more like a "real" linux desktop, as shown in the reduced screenshot below.

Screenshot of Raspbian using HDMI

The default browser Midori worked fine, with automagic internet connection, but I couldn't get the internet radio working which had worked through OpenELEC. Maybe some plugins are missing or something.

Also I can play wav files with the command line tool aplay but this just spits out white noise when you give it an mp3 file. Fortunately there's another command line player called omxplayer which is apparently specially written for the Raspberry pi (it's not in the regular Debian repositories) and that is able to play mp3s and oggs (and movies too, but it appears to have a tendency to crash when playing longer video files). Generally, the basic support for playing media seems extremely lacking in Raspbian compared to OpenELEC.

Midori on its own can't play youtube videos either. With a plugin called "gnash" it can kind of play low-res youtube videos, but it's so stuttery it's unwatchable. The only way I've found to watch youtube videos on Raspbian so far is to quit the LXDE desktop entirely, and use another tool called "yt" (or "whitey") which offers a very spartan (but functional) console-based text interface and then uses omxplayer to play the videos.

Programming

Screenshot of Scratch

One thing I was eager to try out was "Scratch", a fun programming environment based on coloured building blocks (see scratch.mit.edu). As shown in this screenshot on the left, you can start with a little cat icon, and build a program which moves the cat around using loops and clicks - it's an ideal way for kids to play with programming and fits excellently with the educational aspirations for the Raspberry Pi. I only scratched(!) the surface of this, but it's easy to get started.

I was also keen to play with python and especially the RPi.GPIO library for interfacing with the GPIO pins, but as it turned out, both of these were already installed by default so I didn't have to do anything! Via SSH I was easily able to enter an interactive python session (version 2.7) and get playing. Now to connect it up to some LEDs!

Random tip: it's a little tricky to make screenshots without a keyboard. For this, I installed a little tool called scrot (sudo apt-get install scrot) and then from an ssh session I can call it with DISPLAY=:0 scrot filename.png (note that the DISPLAY=:0 is necessary to tell scrot which X display to grab from, because over ssh I haven't got an X display). You can also use the "--delay" parameter to give a number of milliseconds to wait before taking the screenshot.

Another random tip: even if aplay can play a wav file, it doesn't necessarily mean that python can play it using pygame. This is a bit picky about the kind of wav file it likes, and 32-bit wavs (the type created by default by Gnome's Sound Recorder for example) can't be played at all. If you try to call pygame.mixer.init() giving a size of 32 bits per sample, it just throws an exception saying that 32 is invalid. The only way I found of getting round this was to get Sound Recorder to save them as ogg files, and then use oggdec to convert to a 16-bit wav. Or use Audacity to record the sounds, and from there you can specify to save directly as 16-bit wav.

Alternative distros

If Raspbian doesn't suit, there are many other distros to try, although it's a good idea to choose one which lots of people are already using who can help. Some examples include Arch (archlinuxarm.org) probably using Xfce, Bodhi (bodhilinux.com) using Enlightenment, or RaspbianMate (raspbian.org) using Mate, a fork of Gnome2.

On the other hand, once you've got Raspbian installed, there's nothing to stop you installing Mate or Enlightenment on top of Raspbian yourself, rather than starting from fresh.