There is a nice little trick which allows you to use your laptop or desktop’s display and keyboard as the display and keyboard for your Pi. all you need is a network cable.
with this fix you can cut right down on the kit you need to carry around if you’re bringing your Pi somewhere to show off your latest project.
You will need:-
- Putty (only windows)
- Notepad++ (only windows)
- Google Chrom web browser VNC® Viewer for Google Chrome™
- Winscp (only windows)
Step 1 – Find the Laptop’s Network Settings (Windows) & set Obtain IP & DNS Automatically.
Step 1 – Find the Laptop’s Network Settings (Mac)
Step 2 – Setting the Raspberry Pi’s IP address
- Ensure the Raspberry Pi is powered off, and remove the SD-Card.
- Insert the SD-Card into a card reader and plug it into your laptop.
- Find the drive and you should find several files on the Card (note it a lot smaller than you’d expect since it is only the boot section of the Card (the rest is hidden)).
- Make a copy of cmdline.txt and rename it cmdline.normal
- Edit cmdline.txt and add the IP address at the end (be sure you don’t add any extra lines).
- For network settings where the IP address is obtained automatically, use an address in the range 169.254.X.X (169.254.0.0 – 169.254.255.255): ip=169.254.0.2
- For network settings where the IP address is fixed, use an address which matches the laptop/computers address except the last digit. ip=192.168.0.2
- Ensure you take note of this IP address
- Make new copy of cmdline.txt and rename it cmdline.direct
- To swap between configurations, just replace cmdline.txt with either cmdline.normal or cmdline.direct
- Return the card to the Raspberry Pi. Attach the network cable attached to both the computer and Raspberry Pi and power up.
Thanks a lot Meltwater for sharing it.
ENABLE SSH ON A HEADLESS RASPBERRY PI
For headless setup, SSH can be enabled by placing a file named
ssh, without any extension, onto the boot partition of the SD card. When the Pi boots, it looks for the
ssh file. If it is found, SSH is enabled, and the file is deleted. The content of the file does not matter: it could contain text, or nothing at all.
iRaspberry Pi – iraspberrypi.co.in