Tuesday 23 October 2012

How to Setup Remote Desktop from a Windows Machine to your Raspberry Pi - Step by Step Guide

As I mentioned in the previous post I recently found the need to be able to remote desktop to my Raspberry Pi.  This is a step by step guide on how to set it up.

What does this guide help me do?


It will let you control your Raspberry Pi from another machine.  Meaning that the Raspberry Pi will not need to be connected to a monitor, keyboard or mouse.

Before we get started a few clarifications:

  • This guide is to set up remote desktop from another computer on your home network to your Raspberry Pi. 
  • It does not explain how to connect to your Pi from outside your home network.
  • The instructions are for connecting from a windows machine.

What do I need before I get started?

  1. A Raspberry Pi running the latest Raspbian “wheezy” image (at time of writing 2012-09-18-wheezy-raspbian.zip).  It should work with other Linux versions too, but that is the one I have tested with.
  2. The Raspberry Pi should be connected to your home network and have a internet connection.
  3. A second machine running windows that you want to use connect from which is connected to the same home network.

The Steps


Raspberry Pi Setup


So first we need to install some software on the Raspberry Pi, but don't worry it is very easy!
  1. Start up your Pi to the terminal prompt. 
  2. Type the following command "sudo apt-get install xrdp"
  3. If promoted enter your password (the default is "raspberry")
  4. Type "Y" and press enter.
  5. This is now installing xrdp onto your Pi which is the software we are going to use for the remote desktop connection.  Wait for it to complete.
  6. Restart your Pi.  We are going to check that xrdp is going to start up automatically.
  7. When your Pi has booted to the command prompt look for [ ok ] Starting Remote Desktop Protocol server : xrdp sesman.  This shows you that xrdp is installed and automatically starting up on start up of your Pi
  8. The last step is to make a note of the IP address of your Pi which should also be displayed on the start up screen.  In my case below it is 192.168.1.9.  This is the address of your Pi on your network and what we will use to connect to your Pi from the second machine.

Second Machine Setup


1. Launch Remote Desktop Connection which can be found at Start->All Programs->Accessories->Remote Desktop Connection
2. Type in the IP Address for your Pi which you noted above.

3. Click Connect (you may get a security warning at this stage just click OK if you do.  After all it is your Pi on your network so nothing to worry about security wise).
4. Leave the Module on the default of sesman-Xvnc and enter your username and password for your Pi.  (The default is pi and raspberry if you haven't changed them).

5. Click OK and after a few moments you should be greeted my your Raspberry Pi's desktop!

6.  When you are finished simply log-out from the Pi's desktop.







Monday 1 October 2012

Back To The Pi

Wow! It's October already.  I'm not entirely sure what happened to the summer, but I do know I haven't looked at my Pi in two months...

In starting up again I wanted to look at the reasons why I hadn't done more.  I am still very excited about the project and the device, so it is not lack of interest.   I feel like saying it was a lack of time and although work has been busy these last two months (with a major release now only days away) it's not fair to say I have not had time for other interests.

So what I am putting it down to is location.  I have read the debate that the cost of a Pi is actually significantly more than $35 as you need a number of accessories before it is a usable computer.  The counter to this argument (which I am generally in agreement with) is that many of the extra accessories you will need, people will find they already own.  Very specifically in this area and the most expensive accessory you will need is a display device.  But here is where I am beginning see a flaw in the argument and why I've not played with my Pi more.

I agree that most households (mine included) will have a HMDI enabled display in the home.  The problem I have, is this display is the television sitting in the living room.  Which has a number of intrinsic problems.  Firstly it is on a television stand, so when the Pi is connected to it you have to sit on the floor in front of it, which is not the most comfortable of positions.  Secondly when the Pi is all wired up in the middle of said living room with wires sticking out from it in all directions it doesn't really add to the ambiance of the room.  This meant I was packing it away between uses, which had the knock-on effect of I couldn't just play with it for 15 minutes as it took about that long to get it set up and put away again.  And the last problem of using the television is that it is actually used to watch television on!  So it was not like I could play with the Pi while watching some mindless TV show.

But I am all about solutions to problems and in starting again with my Pi this seems like the biggest one to address.  And my solution?  Remote Desktop.

I got it successively installed last night and can now remote from any of my other machines to the Pi.  This has already paid dividends with me getting further with my GPS project than I had before all from the comfort of my bed.

Look out for a blog post on how to set up Remote Desktop for your Pi coming soon.