There are many working on Pi but not having access to a TV (for output). Even for those who have a TV, it is not easy to always use it as a monitor. Instead it will be very useful if we can convert our laptop as a monitor for the Pi. That way we can start working on Pi like how we work on say an Arduino board.
The following are assumed
- You have already downloaded the latest Raspbian OS on the Pi’s SD card. If not please follow the earlier article to download Raspbian OS. This step also assumes that you have an SD card adapter
- You have PC/Laptop (on which you want to see output)
- You have an ethernet cable
- You have some basic understanding of IP address, network settings etc
- Install Required Software:
- Network Settings:
- In Laptop Open Control Panel -> Network and Internet -> Network and Sharing Center.
- Click on “Local Area Connection” -> Properties
- Double click on “Internet Protocol Version 4 (TCP/IPv4)” and ensure that “Obtain an IP address automatically” and “Obtain DNS server address automatically” are selected
- Setting Pi IP Address:
- With the microSD in Pi power it.
- Connect ethernet cable from PC to Pi
- Open cmd prompt in PC and type ipconfig. See what IP is given in Ethernet/Autoconfig IP4 (Let us assume that the address was xx.yy.aa.bb. For example it was 192.168.77.91)
- Power off the Pi, take microSD out again and using an SD adapter connect it to PC. It will mount as some drive letter.
- Go to the SD card drive. Open file called cmdline.txt and at the end of the line add ip=xx.yy.aa.NN where NN is some new number not same as bb. (For our example it may be 192.168.77.95, the 95 is NN)
- Put microSD back to Pi and power it. (The ethernet cable is already connected between PC and Pi)
- Run XMing in PC (it will launch and go to notification area)
- Open Putty, give the same IP (xx.yy.aa.NN – In our example it was 192.168.77.95)
- In Right hand side, under SSH->X11 and make sure ‘Enable X11 forwarding’ is enabled
- Click Open, Select Yes. give ‘pi’ and ‘raspberry’ for username/password
- type lxsession in putty terminal and press enter
- You should see Desktop in XMing