Citrix Virtual Apps and Desktops

Configuration

USB redirection is disabled by default. You can configure generic USB redirection using the following settings in Citrix policy:

  • Client USB device redirection: to enable or disable USB redirection
  • Client USB device redirection rules: to specify specific device action i.e. to allow or deny access to a particular device
  • Client USB device redirection rules (Version 2): to specify rules for filtering, splitting and auto-connecting USB devices
  • Client USB device optimization rules: to disable optimization or change the optimization mode
  • Allow existing USB devices to be automatically connected: to allow or prevent automatic connection of existing USB devices that are connected to a client endpoint at the start of an HDX session
  • Allow newly arrived USB devices to be automatically detected: to allow or prevent automatic connection of USB devices that are connected to a client endpoint during an HDX session

See, USB Policy Settings for more details.

How to configure USB redirection

By default, USB redirection configuration is disabled. To use it, USB redirection policy and specific redirection rules must be enabled and configured on the DDC.

Note:

If you are using any components older than version 2212 or you are using Workspace App for Linux/Mac, see Legacy USB Redirection Configuration for details on how to configure USB redirection.

Enabling Generic USB Redirection

  1. Open Citrix Web Studio policies and click on the Policies tab.

  2. Click on Create Policy and expand the ICA > USB Devices policies.

  3. Edit the Client USB device redirection policy.

  4. Select Allowed and click Save.

Creating USB Redirection Policy Rules

When the user tries to redirect a USB device to Virtual Desktop, it is checked against each USB policy rule in turn until a match is found. The first match for any devices is considered final. If the first match is an Allow rule, the matched device is allowed to be redirected to the virtual desktop. If the first match is a Deny rule, the matched device is only available in the local desktop. If no match is found, default rules are used.

Device Rules

As with regular USB devices, device rules set in the policy or client Citrix Workspace app configuration on the end point select the devices for forwarding. Citrix Workspace app uses these rules to decide which USB devices to allow or prevent from forwarding to the remote session.

Each rule consists of an action keyword (Allow, Connect, or Deny), a colon (:), and zero or more filter parameters that match actual devices at the endpoints USB subsystem. These filter parameters correspond to the USB device descriptor metadata used by every USB device to identify itself.

Device rules are clear text with each rule on a single line and an optional comment after a # character. Rules are matched top down (descending priority order). The first rule that matches the device or child interface is applied. Subsequent rules that select the same device or interface are ignored.

Example: ALLOW VID=1050 PID=0421 #Device1 Example: CONNECT VID=xxxx PID=yyyy Class=03 #Device2

Keyword Description
CONNECT Use this keyword to allow devices to be redirected over the USB virtual channel as well as enable them to be auto-redirected during session launch and upon insertion.
ALLOW Use this keyword to allow devices to be redirected over the USB virtual channel
DENY Use this keyword to deny devices from being redirected over the USB virtual channel

Device_Rules

Setting the policy on the DDC:

  1. Open Citrix Web Studio policies and click on the Policies tab.

  2. Click on Create Policy and expand the ICA > USB Devices policies.

  3. Edit the Client USB device redirection rules (VERSION 2).

  4. Set the value based on the examples provided in the description for each usb device that needs to be redirected and click Save.

    For Example: Allow: VID=056A PID=00A4 #STU-430 Deny: Class=08 subclass=05 # Mass Storage

    Note:

    If a Citrix admin checks Use default value and clicks on Save, the default rules can be found in the following registry in the VDA.

    Caution!

    Refer to the Disclaimer at the end of this article before using the Registry Editor.

    HKLM\SOFTWARE\Wow6432Node\Citrix\PortICA\GenericUSB\DeviceRules

Note:

Policies can still be set on the client device using group policy device rules but that is no longer needed on newer versions of CVAD and CWA.

For legacy configuration of USB devices, see Legacy USB Redirection Configuration.

Configure automatic redirection of USB devices (Optional)

USB devices are automatically redirected when USB support is enabled. Also, the USB user preference settings are set to automatically connect USB devices. It is not always best to redirect all USB devices. Users can explicitly redirect devices from the USB device list that are not automatically redirected. To prevent USB devices from being listed or redirected, use DeviceRules on either the client endpoint or the DDC policy. This policy can be set either on the DDC, on the client using a GPO, using Citrix Workspace Preferences or the Connections tab under CDViewer. All of these methods are described below:

Setting the policy on the DDC:

There are two policies on the DDC that can be set to allow auto redirection of USB devices-

  • Allow existing USB devices to be automatically connected

  • Allow newly arrived USB devices to be automatically connected

    1. Open Citrix Web Studio policies and click on the Policies tab.

    2. Click on Create Policy and expand the ICA > USB Devices policies.

    3. Edit the setting Allow existing USB devices to be automatically connected.

    4. Clear the Use default value checkbox and select Automatically redirect available USB devices from the drop down menu and click Save.

    5. Edit the setting Allow newly arrived USB devices to be automatically connected.

    6. Clear the Use default value checkbox and select Automatically redirect available USB devices from the drop down menu and click Save.

Configuration