VDI Stream Client is a very tiny, low latency and GPU accelerated client to connect to Windows running Parsec Host.
A very tiny and low latency desktop streaming client for remote Windows guests with GPU passthrough which supports Nvidia NVENC, AMD VCE, VCN and Intel Quick Sync Video.
VDI Stream Client is a tiny and low latency Linux client which connects to Parsec Host running on Windows. It allows to run fully GPU accelerated Windows desktop environment on a remote machine while streaming the content to a local Linux system which process keyboard and mouse input. The remote server can be a virtual machine running on-top of on-premise deployments of Virtuozzo Hybrid Server, KVM or Xen. It can also connect to public clouds like Amazon (EC2 G3 Accelerated) or Microsoft Azure (NV6). It uses Simple DirectMedia Layer (SDL2) for low-level access to audio, video, keyboard, mouse and clipboard.
I'm using Linux on Desktop since more than 20 years already for several reasons - customization, small and tiny floating window managers like Fluxbox, ideal platform for engineers and developers and many more. However over the past couple of years my daily job required more attention which rely on Microsoft Windows applications like Microsoft Office and full fledged groupware solution like Microsoft Outlook. There exist open source alternative like LibreOffice and Thunderbird plus various Exchange connectors or even SOGo. They are all good in their niche but they didn't reach compatibility to satisfy me. I tried a lot of different ways of solving the problem (see below in the comparison table) but at the end I have only three main goals:
In Linux ecosystem there exist already wide range of options to run Windows guest environment as virtual machine on-top of a Linux host and access either its local display or via remote display protocol, all of them have their pros and cons. Look at the table below for brief comparison.
Method | Local | Remote | 3D |
---|---|---|---|
QXL with Spice | Yes | Yes | No |
GPU Passthrough | Yes | No | Yes |
KVM FrameRelay | Yes | No | Yes |
iGVT-g | Yes | No | Yes (Intel only) |
Virgil 3D | Yes | Yes | Yes (Linux only) |
SPICE Streaming Agent | Yes | Yes | Yes (Linux only) |
Moonlight | Yes | Yes | Yes (Nvidia only) |
Parsec | Yes | Yes | Yes |
So why another streaming client is needed if one for Windows, Linux and macOS exist already? Well the Parsec client is focusing on gaming capabilities while VDI Stream Client is focusing on having a reliable daily working environment. The table below gives a brief overview about differences.
Features | VDI Stream Client | Parsec |
---|---|---|
Keyboard Input | Full | Partial |
Mouse Input | Full | Partial |
Gamepad Input | No | Yes |
Clipboard Sharing | Text only | Text only |
Remote | Yes | Yes |
DirectX | Yes | Yes |
OpenGL | Yes | Yes |
Resolution Sync | Host-to-Client | Client-to-Host |
Alt+Tab Integration | Yes | No |
Minimal GUI | Yes | No |
System SDL2 | Yes | No |
Auto Reconnect | Yes | No |
Screensaver Integration | Yes | No |
USB Redirection | Yes | No |
Color Mode 4:4:4 | SDK Bug | Yes |
Any recent GPU with OpenGL and VA-API support will work. When it comes to 4:4:4 color mode, part of the decoding work is made with FFmpeg (see notes below regarding 4:4:4 status). Nothing exist without drawbacks and that one for Parsec is that it is mandatory to have an account which is completely free. However communication between client and host is always made directly. Also the SDK is only available as pre-compiled library, so for those who fully rely on an open-source system, stop reading here. Some features are only available with a commercial subscription under Parsec Warp. It applies to 4:4:4 color mode which is required to encode images and streams without chroma subsampling for sharp and crystal clear text.
SDL_WINDOW_RESIZABLE
flag set, so window
cannot be resized by window manager and always uses native host resolution
(no more blurry desktop).VDI Stream Client uses GNU Build System to configure, build and install the
application. It requires sdl2
, sdl2_ttf
, libx11
, libglvnd
, libusb
,
usbredir
and the Parsec SDK.
The build system will search the SDK first in build directory and use DSO
linking, the resulting binary will be redistributable but you need to ship
Parsec library somehow. If not found, it will search in system-wide include and
library directories and link accordingly, binary may not be redistributable.
For build and install use the commands below and if --prefix=/usr
is used,
the make install
command must be run as root user.
git clone https://github.com/parsec-cloud/parsec-sdk
./configure --prefix=/usr &&
make &&
make install
Arch Linux users can download ready-to-use PKGBUILD
file available from
Arch User Repository (AUR), following these build and install instructions.
VDI Stream Client requires that the Parsec Windows host (x86_64 or x86) is running and you have created a free account. There are several advanced configuration options for visual and network latency improvements described in the Parsec documentation in the "Hosting Settings" chapter.
The client requires a sessionID
and a peerID
obtained through the Parsec
API to identify users to make secure connections. For convenience you can use
tools/parsec-login script to retrieve list of available
hosts. This is one-time operation whenever you add Parsec host application to
another Windows machine.
If you are using libvirt for virtualization, you can
redirect local USB devices to your Windows host. It is highly recommended to
add XHCI controller because it is the only one which supports USB 1.1, USB 2.0
and USB 3.0, the QEMU UHCI and EHCI controllers support only their respective
USB standard. Windows 10 is shipped by default with an XHCI USB 3.0 driver. Add
the following to your <devices>
section in domain XML for an USB 3.0
controller:
<controller type='usb' model='qemu-xhci'/>
With the controller you can start using USB redirection via TCP/IP protocol.
Each USB device is redirected through an independent port and the firewall of
your server must allow incoming TCP/IP connection for that. VDI Stream Client
supports monitoring of hotplug events (e.g. plug and unplug) of the redirected
USB devices to allow automatic reassignment to the Windows host. Add the
following to your <devices>
section in domain XML to enable redirection of
one local USB device and replace <ip>
with the IP address of your
virtualization host:
<redirdev bus='usb' type='tcp'>
<source mode='bind' host='<ip>' service='4000'/>
</redirdev>
You need to add additional <redirdev>
sections to redirect multiple devices
and increase the port number accordingly. After reloading libvirt and starting
the Virtual Machine with the configuration above, you can redirect a local USB
device. You can get a list of available devices with their <vendorID>
and
<productID>
with lsusb
command.
vdi-stream-client --session <sessionID> --peer <peerID> --redirect <vendorID>:<productID>@<ip>#4000
Once connection is established it will redirect the local USB device to the
host and setup drivers. Multiple USB devices can be redirected using ,
separator to the --redirect
switch. They will be reassigned if the client
reconnects to the host. Moreover, devices are reconnected to the host
automatically when you unplug and plug them again to the USB port. If the
devices are not connected during startup of the client, they are monitored and
redirected as soon as they are attached to the client.
USB redirection integration doesn't support any kind of encryption. The main goal of this client is to support in-house desktop streaming between client and host. Please use a VPN like WireGuard if you are using it across WAN connections.
Building a truly and fully open-source GPU accelerated desktop streaming solution requires a host service running inside the Windows environment. Hardware encoding is supported by FFmpeg for the major GPU vendors. VDI Stream Host application seems reasonable.
A special thanks goes to Parsec Cloud, Inc. as they provided a Parsec Warp subscription to support this project.
If you want to help out with development without providing code yourself, you can always donate to the project directly using the following platforms.