Saturday, December 13, 2014

Using GUI on raspberry pi without monitor.

Follow these few simple steps to use GUI on your laptop, if you don't have additional screen for pi:

1. Intsall putty from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

2. Start putty and give IP address of your Pi connected to Ethernet LAN, you can know the ip address of pi from a software Advaced IP scanner: http://www.advanced-ip-scanner.com/

3. Type login and password for your pi.

4. $ sudo apt-get install tightvncserver

5. $ tightvncserver
Once that is done you can start a VNC server from the shell prompt. This example starts a session on VNC display zero (:0) with full HD resolution:

6. $ vncserver :0 -geometry 1920x1080 -depth 24
(If fonts appear the wrong size, add '-dpi 96' to the end.) Or you could create a script to save typing in the whole thing.

7. $ nano svnc.sh (call the file whatever you like)
Add the lines:

#!/bin/sh
vncserver :0 -geometry 1920x1080 -depth 24 -dpi 96
Ctrl-x y <return> (To Exit Nano and Save)

8. Set the file to Execute

$ chmod +x svnc.sh
then to run

$ ./svnc.sh

9. Install VNC on your laptop. Follow link: https://www.realvnc.com/products/ios/2.0/connectguide/connect1.html

10. open VNC on your laptop and connect to ip address from your laptop from Step 2.

11. You will have GUI of  Raspberry pi.


4 comments:

  1. Thanks for sharing! I followed the above instructions but I get error messages stating that there is no /home/pi/.xsession and /home/pi/.Xsession.

    Any suggestion as to how I can resolve this error will be highly appreciated. Thanks again!

    ReplyDelete
    Replies
    1. Please elaborate after which step from above you got error. Were you able to follow all the steps?

      Delete
  2. Replies
    1. Thank you. I followed instructions verbatim and everything worked fine.

      Now, is there a way to start the TightVNC server automatically when RPi starts?

      Delete