How to Access Raspberry Pi Through VNC
by raspberrypi33 in Circuits > Raspberry Pi
2071 Views, 25 Favorites, 0 Comments
How to Access Raspberry Pi Through VNC
If you want to access the Raspberry Pi's full desktop, then use a super easy software called VNC. You need the following things:
Raspberry Pi 2
Ethernet cable
Power for the Raspberry Pi
Computer with Windows 7, 8, or 10
1. Download and install VNC to your PC through this link:
http://www.tightvnc.com/download.php
2. In the installation menu, you only want to install the VNC viewer, so in the installation menu, select "custom". Change the selections to what is in the picture above.
3. Now, if you followed my other Instructable on using PuTTY to ssh your Pi, then you just need to ssh your pi now, and type in the following bits of code that are in bold:
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install tightvncserver
tightvncserver -(It will ask you for a password, so enter it in. It will also ask you for a view only password, but say no to it)
sudo su
cd /etc/init.d/
nano vncboot -(Type or copy in the following code to the nano text editor):
USER=pi
HOME=/home/pi
export USER HOME
case "$1" in
start)
echo "Starting VNC Server"
#Insert your favoured settings for a VNC session
su - $USER -c "/usr/bin/vncserver :1 -geometry 1280x800 -depth 16 -pixelformat rgb565"
;;
stop)
echo "Stopping VNC Server"
/usr/bin/vncserver -kill :1
;;
*)
echo "Usage: /etc/init.d/vncboot {start|stop}"
exit 1
;;
esac
exit 0
chmod 755 vncboot
update-rc.d -f lightdm remove
update-rc.d vncboot defaults
sudo reboot
4. Now, open up VNC, and in the Remote Host bar, type in the IP address of your Raspberry Pi, followed by a colon and a 1. And don't forget to connect your Pi to your PC with an Ethernet cable. Plug the Ethernet cable into your Pi, and then plug the other end into the Ethernet socket in your PC.
5. Click "Connect", and enter in the password that you set earlier when a window pops up asking for a password.
6. There is a better guide on the Raspberry Pi website, but I thought that I should just post the instructions from there to here, but slightly modified. The link to this site if you have any trouble with this one is here:
https://www.raspberrypi.org/documentation/remote-a...