Using RealVNC on Raspian

To practice image processing on Raspberry using its own camera, I need to be able to output image some where I can see, like on a HDTV screen via HDMI. But it has 2 setbacks:
By design, SSH is secured and can not direct its output to other terminals. We can find a way around by using another terminal running on PI, consistently monitor an output file from our current terminal. But even then, it’s only for text. what about image, GUI,…
Ok, forget SSH, we can just use the PI with an HDTV. But it will not be very convenient and power efficient.

Is there a way to direct PI GUI to another computer, you asked? Yes there is. And it is VNC: Virtual Network Computing. There are X11VNC,RealVNC, TightVNC, UltraVNC,… I will use X11VNC now.

To install VNC server on PI, issue:

sudo apt-get install -y x11vnc

When done, run x11vnc:

x11vnc -display :0 -usepw -listen IP_of_pi -allow allowed_ip_address

Replace IP_of_pi accordingly. You can omit the ‘-allow’.
It will show something like:

The VNC desktop is:      192.168.1.10:0
PORT=5900

Now on your other computer, download RealVNC package from here: https://www.realvnc.com/download/vnc/linux/#older-versions
Then install it:

sudo dpkg -i VNC-Viewer-6.0.1-Linux-x64.deb

Run VNCViewer:

vncviewer 192.168.1.10:0

Enter your PI username and password.
And we’re in like Flynn.

If you turn on your TV now, you will see the VNC desktop is mirroring your TV screen.
It’s now time to develop some image processing code. More posts about this later as I’m learning this as well.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s