Skip to main content
Version: Torizon OS 6.x.y

Use VNC and RDP

Introduction

This article describes how to enable remote graphical sharing via VNC (Virtual Network Computing) or RDP (Remote Desktop Protocol) on Torizon OS modules. You can use this feature for testing and debugging your GUI application during the development phase. After running a Weston Container, you can remotely display your Graphical User Interface and transmit keyboard and mouse events.

If you look for the official Torizon feature that enables secure maintenance and troubleshooting of remote devices, see Remote Access.

info

Enabling VNC or RDP on Weston will significantly slow down your application, even when the remote session is inactive. Additionally, due to security reasons, it is not recommended to enable VNC or RDP in production. To troubleshoot applications with built-in security, enable Remote Access on your device before following the steps in this guide.

This article complies with the Typographic Conventions for Torizon Documentation.

Prerequisites

  • A device running a graphical application using the Wayland graphic stack.
  • Host computer connected to the same network as the remote device.
  • Since both technologies use direct peer-to-peer communication, make sure your firewall does not block remote device access.
  • Basic understanding of the Debian Containers for Torizon.

Server Setup

Docker Run

When starting a Weston container with docker run, you only need to pass the environment variable of the desired protocol:

  • VNC: ENABLE_VNC=1
  • RDP: ENABLE_RDP=1

Depending on your module specifications, as the presence of a GPU, for example, the performance and required setup for Weston differ.

To enable VNC, run the following command. Make sure to select the correct command for your SoM.

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 226:* rmw' \
torizon/weston:$CT_TAG_WESTON --developer --tty=/dev/tty7
caution

AM62-based SoMs do not support VNC.

To enable RDP, run the following command. Make sure to select the correct command for your SoM.

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 226:* rmw' \
torizon/weston:$CT_TAG_WESTON --developer --tty=/dev/tty7

Docker Compose

If you are using a Docker Compose file to manage multiple containers, enable VNC or RDP by passing an environment variable to the Weston container:

  • VNC: ENABLE_VNC=1
  • RDP: ENABLE_RDP=1

The following code snippet enables VNC on Weston (line 12):

docker-compose.yml
version: "2.4"
services:
gui-application:
depends_on:
- weston
# Docker run options
weston:
image: torizon/weston-vivante:${CT_TAG_WESTON_VIVANTE}
network_mode: host
environment:
- ACCEPT_FSL_EULA=1
+ - ENABLE_VNC=1
volumes:
...

Client Setup

On the client-side, install your preferred remote control software and use your module's IP address to establish a connection.

tip

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

VNC

By default, VNC uses port 5900.

VNC Viewer command:

$ vncviewer <IP_ADDRESS>::<PORT>

In case you are searching for a VNC Client:

RDP

By default, RDP uses port 3389.

FreeRDP command:

$ xfreerdp /v:<IP_ADDRESS>:<PORT> /sec:tls

In case you are searching for an RDP Client:

Known Issues

Weston container VNC causes graphics to slow down: Enabling VNC significantly affects the performance of GUI applications. The exact severity of the slowdown depends on the UI framework and the overall graphic intensity.



Send Feedback!