Files
piik/native/capture
T
Matt Van Horn 4ae3619f87 fix(linux): retry KDE remote control with a temporary session
## Problem and outcome / 问题与结果

Enabling remote control on KDE Plasma Wayland stops native capture even though screen and system-audio sharing were already working. The capture process exits with status 2, and the remote-control request fails because the capture profile never becomes ready. The remote-desktop open asks for transient persistence and passes a restore token. KDE's portal answers with InvalidArgument because remote desktop sessions cannot persist, and that error is treated as a failed capture open.

When a remote-input create fails with that persistence error and has not already been retried, the error is freed and session creation runs again with persist mode none and a null restore token. The retry flag allows only one attempt, so a second rejection still fails the request.

The Linux native check compiles and runs a headless portal regression that rejects the first remote-desktop create with that error and expects the second create to use persist mode none and no token, and the README lists that regression with the other headless checks.

Refs #549

## Release notes

### English

On KDE Plasma Wayland, enabling remote control now retries with a temporary session when the desktop rejects permission persistence.

### 中文

在 KDE Plasma Wayland 中开启远程控制时,如果桌面环境拒绝记住授权,Piik 会改用临时会话重试。

## Verification / 验证

npx --no-install vitest run tests/release-automation.test.ts finished with 6 passing tests in 1 file.
The tests passed with the Piik change applied; a run with it reverted gave no clear result, so no test is shown to catch this bug.
The new test native/capture/linux/portal.test.c did not run here: no test runner for it was available.

Maintainer verification on Alpine Linux with libportal 0.9.1 and GStreamer 1.28.3 passed the Linux capture build and headless Portal tests.

## Impact / 影响

Scoped to the files listed above; no other caller or consumer changes.
4ae3619f87 · 2026-11-21 03:35:16 -04:00
History
..