Skip to main content
Version: 6

Remote Access the TorizonCore GUI Using VNC or RDP

Introduction

This guide describes how to enable a VNC or an RDP backend in a Weston Debian Container for Torizon. You can choose one of them at your discretion, but you can't use both at the same time. Both protocols can provide graphical access to a remote device, displaying your Graphical User Interface and transmitting the keyboard and mouse events. It can be enabled by passing an environment variable when starting the Weston container.

This article complies with the Typographic Conventions for Torizon Documentation.

Prerequisites

  • Host computer connected to the same network as the remote device
  • Since both technologies use direct peer-to-peer communication, make sure your firewall doesn't block the remote device's access
  • Basic understanding of the Debian Containers for Torizon

Enable VNC and RDP From a VS Code Project

In case you're using the Visual Studio Code Extension for Torizon, you need to create your own docker-compose.yml file for the weston container and then add the environment variable that you want to use:

  • ENABLE_VNC=1
  • ENABLE_RDP=1

After creating the file, set it as the default one in the configuration view of the extension, this process is described in the Multi Container Services with Docker Compose section of the Visual Studio Code Extension for Torizon article.

How to Enable the VNC and RDP Backend from the Command-line

When starting the container, you just need to pass the environment variable of the backend that you want to enable:

  • ENABLE_VNC=1
  • ENABLE_RDP=1

From the command line, that means adding the parameter --env ENABLE_VNC=1 or --env ENABLE_RDP=1 to the docker run as explained on Debian Containers for Torizon. See the examples:

VNC:

Pull the latest torizon/weston container image:

# docker pull torizon/weston:$CT_TAG_WESTON

Start the weston container:

# docker run -d --rm --name=weston --net=host --env ENABLE_VNC=1 --cap-add CAP_SYS_TTY_CONFIG \
-v /dev:/dev -v /tmp:/tmp -v /run/udev/:/run/udev/ \
--device-cgroup-rule='c 4:* rmw' --device-cgroup-rule='c 13:* rmw' \
--device-cgroup-rule='c 199:* rmw' --device-cgroup-rule='c 226:* rmw' \
torizon/weston:$CT_TAG_WESTON --developer --tty=/dev/tty7

RDP:

Pull the latest torizon/weston container image:

# docker pull torizon/weston:$CT_TAG_WESTON

Start the weston container:

# docker run -d --rm --name=weston --net=host --env ENABLE_RDP=1 --cap-add CAP_SYS_TTY_CONFIG \
-v /dev:/dev -v /tmp:/tmp -v /run/udev/:/run/udev/ \
--device-cgroup-rule='c 4:* rmw' --device-cgroup-rule='c 13:* rmw' \
--device-cgroup-rule='c 199:* rmw' --device-cgroup-rule='c 226:* rmw' \
torizon/weston:$CT_TAG_WESTON --developer --tty=/dev/tty7

Connect Through VNC and RDP From Your PC or Smartphone

On the client-side, install your favorite VNC remote-control software and run the following command (change to your IP address):

$ vncviewer <IP_ADDRESS>

In case you are searching for a VNC Client:

In case you don't know how to find the board's IP address, please read the Scan your local network to find the board IP and MAC address article.

Known Issues

  • Weston container VNC causes graphics slow down: it was noticed that enabling VNC significantly affects the performance of a GUI application. The exact severity of the slowdown depends on the UI framework and how intensive the graphics are overall.


Send Feedback!