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 with FreeRDP and RemoteFX options

Editorial Team Editorial Team
Jul 4, 2023

Linux RDP (Remote Desktop Protocol) does not natively support USB redirection. RDP USB redirection allows you to use USB devices connected to your local machine while accessing a remote desktop session. For example, complex USB devices like scanners, and webcams with integrated microphones often encounter redirection issues. This is a common problem among FreeRDP users (a standard RDP client for Linux).

However, there are third-party solutions that can enable Linux RDP USB redirection sessions.

14-day Free Trial available
License price starts at $159.95
Available for
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.

For Linux RDP USB redirection, you need to install xfreerdp plug-in and USB Network Gate on both machines taking part in the remote desktop connection (referred to as the “Server” and “Client”).

To use USB redirection with FreeRDP, you'll need to install the necessary packages and configure your RDP client. Here are the general steps:
1
Install FreeRDP: Depending on your Linux distribution, you can usually install FreeRDP using the package manager. For example, on Ubuntu or Debian, you can run sudo apt-get install freerdp2-x11 to install the FreeRDP client.
2
Connect to the remote desktop: Use the xfreerdp command-line tool to establish an RDP connection.
3
Please note that the exact commands and options might vary depending on your Linux distribution and the version of FreeRDP you have installed. You can refer to the documentation or manual pages for more detailed information and additional configuration options.
4
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]

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 /vc:usb4rdp /v:xx.xx.xx.xx

This command runs RDP client xfreerdp with the Electronic Team 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 192.168.0.123

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

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

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

USB Network Gate
Redirect USB devices over network
14-day Free Trial available
License price starts at $159.95
Available for