Skip to content

Remote Desktop

Remote access on lea (kwin-noctalia default; niri sandbox in greeter).

  • 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.nix opens 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-stream via polaris-hdr-linux-patches, unit polaris.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-noctalia only — not bare graphical-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 steam shim that, only when capture=portal and gamescope-0 is up, points launches at gamescope (DISPLAY from polaris-gamescope.env). Import format stays steam://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).

Terminal window
xfreerdp /v:<lea-ip> /u:luxus
  1. On lea, ensure a kwin-noctalia session is active and systemctl --user status polaris is running.
  2. Open https://<lea-ip>:47990, set credentials if first boot, note the pairing PIN.
  3. In Moonlight: add PC (mDNS or manual IP), enter PIN, stream.

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.

  • 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.