In my previous blog, I have provided the details of how to set up Raspberry Pi in headless mode and how to SSH into the system. But sometimes we need to access desktop as per project requirement. For example, the user may want to see the graph of production done at the XYZ industry. So we need to set up remote access for Raspberry Pi using VNC.
Steps to setup VNC on Raspberry Pi:
- SSH into Raspberry Pi
- Install VNC Server
- Install VNC Client
Step 1. SSH into Raspberry Pi:
Please refer my previous blog, to know how to get the IP address of your Raspberry Pi and SSH into Raspberry Pi.
Step 2. Install VNC Server on Raspberry Pi:
Once you are able to SSH into your Raspberry Pi, run following command to install VNC Server.
sudo apt-get install tightvncserver
After successful installation of VNC server, start VNC server using the following command:
Above command starts VNC Server and provides the hostname and display number for access, for example, raspberrypi:1. Please take a note of display number, it will be required while connecting to the server from any VNC client.
Note: During the first execution of the above command, the server asks to set the password for accessing it.
Step 3. Install VNC Client on Windows:
You can install any VNC Client on your system. This time, I tried a new terminal tool called Mobaxterm. It comes up with pre-installed VNC Client. In Mobaxterm terminal, click on “Session”, it will open pop up window. Then select VNC session and provide IP_address:desktop_number and click on the “OK” button.
Once you click on the “OK” button, it will ask for the password. Provide the correct password to get access to your Raspberry Pi device.
Once you get connected to your Raspberry Pi desktop via VNC, you can connect your device to your WiFi Network, you can modify system configurations, check your project reports if any and many more. Hope this blog is helpful for you.
I love technology and learning new things. I explore both hardware and software. I am passionate about robotics and embedded systems which motivate me to develop my software and hardware skills. I have good knowledge of Python, Selenium, Arduino, C and hardware design. I have developed several robots and participated in robotics competitions. I am constantly exploring new test ideas and test tools for software and hardware. At Qxf2, I am working on developing hardware tools for automated tests ala Tapster. Incidentally, I created Qxf2’s first robot. Besides testing, I like playing cricket, badminton and developing embedded gadget for fun.