The shadow server makes the host machine’s screen accessible to RDP clients. It captures the display, encodes the content, and streams it to connected peers. Clients can optionally interact with keyboard and mouse.
What the shadow server does
- Captures the host display (X11, Windows, macOS) using a platform-specific subsystem
- Encodes frames using RemoteFX, H.264, or GFX
- Streams to one or more simultaneous RDP clients
- Forwards client keyboard and mouse input back to the host
- Supports a lobby mode while waiting for the first viewer
- Optionally requires authentication (SAM database or PAM)
Building
Enable the shadow server at CMake configure time:
This produces the freerdp-shadow-cli binary and the libfreerdp-shadow library.
Running the shadow CLI
Basic usage
Monitor selection
Connections
Common command-line options
By default the shadow server uses NLA security and requires a SAM database. Run freerdp-shadow-cli --help to see the default SAM path, or pass /sec-nla to disable NLA.
Architecture
The shadow server is composed of several cooperating components:
Key data structures
rdpShadowServer
rdpShadowSubsystem
The subsystem is the platform capture plug-in. It implements screen capture and routes input events back to the host:
Subsystem interface
To write a custom platform subsystem (for example, to capture a virtual framebuffer), implement and register RDP_SHADOW_ENTRY_POINTS:
Signal the server that a new frame is available:
Programmatic usage
You can embed the shadow server in your own application using the library API:
Capture helper functions