Linux – Tips and Tricks

NICE DCV Product Codes and Features

Here you can find an overview of NICE DCV Product Codes and Features.

Any suggestions or questions reach out to us!

Adapting the DCV Web Client default resolution

The default maximum remote desktop resolution for the DCV WebClient is set to (1920, 1080). This can be adapted by setting the parameter “web-client-max-head-resolution” in the “display” section of the DCV server configuration. The browser must of course be able to support the higher resolution with appropriate performance.

Enabling the Grip Bar in Full-Screen Mode

When you have enabled full-screen mode in the NICE DCV client you can move to the upper screen area to trigger showing the menu bar. In case this automatic behaviour does not fit your use case you can click the pin to the right of the dotted bar (“…”) and the grip bar is stuck. You can then also move it to the place where it works best for you. Screenshots are below with pin open in the first screenshot:

Locked grip bar after clicking the pin and moved to another location:

How to increase image quality forcing YUV444 or YUV420 lossless updates

In some cases high fidelity of images is needed like in movie editing where chroma artifacts introduced by the H264 stream can be an issue. In this case the colorspace can be changed for better image quality while increasing the network usage.

Force YUV444 colorspace for video content

To enable this on the Linux client and macOS client, you need to set the dconf registry:

  • Launch the dconf-editor and enable the option enable-yuv444-decoding at path com -> nicesoftware -> DcvViewer -> display.

It is not possible to set this option on the web client.

Force YUV colorspace for lossless updates

Tradeoff: reduce flickering, but lossless updates will not have the exact RGB values of the server source.

To enable this on the Linux client and macOS client, you need to set the dconf registry:

  • Launch the dconf-editor and set the option lossless-colorspace to value yuv_rec601 at path com -> nicesoftware -> DcvViewer -> display.

Check supported display resolutions

On Linux, make sure that the X server is running and use the command xrandr to get the minimum and maximum resolution supported by the driver:

$ DISPLAY=:0 xrandr
Screen 0: minimum 8 x 8, current 2560 x 1600, maximum 2560 x 1600
[...]

How to enable multi-monitor on nVidia GPUs

In case you are working on Linux with a nVidia GPU like the T4 (e.g. in G4 instances) which does not automatically enable multi-monitor support on the client you can use the following command to configure xorg.conf to enable multi-monitor:

nvidia-xconfig --preserve-busid --enable-all-gpus --connected-monitor=DFP-0,DFP-1,DFP-2,DFP-3

Partially inspired by NICE support articles. If you have any questions or comments please let us know.

How to disable the DCV client certificate check

NICE DCV comes with a self signed certificate. In some cases the administrator wants to disable the certificate checking of the DCV client e.g. when working in a trusted environment. You can disable the certificate checking by adding

[connect]
certificatevalidationpolicy=accept-untrusted

to your .dcv connection file template, or specify

--certificate-validation-policy accept-untrusted

on the command line of the client.

How adapt the default timeout of DCV sessions

In case of Linux you can adapt in dcv.conf the following parameter in the “connectivity” section:

# Property "idle-timeout" specifies a timeout in minutes after which
# a client that does not send keyboard or mouse events is considered idle
# and hence disconnected.
# By default it is set to 60 (1 hour). Set to 0 to never disconnect
# idle clients.
# idle-timeout=120

How to disable IPv6 for web sockets

In case you encounter such a message in the DCV server.log:

Failed to create web sockets frontend service Could not listen on address ::, port 8443:unable to create socket: Adress family not supported by protocol

It seems IPv6 is disabled on the server machine. To mitigate this you can configure web sockets to listen on IPv4 only in /etc/dcv.conf:

# Configure the `web-listen-endpoints` parameter in the `connectivity` section[2] of dcv.conf.
[connectivity]
web-listen-endpoints = ['0.0.0.0']
# If you are also using the QUIC frontend (i.e. `enable-quic-frontend` is set to `true` or `1`) then you need to do the same with:
quic-listen-endpoints = ['0.0.0.0']

DCV Console Sessions with Nvidia GPU and no monitor connected

In this section we describe how to configure the X server with Nvidia GPU to work without connected monitor.

  1. Download the binary EDID file of the monitor where the DCV Client is running – e.g. the local laptop – and copy it to the Linux server (see below on how to retrieve the EDID file)
  2. In the xorg.conf (e.g. created by the command nvidia-xconfig --preserve-busid --enable-all-gpus --connected-monitor=DFP-0,DFP-1 for 2 monitors, please adapt accordingly for 1 monitor) we configure the Device section as follows with our EDID file:
    # Section "Device"
    # Option          "ConnectedMonitor" "DFP-0"

    Option          "ConnectedMonitor" "DFP-0, DFP-1"
    #  Option           "CustomEDID" "DFP-0:/etc/X11/MONITOR_edid.bin"
    Option           "CustomEDID" "DFP-0:/etc/X11/MONITOR_edid.bin; DFP-1:/etc/X11/MONITOR_edid.bin"
    # disable DPMS as it can reduce the FPS to 1
    Option         "HardDPMS" "false"
  3. In the Screen section of the xorg.conf we add a metamode directive according to the resolution of the monitor screen (e.g. 2560 x 1440):
    # Section "Screen"
    # Option "MetaModes" "2560_1440 +0+0"
    # 2 screens next to each other
    Option "MetaModes" "DFP-0: 2560x1440_144 +0+0, DFP-1: 1920x1080_60 +2560+0"
    # Option "MetaModes" "DFP-0: 1920x1080_60, DFP-1: 1280x720_60"
    # Option "MetaModes" "DFP-0: resolution +position_x +position_y {ViewPortIn=resolution, ViewPortOut=resolution+position_x+position_y}, DFP-1: resolution +position_x +position_y"

