This article will guide the user to enable remote screen grabbing for Qt applications by using the remote screen SDK provided by Teamviewer
TeamViewer currently provides 3 different options to access the content of the screen attached to a device on which the TeamViewer IoT agent installed. In this article the option to directly access Qt applications is described. This is realized through an SDK which TeamViewer provides. This SDK is directly linked into the application and so enables the connection to the Teamviewer IoT agent on the edge device and so to the TeamViewer network.
|Qt application||The Qt application that in the end provides a user frontend which can be accessed from the outside|
|Customer Qt application||The frontend part of the Qt application. This is not provided by TeamViewer, but from the entity that designs the application and device.|
|RemoteScreen SDK||Software Development Kit containing an interface and plugin to enable remote control for a customer application (short: SDK/plugin).|
|TeamViewer IoT agent||TeamViewer software enable the edge device to create TeamViewer connections for remote control|
|TeamViewer Client||The TeamViewer program installed on the user pc. To initiate remote control connections to the device.|
There are some preconditions, that you must meet, so that you can use this feature. Please make sure that you fulfill them all:
For building the whole package the following libraries and tool need to be available:
On debian systems (when writing the documentation debian 10 was the latest) the following development packages can be used for building
For example :
sudo apt-get -y install cmake
The TeamViewer Remote Screen SDKcan be downloaded by clicking on the follwoing link: http://download.teamviewer-iot.com/remoteScreenSDK/TVRemoteScreenSDK_1.0.9.zip
To build the remote screen SDK please ensure that all required libraries and dependencies are installed and available.
# create and navigate to a build directory
mkdir build cd build# run cmake
cmake <path to extracted SDK>
# run make
After building the package there should be two binaries:
The SDK can also be installed to be used in a development environment:
# default installation (as root, if needed)
The default installation prefix for CMake is /usr/local. So after installation there are two projects installed:
To install the SDK into a custom prefix one can override CMAKE_INSTALL_PREFIX when configuring the SDK before building:
The TeamViewer IoT agent needs then to be configured to remote control an "external application". This configuration involves also specifying a so-called "image grab strategy": With that the agent tells the application in what way it expects image updates. To do this:
From remote terminal run:
sudo teamviewer-iot-agent configure set EnableRemoteScreen 1
sudo teamviewer-iot-agent configure set RemoteScreenChannels \"EAP\"
Note: That the value in escaped double quotes can vary from user case. The values could be:
External App (SDK) with built-in grabbing
[strng] RemoteScreenChannels = \"EAP\"
External App (SDK) with notifications about framebuffer changes
→ FB device /dev/fb42
[strng] RemoteScreenChannels = \"EAP:FBPush:/dev/fb42\"
External App (SDK) with frambuffer grabbing
→ first FB device (/dev/fb0)
[strng] RemoteScreenChannels = \"EAP:FBPull\"
The agent currently supports the following strategies:
After starting the agent its API for remote screen is now available and can be used by the Qt plugin.
After installing the IoT Agent it creates a system group called 'tv_api'. Every application that wants to communicate with the agent needs to run under a user that is part of the before mentioned system group:
For further information on the TeamViewer IoT agent check here
In the package for the SDK is an example application included. This example show the basic operations of the SDK and how to integrate the plugin into a Qt Quick based application. It requires Qt 5.3 with the modules Qt Quick 2.3 and Qt Quick Window 2.0 to run.
On debian based distributions the following packages are required to run:
To start the example application:
With the example application one can also test and see the basic operations:
Please contact TeamViewer IoT Support ⟨email@example.com⟩ if you encounter problems when using the remote screen SDK.
On some ARM based devices, the colors may seem inverted or appear wrong on the client’s side.
When the RemoteScreenChannels setting is configured with EAP:FBPush, it may happen that the client picture is sometimes not refreshed appropriately during a TeamViewer session. Resizing the window will force an update and will display the actual content of the application in the client window.
For more information about the different channel configurations and their use, please visit https://www.teamviewer.com/link/?url=710439
The TeamViewer Remote Screen SDK is released under MIT License allowing an easy integration of our source code.
To create Qt applications respective Qt licenses are needed