Credit : Link http://diyhacking.com/connect-raspberry-pi-to-laptop-display/
If you have an HDMI display: Using the connected HDMI display on your pi, you should install VNC server in raspberry pi. Open the LX-Terminal and type the following commands to install VNC:
$ sudo apt-get update
$ sudo apt-get install tightvncserver
If you don’t have an HDMI display: If you do not have a display even for one time setup, then no need to worry. Install Putty as per your windows configuration and via SSH you can connect with your raspberry pi. And, as you get access of your pi terminal, run the same commands as above to install VNC.
Starting VNC Server on Pi :
For starting VNC, enter the following command in SSH terminal:
$ vncserver :1
Download VNC client from here and install it. When you first run VNC viewer, you will see following:
Step 5 : Running VNC server at startup in Raspberry Pi
Connecting to your raspberry pi remotely with VNC is fine as long as your pi does not reboot. If it does, then you either have to connect with SSH and restart the VNC Server. Else, arrange for the VNC Server to run automatically after the raspberry pi reboots. To ensure that VNC starts automatically each time on booting up, run the following commands on terminal:
Open “.config” folder from pi’s: user folder (it is a hidden folder).
$ cd /home/pi
$ cd .config
Create folder called “autostart” in it. Also create file called “tightvnc.desktop” in that folder. To create file you can use any known text editor. Here I use gnome-text-editor for this:
$ mkdir autostart
$ cd autostart
$ gnome tightvnc.desktop
Edit the contents of file with the following text and save the file:
[Desktop Entry]
Type=Application
Name=TightVNC
Exec=vncserver :1
StartupNotify=false
If you have an HDMI display: Using the connected HDMI display on your pi, you should install VNC server in raspberry pi. Open the LX-Terminal and type the following commands to install VNC:
$ sudo apt-get update
$ sudo apt-get install tightvncserver
If you don’t have an HDMI display: If you do not have a display even for one time setup, then no need to worry. Install Putty as per your windows configuration and via SSH you can connect with your raspberry pi. And, as you get access of your pi terminal, run the same commands as above to install VNC.
Starting VNC Server on Pi :
For starting VNC, enter the following command in SSH terminal:
$ vncserver :1
Download VNC client from here and install it. When you first run VNC viewer, you will see following:
Step 5 : Running VNC server at startup in Raspberry Pi
Connecting to your raspberry pi remotely with VNC is fine as long as your pi does not reboot. If it does, then you either have to connect with SSH and restart the VNC Server. Else, arrange for the VNC Server to run automatically after the raspberry pi reboots. To ensure that VNC starts automatically each time on booting up, run the following commands on terminal:
Open “.config” folder from pi’s: user folder (it is a hidden folder).
$ cd /home/pi
$ cd .config
Create folder called “autostart” in it. Also create file called “tightvnc.desktop” in that folder. To create file you can use any known text editor. Here I use gnome-text-editor for this:
$ mkdir autostart
$ cd autostart
$ gnome tightvnc.desktop
Edit the contents of file with the following text and save the file:
[Desktop Entry]
Type=Application
Name=TightVNC
Exec=vncserver :1
StartupNotify=false
Comments