Introduction¶
This document describes how to use VNC server on a CCpilot display.
Overview¶
Virtual Network Computing, VNC, allows someone to remotely view and control a computer, or in this case a display. Each of our CCpilot displays can be extended with a VNC server which means you may remotely connect and control the display from a VNC Client. The VNC server has been developed to be a standalone service, without use of Qt or other services.
The screen mirroring module contains installation archives for each of our units. The installation packages contain the following:
Installation instructions
Documentation
Archive for installation on target
Glossary¶
Word/Abbrevation | Explanation |
---|---|
VNC | Virtual Network Computing |
fps | Frames Per Second |
client | The device that want to see the content of another device on screen |
server | The device that will send its content over the network to a client |
CCVNC server¶
CrossControl has made a VNC server implementation based on the open-source library LibVNCServer. This server will forward mouse clicks from a VNC client to multi touch events on the display.
The different CCpilot display types use the same software but needs some specific options to be able to handle the difference in screen sizes. The following command line options are available:
single-touch = only valid for CrossControl iMX5 displays as they can only use single touch
touch-device = touch device to be used (Default: /dev/input/touchscreen0)
port = port number to connect to (Default: 5900)
passwd = password to view server content (Default: No passwd used)
viewonly = no input from client to server possible.
verbose = turn on VNC server logging
x-scale = x-scaling for the unit (Default: 125)
y-scale = y-scaling for the unit (Default: 125)
invert = invert x/y scaling (only needed for CCpilot VC)
fps = number of fps (Default: 2). Higher FPS makes interaction more responsive but with increased CPU and network load.
rotate = rotation of screen when being sent to client. (Default: 0 degrees, possible values 0, 90, 180, 270)
To connect to the VNC server in the CC display you will need to start a VNC client/viewer on your remote device and connect to the CC display with the IP address. You should see the display screen mirrored on your VNC client and be able to control the display from the VNC client.
Example usage¶
After installing the ipk package for V700 or V1X00 the VNC server will start automatically. It will start using a script in /opt/vncserver/ which you can modify yourself to change FPS etc. The script will autodetect the correct scaling if you are running the VNC server on a V700 or a V1X00.
To disable the VNC server use
sudo systemctl disable ccvncserver
Known limitations:¶
CCpilot X900¶
The CCpilot X900 does currently not support a VNC connection using CCVNC server. Alternative approach is to use Qt and the built-in “VNC” platform as covered in the QT VNC platform plugin section.
CCpilot VS¶
Wayland works good but EGLFS doesn’t work as expected. The mouse clicks behaves odd when running Qt-apps.
CCpilot V700 / V1000 / V1200¶
For the iMX8-platform you need to use the vivante version of the Qt EGLFS graphics integration driver (eglfs_viv) that uses the framebuffer to get the VNC server to work correctly.
To enable VNC rendering in the iMX8 displays, a Qt application must be started with the following flags:
export QT_QPA_EGLFS_INTEGRATION=eglfs_viv
export QT_QPA_EGLFS_FORCE888=1
Qt VNC platform plugin¶
An alternative approach instead of using the CCVNC server is to use the Qt platform plugin “vnc”. A Qt application can be started with the flag “-platform vnc” to start a VNC server session. This will render graphics to a VNC offscreen buffer instead of the display screen and all graphics will be sent over the network. The drawback with this approach is that the Qt application must be restarted in VNC mode and the display screen will be black during this time. But if this is an acceptable behaviour during a service session, the performance is superior in this approach compared to running the CCVNC server.
VNC Client¶
Currently the displays do not support using a VNC client, i.e. viewing/interacting with a remote computer from a CCpilot display.
Security considerations¶
Some customers have had problems with the default VNC port (5900). There is a possibility that this port number attracts a huge number of login tries if a display is public accessible on the Internet. That amount of data traffic can slow down the communication and might also add a traffic cost.
Change the server to use a different VNC port number to avoid easy detection from malicious botnets and similar.
A password is always recommended before allowing a client to attach to the display.
Only enable VNC server for a limited time, during a service session, and not enabled by default.
License¶
The CCVNC server builds on libvnc which uses a GPL v2 license and this software will also use GPL v2 license.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
A written offer to get the source code will be included in the downloadable package.