So we continue with our basic setup for our Raspberry Pi. We need to add ability to connect to Wifi networks and in order to not occupy a screen every time we want to work on our Pi we will also setup a way to have a remote connection on our Pi.
If you are using Raspberry Pi one or two then you will need a Wifi Dongle for this. The one I bought and works out of the box is this one. It’s cheap, works out of the box, but it’s from china. So depending on your location it might take some time to arrive, so chose what you please 🙂
First of let’s setup Wifi settings.
Turn on your Raspberry Pi, open the Terminal and type the following line
sudo nano /etc/network/interfaces
From here we can edit our network settings. Locate the area where it says iface wlan0 inet dhcp
Underneath that line you will need to write the following
Now restart your Pi. When the Pi finishes booting up open up terminal and type
This will show the network information of the currently selected wlan0
Locate where it says inet addr: XXXX.XXXX.XX.XX to verify that we are connected properly to the network, if we have an ip address.
Now let’s move on to remote controlling of our Pi.
There are two ways to do this. Actually there are more, but the all fall in two main categories.
- With a GUI
- Without a GUI
Without a GUI
This is the easiest one. All you have to do is know the IP address of your Pi (which we described a way above). Download Putty on your computer, install and run.
All you have to do now is type the IP address of your Pi where it says Host Name or IP address, ensure that SSH is selected and click open.
This will connect directly to your Pi and you can run any bash/Terminal command you wish from here.
With a GUI
In order to establish this we will need to install a couple of packages on our Raspberry Pi.
Start up your Pi, bring up the Terminal and write the following commands.
sudo apt-get update
sudo apt-get install xrdp
This will install a Remote Desktop Client on your Raspberry Pi. After this is completed restart your Pi.
With the Pi’s IP address in hand search for Remote Desktop Connection on your Windows PC. Run it and type your Pi’s IP address and click connect. It might prompt you to accept some security certificate, click yes.
It will bring up a screen like the following
Here you will simply input your Username and Password for the Raspberry Pi and click OK and you’re done.