Electronic Team uses cookies to personalize your experience on our website. By continuing to use this site, you agree to our cookie policy. Click here to learn more.

Linux RDP USB Redirection: Definitive Guide

Sep 10, 2021

RDP clients for Linux enable the redirection of certain USB devices to the remote desktop (such as flash drives and printers). However, devices that are fully compatible with USB over RDP redirection on Linux are quite sparse.

For example, complex USB devices like scanners, and webcams with integrated microphones often encounter redirection issues. This is a very common problem among the FreeRDP users (a common RDP client for Linux).

linux rdp usb redirection

USB for remote desktop for Linux

usb over rdp linux

Linux RDP clients’ poor USB support is not an issue thanks to USB Network Gate for Linux. With USB Network Gate, users can easily access any USB device that is plugged into a local computer during a remote desktop session. This is possible because USB Network Gate allows users to share individual USB ports that can be used to connect any kind of USB device.

Enable Linux RDP USB Redirection
14-day free trial

USB over Remote Desktop for Linux gives users the option to switch between various USB devices on the go (i.e. unplugging and plugging in different USBs at any given time), and no additional configuration is necessary.

To use USB Network Gate for Linux RDP USB redirection, simply install the program on both machines taking part in the remote desktop connection (referred to as the “Server” and “Client”).

How to share USB devices over RDP on Linux

A step-by-step guide to sharing and connecting remote USB devices over remote desktop on Linux:
Download and install USB Network Gate on the RDP client Linux machine. This is the computer that will be sharing the USB device over Remote Desktop Protocol.

To install a package with the dependencies, run the following commands in the terminal.

For Debian-based Linux distributions:

dpkg -i [package]
apt-get install -f

For RPM-based Linux distributions:

rpm -i [package] or yum install [package]
Run UNG for Linux and open the “Share local USB devices” tab.
Select a required USB device and click “Share”.
 linux rdp usb redirection
Configure the additional settings and hit “OK”.
 linux rdp client usb redirection
Install USB Network Gate on the remote computer (the RDP terminal server) and start it.
Open the “Remote USB devices” tab and select “Find”.
 locate devices shared from Linux RDP client
Enter the remote host’s IP address or network name and click “Find” to locate the remote USB devices.
 search for remote USB devices
If the search yield no result, select “Add” and manually specify the TCP port used to share a USB device.
 manually add the shared USB device
Finally, select the added device and click “Connect”/“Connect once”.
 connect to USB on remote desktop on Linux

When a USB device is redirected over RDP to a Linux machine, the shared USB device is recognized and accessible by all applications on the remote machine.

Redirect USB to remote desktop on Linux w/ FreeRDP and UNG

Read the following guide to get an idea of how to connect USB over RDP on Linux with the FreeRDP client.

Please note: When authorization and/or traffic encryption are enabled/used, USB device sharing in remote desktop sessions is not available.

Run in the Terminal:

xfreerdp --plugin usb4rdp <remote address=""></remote>

<remote address> is the IP address/domain/computer name of the remote server. The above command runs RDP client xfreerdp and the plugin that facilitates USB Network Gate’s full functionality during the RDP sessions.

If necessary, users can load other FreeRDP plugins as well. See below for an example:

xfreerdp --plugin cliprdr --plugin usb4rdp xxx.xx.xx.xx

This command runs RDP client xfreerdp with the Electronic’s and cliprdr plugins that ensure server and client clipboard data is properly synchronized.

Read FreeRDP resources to learn more about supported plugins and available user commands.

Use the command below to share USB audio devices during remote desktop sessions by launching xfreerdp with additional options:

xfreerdp plugin usb4rdp -0 -o server

This command redirects sound using USB Network Gate and not the RDP client. Starting from version 1.0, the UNG plugin and xfreerdp are compatible.

Please note: Remmina USB redirection and rdesktop aren’t supported.

Enable Linux RDP USB Redirection
14-day free trial

USB Redirection Over RDP From Linux To Windows

Thanks to the support of RemoteFX USB Redirection [MS-RDPEUSB] of USB Network Gate for Linux, users can redirect shared USB devices from Linux computers (terminal clients) to Windows computers (terminal servers).

The client must be running at least Windows 8 (be it virtual machine(VM) or real), or Hyper-V running Windows 7 SP1 (with the addition of RemoteFX GPU) launched on Windows Server 2012 or Windows Server 2008 R2.

To enable RDP USB redirection from Linux to Windows, use the following command:

xfreerdp-usb [shared-ports] xfreerdp-args

  • shared-ports: comma-separated list of TCP ports for USB devices shared via USB Network Gate. If not specified, all shared USB devices will be redirected.

  • xfreerdp-args : arguments to pass to xfreerdp.

See the below example:

  • Passthrough all shared USB devices:

    xfreerdp-usb -u User -p Pass

  • Passthrough USB devices shared on TCP ports 1909, 1910:

    xfreerdp-usb 1909,1910 -u User -p Pass

For users who encounter the “SSL_read: I/O” error, add the “--rfx” parameter without quotes before the IP address.

Top choice

USB Network Gate

  • Rank 4.9 based on 179+ users
  • Requirements: Windows (32-bit and 64-bit): Windows 7 SP1/8/10, Windows Server 2008 R2/2012/2012 R2/2016/2019 . 6.45MB free space.
  • Version 9.2.2420. (). Release notes