Remote Desktop
Remote access on lea (kwin-noctalia default; niri sandbox in greeter).
Available methods
Section titled “Available methods”1. KRDP (RDP)
Section titled “1. KRDP (RDP)”- Server: KDE KRDP (
org.kde.krdpserver) - Port: TCP 3389
- Session: kwin-noctalia (autostart via
pkgs/kwin-noctalia-session) - Clients: Windows Remote Desktop, FreeRDP (
xfreerdp /v:<lea-ip> /u:luxus) - Config: module
modules/nixos/remote-desktop.nixopens the firewall; desktop integration lives in the kwin-noctalia session package
2. Polaris + Moonlight (gaming / low latency)
Section titled “2. Polaris + Moonlight (gaming / low latency)”- Server: Polaris (
pkgs.polaris-streamvia polaris-hdr-linux-patches, unitpolaris.service) - Protocol: Moonlight / GameStream (NVENC on lea)
- Ports: TCP 47984/47989/47990/48010, UDP 47998–48000 (and related offsets from base 47989)
- Web UI:
https://<lea-ip>:47990(default: GameStream HTTP port + 1) - Config:
~/.config/polaris/polaris.conf(seeded once with Headless Stream defaults; web UI edits after that) - Logs:
~/.config/polaris/(see web UI / journal:journalctl --user -u polaris) - Session scope: WantedBy/PartOf
kwin-noctaliaonly — not baregraphical-session.target - Capture path (default): Headless Stream (
headless_mode+ cage) — private labwc runtime, not KMS desktop capture - Capture path (gamescope host):
polaris-gamescope-use-portal— portal capture + idle gamescope (polaris-gamescope-idle). Restore labwc:polaris-gamescope-use-labwc - Steam under Polaris: unit PATH includes a
steamshim that, only whencapture=portalandgamescope-0is up, points launches at gamescope (DISPLAYfrompolaris-gamescope.env). Import format stayssteam://rungameid/…(no apps.json rewrite). Disable:POLARIS_STEAM_ON_GAMESCOPE=0. Desktop/KWin Steam is unchanged. - HDR (opt-in):
modules/nixos/polaris-gamescope-session.nix— client-gated force-HDR on idle gamescope; Steam Bigscreen (HDR follows client) + Steam Bigscreen (forced SDR) (SDR without flipping client HDR). Patches:~/projects/polaris-hdr-linux-patches. - Clients: Moonlight
- Troubleshooting: Moonlight / Polaris
Module: modules/nixos/remote-desktop.nix (package, udev, avahi, firewall, user unit).
Quick start
Section titled “Quick start”RDP (Windows / FreeRDP)
Section titled “RDP (Windows / FreeRDP)”xfreerdp /v:<lea-ip> /u:luxusMoonlight (Polaris)
Section titled “Moonlight (Polaris)”- On lea, ensure a kwin-noctalia session is active and
systemctl --user status polarisis running. - Open
https://<lea-ip>:47990, set credentials if first boot, note the pairing PIN. - In Moonlight: add PC (mDNS or manual IP), enter PIN, stream.
Gaming notes
Section titled “Gaming notes”Prefer Polaris + Moonlight over RDP for games (NVENC, lower latency). Headless Stream starts apps in Polaris’ private compositor and leaves the host desktop layout alone.
For black screen / pairing issues see Moonlight troubleshooting.
Security
Section titled “Security”- Ports are opened on the LAN firewall only as declared in
remote-desktop.nix. - Prefer LAN or VPN; do not expose GameStream/RDP to the public internet without a tunnel.
- Polaris pairing should stay on trusted networks; revoke clients from the web UI if needed.