Search by Tags

Remote Access the TorizonCore GUI Using VNC or RDP

 

Article updated at 12 Feb 2021
Compare with Revision

Subscribe for this article updates

Select the version of your OS from the tabs below. If you don't know the version you are using, run the command cat /etc/os-release or cat /etc/issue on the board.



Remember that you can always refer to the Torizon Documentation, there you can find a lot of relevant articles that might help you in the application development.

Torizon 5.0.0

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 to the Typographic Conventions for Torizon Documentation.

  • Remote Weston via VNC

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

How to Enable the VNC Backend

When starting the container, you just need to pass the environment variable ENABLE_VNC=1.

Enable VNC From the Command-line

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

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 weston-launch --tty=/dev/tty7 --user=torizon

Pull the latest torizon/weston container image:

# docker pull torizon/weston:$CT_TAG_WESTON

Start the weston container:

# docker run -d --rm --ipc=host --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 weston-launch \
             --tty=/dev/tty7 --user=torizon -- --use-pixman

Pull the latest torizon/weston-vivante container image:

# docker pull torizon/weston-vivante:$CT_TAG_WESTON_VIVANTE

Start the weston container:

# docker run -e ACCEPT_FSL_EULA=1 -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-vivante:$CT_TAG_WESTON_VIVANTE --developer weston-launch \
             --tty=/dev/tty7 --user=torizon

How to Connect Using a VNC Client

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

$ vncviewer <IP_ADDRESS>

How to Enable the RDP Backend

When starting the container, you just need to pass the environment variable ENABLE_RDP=1.

Enable RDP From the Command-line

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

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 weston-launch --tty=/dev/tty7 --user=torizon

Pull the latest torizon/weston container image:

# docker pull torizon/weston:$CT_TAG_WESTON

Start the weston container:

# docker run -d --rm --ipc=host --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 weston-launch \
             --tty=/dev/tty7 --user=torizon -- --use-pixman

Pull the latest torizon/weston-vivante container image:

# docker pull torizon/weston-vivante:$CT_TAG_WESTON_VIVANTE

Start the weston container:

# docker run -e ACCEPT_FSL_EULA=1 -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-vivante:$CT_TAG_WESTON_VIVANTE --developer weston-launch \
             --tty=/dev/tty7 --user=torizon

How to Connect Using an RDP Client

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

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