Apple Sidecar-like virtual display streaming for Linux (KDE Plasma).
Creates a virtual monitor and streams it via Sunshine to any Moonlight client (iPad, Android tablet, another PC, etc.).
Warning: This currently requires a patched version of Sunshine with XDG ScreenCast-only capture support. Stock Sunshine uses a combined RemoteDesktop+ScreenCast session which fails on KDE's portal implementation. See LINK for the patch.
The current implementation of XDG screencast on sunshine (as of 2/12/25) does not appear to work on KDE, I have implemented a lazy patch HERE
- System tray app with dropdown menu for easy control
- Resolution presets for common devices (iPad Pro, iPad Air, etc.)
- One-click toggle to start/stop virtual display and Sunshine
- Automatic restart if Sunshine crashes
- Autostart support for launching on login
Arch Linux / CachyOS:
sudo pacman -S python-gobject gtk3 libayatana-appindicator krfb kscreen sunshine| Component | Purpose |
|---|---|
krfb-virtualmonitor |
Creates virtual display output |
kscreen-doctor |
Enables/configures the virtual output |
sunshine |
Streams the display via Moonlight protocol |
libayatana-appindicator |
System tray integration |
./deploy.sh
# run the script in the deploy dir
$HOME/.config/sunshine/sidecar-tray.py
# Optional: enable autostart
mkdir -p ~/.config/autostart
ln -sf ~/.local/share/applications/sidecar.desktop ~/.config/autostart/Start the tray app:
# standalone
./sidecar.py
# deploy.sh auto copies it to sunshine's .config
$HOME/.config/sunshine/sidecar-tray.pyFrom the system tray menu:
- Select resolution from the Resolution submenu
- Click "Start Sidecar" to create virtual display and launch Sunshine
- Connect from Moonlight on your device
- Click "Stop Sidecar" when done
Edit the PRESETS dictionary in sidecar.py to add or modify resolution presets:
PRESETS = {
"iPad Pro 12.9\"": (2732, 2048),
"iPad Pro 11\"": (2388, 1668),
"iPad Air": (2360, 1640),
"iPad Mini": (2266, 1488),
"1440p": (2560, 1440),
"1080p": (1920, 1080),
"720p": (1280, 720),
}Other options:
DEFAULT_PRESET = "iPad Pro 12.9\""
SIDECAR_NAME = "sidecar"
SUNSHINE_BIN = "sunshine"Sidecar Tray App
1. Spawns krfb-virtualmonitor (creates Virtual-sidecar output)
2. Waits for output to appear in kscreen
3. Enables output via kscreen-doctor
4. Launches Sunshine (streams Virtual-sidecar)
5. Monitors Sunshine and restarts if it crashes
|
v
Moonlight Client
Connects and receives video stream
Virtual display not appearing:
- Check if krfb-virtualmonitor is running:
pgrep -f krfb-virtualmonitor - Check kscreen outputs:
kscreen-doctor --outputs - View logs:
cat ~/.config/sunshine/sidecar.log
Sunshine not starting:
- Ensure Sunshine is installed and in PATH
- Check if another instance is running:
pgrep sunshine - Run
sunshinemanually to see errors
Tray icon not appearing:
- Ensure
libayatana-appindicatoris installed - Some systems may need a system tray extension
Portal errors with Sunshine:
If Sunshine shows XDG portal errors, run it without cap_sys_admin:
sudo setcap -r $(which sunshine)This project is licensed under the GNU General Public License v3.0 or later - see the LICENSE file for details.
SPDX-License-Identifier: GPL-3.0-or-later