On Friday, September 7th, my Raspberry Pi arrived! A $35 hackable Linux box … not a bad deal! I got it from Newark/element14, one of the few place where you can order a Raspberry Pi and not wait for many weeks.
I immediately proceeded to set it up, and after over coming the typical barriers (e.g. my PC’s SD Card reader wouldn’t cooperate), things came together very nicely. Here is how I did it.
What Raspberry Pi software distribution should I use?
Given that my objectives are to do some hardware hacking using the Pi, I quickly concluded that the distribution being offered by Adafruit was for me. Adafruit offers a distribution called Occidentalis. Unlike the typical Raspberry Pi software distributions, it comes equipped with access to SPI, I2C, one wire, and WiFi preconfigured. It also has some things to make overall use easier, such as sshd on start-up and Bonjour (so you can simply do
ssh email@example.com from my PC when I place the Pi on my local network). And it appears that Adafruit will continue to support and enhance the software as things evolve with the Pi.
I followed the instructions given by Adafruit and had no problems. I suggest when you do the first boot up, hook up the Pi with a monitor and keyboard to do the initial configuration. Once that is accomplished, you can leverage the installed Avahi (zeroconf or zero configuration networking) daemon (i.e. Bonjour-like service), as I do below.
How can I access the Raspberry Pi via my PC through my local network?
I have seen this called “running headless”. For me, this is the way to go. The last thing I need is another monitor and keyboard to peck at. Key to this will be getting a terminal emulator and a X terminal running on my PC. I choose Cygwin/X to get this job done. Cygwin/X comes with all the Cygwin utilities, but for me, that is a good thing.
How do you get shh working on the PC?
This proves to be very easy despite the potential complexities. Follow the procedures in “How To Get SSH Command-Line Access to Windows 7 Using Cygwin“.
How do you connect from the PC to the Raspberry Pi?
Fire up Cygwin Terminal on your PC, and at the prompt, enter
You’ll then be asked for the password for the pi login, enter it, and your should be in the Raspberry Pi via terminal emulation. Note that this is all being done without the assistance of a X Server on the PC. Your not running in X Windows … that comes next (Make sure to exit the Pi and return back to the Cygwin Terminal for the next step).
How do you run X Windows on the Raspberry Pi and use the PC as your X Terminal?
If you want to run X Windows on the Raspberry Pi with your PC being the X Server display, you need to provide a Display Name and the start the X Server. This is done within following command in the Cygwin Terminal:
Now you should start an X Terminal (Cygwin/X has a light weight version called mintty). So type in the following into the Cygwin Terminal.
Within the mintty window, log into the Raspberry PI:
ssh -Y firstname.lastname@example.org
An once in the Raspberry Pi, startup the LXDE Desktop Client using the command:
You should now be in the Pi running X Windows! No need for an extra keyboard, mouse, or monitor!
Some fine tuning will be necessary so you don’t have to do the
export DISPLAY=:0.0 every time you login and other things, but that is all that what is needed to get going.