Search by Tags

VNC Server (Linux)

 

Article updated at 03 Sep 2021

Overview

Virtual Network Computing (VNC) is a desktop sharing system that can display the screen of one computer (Server) on the screen of another (Viewer). Based on Remote frame buffer (RFB) protocol it allows mouse and keyboard to control the server computer remotely.

Attention: The procedure described in this article only works for BSP versions < 5. For BSP5 and later the X11 server is not supported anymore and you should look into activating the RDP backend for weston.

Linux Image With VNC Server

A VNC server does not come installed in the Toradex pre-built images. You can add support by building a custom image from OpenEmbedded. For instructions on how to build an OpenEmbedded image, see OpenEmbedded (core).

Add x11vnc Using OpenEmbedded

There is a recipe available for x11vnc, which is a VNC server application for systems that use the X Window System. To add it to the image add the following line to your local.conf:

conf/local.conf
... IMAGE_INSTALL_APPEND = " x11vnc"

Start x11vnc

Since x11vnc has many options, it is recommended that you consult the man pages or the help:

x11vnc --help

An example that runs in the background and makes the device discoverable in the network is provided below:

x11vnc -q -bg -forever -avahi

Connect remotely

There are some VNC clients available for Linux. Vinagre, that comes pre-installed in Ubuntu, will be used as example.

Open Vinagre on the host machine:

vinagre &

Click Connect --> find. Select the matching option and click OK. Leave all options unchanged and click Connect. You should have the remote desktop opened in a window in your host PC, as illustrated below:


  • Remote Desktop Connection using x11vnc and Vinagre

    Remote Desktop Connection using x11vnc and Vinagre