README.md 2.22 KB
Newer Older
Eskil Abrahamsen-Blomfeldt's avatar
Eskil Abrahamsen-Blomfeldt committed
1
2
# VNC Server

Eskil Abrahamsen-Blomfeldt's avatar
Eskil Abrahamsen-Blomfeldt committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Provides a VNCItem for Qt Quick applications which can be used to share all its contents over a VNC connection. When no connection is made, the VNCItem remains inactive and does not affect application performance or execution. When one or more client connects, the item will read back its rendered content when the client requests, meaning some overhead during the render step.

It supports the following encodings: Raw, Hextile, Zlib.

It also supports DEC Authentication.

# How to build

Qt VNC Server can be built as a regular Qt module. For Qt 6, run qt-cmake-private && ninja. For Qt 5 run qmake && make -j8.

# How to use

Create a VNCItem in the Qt Quick application and make it the parent of the part of the application content that you want to share. For instance, in order to share all the application content, you can make VNCItem the root item of the application.

See tests/manual/qml for a few examples of use. The minimal-compositor-qt5.qml / minimal-compositor.qml are examples of a Qt Wayland Compositor which shares its entire screen over VNC. 

Eskil Abrahamsen-Blomfeldt's avatar
Eskil Abrahamsen-Blomfeldt committed
19
20
Note: Use qmlscene in order to run the minimal-compositor tests.

Eskil Abrahamsen-Blomfeldt's avatar
Eskil Abrahamsen-Blomfeldt committed
21
22
23
24
25
26
27
28
29
30
31
Setting the password property of the VNCItem will enable DEC authentication. Note that DEC authentication is considered weak protection, and that the connection itself is not encrypted. This protects mainly against accidental intrusion, but not against targeted attacks.

# How to debug

Qt VNC Server is work-in-progress, and issues may occur. The following environment variables may be useful when debugging problems.

- QT_VNCSERVER_PREFERRED_ENCODING: Set this to the server's preferred encodings. This can be a semicolon-separated list, and the first entry which is supported by the client will be used. If the client supports none of the encodings, Raw will be used. By default, the server will respect the client's preference. Possible values: raw, zlib, hextile.

- QT_VNC_NO_DIRTYMAP: Disables detection of dirty regions and always sends entire item area to clients. This reduces load on CPU but usually requires more bandwidth. 

- QT_LOGGING_RULES: To enable logging for certain aspects of the server operation, Qt VNC Server supports qt.vncserver.fps, qt.vncserver.time and the general qt.vncserver logging categories.