vncserv

Updated: April 19, 2023

Remote framebuffer VNC server

Syntax:

vncserv      [-d display_id]
             [-e encoder]  
             [-f format]
             [-i inetd]   
             [-k]
             [-n count]
             [-p port]
             [-s server_name]   
             [-v verbosity]
            

Runs on:

QNX Neutrino

Options:

-d display_id
Capture the display identified by display_id. You can specify display_id by its number.

The display that you specify using display_id must be one of the displays that you've configured in the display subsections of the winmgr section in your configuration file (e.g., graphics.conf).

If you don't have any display subsections configured, or if you don't specify the display option, vncserv uses the default display.

-e encoder
Set the encoding type. You can specify one of the following encoding types:
  • raw — Framebuffers are sent without applying any compression. This may result in high network traffic usage causing the network to be slow.
  • zlib — Framebuffers are sent with zlib compression before sending. This reduces the load on the network but may still cause a slow network.
  • zrle — This is the recommended and default encoding type. Run-Length encoding is applied to the framebuffer before applying zrle compression. This option offers the lowest network traffic and highest performance.

If you don't specify this option, vncserver uses zrle as the default.

-f format
Set the pixel format. This option determines the number of bytes per pixel the framebuffer sends. You can choose one of the following supported formats:
  • rgba8888 or rgbx8888
  • rgb565

Where "a" indicates alpha bits and "x" indicates that the alpha bits are ignored.

This format is internal and can be different from that of the display's. If you don't specify this option, vncserver uses rgb565.

-i inetd
Accept connections from the inetd super-server daemon. In order for the connection to be accepted, do the following:
  • Add vncserv [port]/[socket] to your /etc/services file. For example:
    vncserv 5900/tcp
                                   
  • Add the following line to your etc/inetd.conf file:
    vncserv stream tcp nowait root /bin/vncserv in.vncserv -i [OPTIONS]                                  
                                   

This option is disabled by default. Accepting connections when the client is disconnected is implicit with inetd. This means that setting -k is not needed.

-k
Keep accepting connections after a client disconnects. This option is disabled by default.
-n count
Set the number of tile processor threads. This option allows you to improve or reduce performance by increasing or reducing CPU usage. It does not affect network traffic.

The default is the number of CPU cores available. This is done to maximize performance by creating a tile processor thread for each CPU core to encode in parallel. To lower CPU usage, you may specify a lower number. Minimum being 1.

-p port
The TCP port used to accept connections. If you don't specify this option, vncserver uses 5900 as the default.
-s server_name
The server's name. If you don't specify this option, vncserver uses the host name as the default.
-v verbosity
The verbosity level of messages displayed. Choose from the following levels:
  • 0 — Quiet mode. No messages are displayed.
  • 1 — Basic mode. Basic messages are displayed, such as connection information. (default)
  • 2 — Profile mode. The highest verbosity setting. In this setting, additional profiling and allocation information is displayed. Such as the number of frames sent per second, and the average number of bytes sent per frame.

When the -i (inetd) and the -v (verbosity) options are set, verbosity is set to basic and is daemonized. This means that verbosity is silent on the display but will slog*() the messages and errors.

Description:

The vncserv utility is a VNC server that allows VNC clients to remotely access the target display.

You must configure the client to allow the server to set the pixel format. This option is usually labeled as full color or let the server decide in client application options.

Examples:

# vncserv -d 0 -v 2 -e zrle -k -s MyServer -n 1
            

In this example, the contents of the display dpy-0 are captured. The captured framebuffer is encoded using zrle encoding performing compression on 1 CPU core. Verbosity is set to level 2. The server name in this case is MyServer and it continues to accept connections after the client disconnects.