As an example the xorg.conf might look like this xorg-no-monitor.conf with the above configuration including tablet support. Using the nvidia-settings GUI can sometimes be easier for generating and testing metamodes dynamically before committing them to xorg.conf.

How to get the EDID file of a monitor

macOS:

Open the Terminal application.
Run the following command:
ioreg -lw0 | grep -i "IODisplayEDID" | sed -e ‘s/.*//’ > edid.bin
The command will output the EDID data in hexadecimal format.
Copy the hexadecimal data and save it to a file with a .bin extension (e.g., edid.bin).

Windows:

E.g. Download and install the “Monitor Asset Manager” tool from the Microsoft Store or from the Microsoft Download Center – or from EnTech: Monitor Asset Manager
Launch the “Monitor Asset Manager” tool.
Select the desired monitor from the list of connected displays.
Click on the “Export EDID” button to save the EDID data to a file.
Choose a location to save the EDID file and give it a name with a .bin extension (e.g., edid.bin).

Linux (two ways):

  • In a terminal run xrandr –props and find the line that starts with EDID followed by hex data which you can copy and save into the binary EDID file: edid.bin
  • Install the read-edid package if it’s not already installed. On Debian-based systems, you can use the following command:
    sudo apt-get install read-edid # or
    # sudo dnf install read-edid # Fedora, …
  • Run the following command to get the EDID data and save to the binary EDID file:
    sudo get-edid > edid.bin
  • This command will output the parsed EDID information.
    sudo get-edid | parse-edid

Embed inside an iFrame

DCV by default does not allow it to be embedded inside an iFrame to avoid Clickjacking attacks.

However there are use cases where we want to intentionally remove this limitation to allow us to use DCV inside another Web Application. This is controlled by two HTTP headers:

To use DCV inside an iFrame you must change two settings:

  • web-x-frame-options
  • web-extra-http-headers

The first one sets the X-Frame-Options value, the allowed values are: “DENY”, “SAMEORIGIN” and “ALLOW-FROM <uri>” 

The default is DENY. Chrome and Safari do not support the “ALLOW-FROM <uri>” value (https://bugs.chromium.org/p/chromium/issues/detail?id=129139) so in that case you must also set the second option to set the Content-Security-Policy header, for this you use the setting web-extra-http-headers, which allows to specify an array of extra headers to be added to the HTTP/HTTPS headers. The array should be filled with pairs like: [(‘header_name’,’header_content’)]. Multiple headers can be added. For instance, if the website answers to the address https://myportal.com and you want to stream DCV inside an iframe, you should use the following configuration:

[connectivity]
web-x-frame-options="ALLOW-FROM https://myportal.com"
web-extra-http-headers=[("Content-Security-Policy", "frame-ancestors https://myportal.com")]

Multi monitor with nvidia graphic card

Modifying the xorg configuration you should be able to enable additional monitors when using nvidia GPU.

Please do the following:

  • Make a backup of the /etc/X11/xorg.conf file​
  • Execute:
    sudo nvidia-xconfig --enable-all-gpus --preserve-busid --connected-monitor=DFP-0,DFP-1,DFP-2,DFP-3
  • Restart the X server:
    sudo systemctl isolate multi-user.target
    sudo systemctl isolate graphical.target
  • Connect to the server with the DCV client and go to fullscreen multimonitor

Note: DFP means Digital Flat Panel; It represents the monitor (DFP-0, DFP-1 etc)

Disable clipboard copy or paste for all users

To deny the clipboard usage for all users of all sessions you have to add these rows to the default permissions file (/etc/dcv/default.perm):

[permissions]
%any% deny clipboard-copy clipboard-paste

Disable screenshot

Regarding the screenshot feature ​we have “disable-screenshot” setting on the client side to disable it. For now we don’t have any feature server-side.

On the client side there are 2 ways to disable the screenshot feature:

  1. Launch the client with the –disable-screenshot  command line parameter
  2. Create a dcv connection file and add the following
[options]
disablescreenshot=true

GNOME and YUV standards alternatives

Xdcv always runs with depth 24. This is the standard on X11 on all modern systems, it means the basic colors (Red, Green and Blue) are represented with 8 bits per color.

When running with depth 24, applications (for instance OpenGL applications) will use 32 bits since they can also use the remaining 8 bits for the alpha channel (transparency).

This is pretty much the standard on all systems and it is the same you get on a normal laptop or workstation and it is the same as what PCoIP supports.

Recently some devices started supporting the “HDR” standard, which means 10 bits per color. This requires new monitors and graphic cards supporting this mode. Support for HDR is on our roadmap.

Finally, YUV420, YUV422 and YUV444 are a completely separate subject: these are related to how you can “compress” colors when transmitting: DCV uses YUV420 by default, which means more compression, but also has an option to use YUV444.

You can change the YUV standard executing this GNOME command:

gsettings set com.nicesoftware.DcvViewer.display enable-yuv444-decoding true

DCV uses various algorithms to transfer the display data from server to client. 

For the areas of the screen that are changing, we compress the data with a lossy algorithm (h264/jpg) and there is also a color space conversion from RGB to YUV420. Once an area of the screen does not change for some time, we send the data with a lossless algorithm and thus that area will be exactly as on the server.

DCV has also the possibility to use the YUV444 color space for the changing areas, but this will have some impact on the performances (if the hardware is not powerful enough) and on the bandwidth usage.