Saturday 6 February 2016

Static IP & Remote Desktop for Raspberry pi

I recently Got Raspberry Pi2 From Crazypi. The Biggest Hurdle I Faced with it is Setting a Static IP via Ethernet and Starting up the Remote Desktop.
So I assume That you have a Monitor For Pi.
Get the Raspbian Jesse Image or Noobs from https://www.raspberrypi.org/downloads/
and Load the OS into the SD card.

Connect the HDMI/Composite cable to the Monitor and Switch On the Monitor.
Connect Keyboard and Mouse to the USB of pi.

Connect the Power supply to the Pi and Switch on the Pi. So you see the RED light is On and Green Light is Flashing.

and you get pi desktop like this(I used the raspbean Jesse Disc Image)

Go to the Menu --> Accesories --> Terminal

Type the following Command

sudo ifconfig

and you get
Under eth0 you get the Following
inet addr : XXX.XXX. X .  X  Ip address of your PI
Bcast
and Mask

note Down those values


and then type following in command window

netstat -nr

you get

Note down the gateway Value


By default the Dynamic IP addressing is Set. So we need to change it into the Static

So go to the Terminal And type

sudo nano /etc/network/interfaces

replace line
 iface etho inet manual 

with


change the Values as shown above and cross check them with noted values

and hit control-X and save it then Reboot it using

sudo reboot

once again check the

ifconfig

if the IP Address is Not changes

go to the terminal and type

sudo nano /etc/network/interfaces

and  insert following
then reboot again.. you shoud get static ip..

for Remote Monitor

goto the terminal and type the following

sudo apt-get install xrdp

and install the xrdp package.

and reboot your pi.

then Go to your Windows PC/Laptop.
open Command prompt  and enter
      mstsc
or On Search enter Remote Desktop Desktop Connection
you get

and enter your IP in computer
hit connect

Enter your Username and Password.
and You Get the Pi desktop like this.
If you are facing any problem in this Procedure Leave a Comment or

No comments:

Post a Comment