We all know it is very irritating to work on raspberry pi standalone coz you need a keyboard, a mouse and a monitor to connect. But you can get rid of all these by getting a display on your host machine like your desktop or laptop.
The following steps help you to display the desktop of the Raspberry Pi on the host machine, like a Windows laptop.
1. Download http://sourceforge.net/projects/xming/ and start it with the command below, so that the Raspberry Pi desktop will take over a small part of your screen :
"C:\Program Files (x86)\Xming\Xming.exe" :0 -clipboard -screen 0 700x500+125+100@1
At this point, Xming should be started. It provides an empty desktop screen into which Putty will pass the Raspberry Pi desktop.
2. Start the Raspberry Pi and make sure you can connect to it from your host machine (otherwise there's no point in using Putty in the first place, since it exists as an SSH client in this context).
3. For this setup to work, you must know your pi's IP address. If you do not have an ip address associated to pi, please assign one like below in the cmdline file present in your raspbian os installed on your SD card. Remember that there is an empty line in this file. Do not delete that line.
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait ip=169.254.0.2::169.254.94.145
4. Start up Putty. Connect to the Raspberry Pi using the IP of the Raspberry Pi. Before making the connection, go to Connection/SSH/X11 in Putty and then put a check the "Enable X11 forwarding" checkbox.
5. Now you see the Raspberry Pi login screen in Putty and you can use pi/raspberry login.
6. The final step is to type 'startlxde' in the Raspberry Pi, Putty session, and press Enter.
It initiates the session like below and then Xming shows you your Raspberry Pi desktop.
pi@raspberrypi:~ $ startlxde
** Message: main.vala:99: Session is LXDE
** Message: main.vala:100: DE is LXDE
** Message: main.vala:131: log directory: /home/pi/.cache/lxsession/LXDE
** Message: main.vala:132: log path: /home/pi/.cache/lxsession/LXDE/run.log
And there it is, a nice and niche desktop for your tasks. Now that you can see your desktop, you can play with the awesome stuff as I am playing with Node-red above.
Do leave a comment if you face any issues in connecting to RPI and getting display correctly.
Thanks and stay tuned for more blogs on my experiments with raspberry pi.
Happy learning :)
No comments:
Post a Comment