Open Terminal, and type:
sudo apt-get install tightvncserverTo start VNC Server, type:
tightvncserverSet a password to access the Pi from another computer remotely after the setup.
Type the following in the terminal for creating autostart script:
cd /home/pi
cd .configNote the '.' at the start of the folder name makes it a hidden folder that will not show up when you type 'ls'.
mkdir autostart
cd autostartCreate a new configuration by typing the following command:
nano tightvnc.desktopEdit the contents of the file with the following text:
[Desktop Entry]
Type=Application
Name=TightVNC
Exec=vncserver :1
StartupNotify=falsePress ctrl-X and then Y, and then press Enter to save the file. On reboot, the VNC server will restart automatically.
Download VNC viewer (available for Mac, Linux, Windows, and more), and connect to ipaddress of your Pi over VNC.
Enter the credentials setup earlier and connect.
On Mac, you can also try via finder.
Select Go->Connect to Server from your finder and type
vnc://raspberrypi.local:5901OR
vnc://IP-ADDRESS-OF-Pi:5901Enter credentials and connect to raspberry pi.