Skip to content

Linux sensing consent is xdg-desktop-portal, not TCC #250

Closed

Description

@omesser

Blocked by: Capture (deferred in v1; DESIGN.md decision 25). Related: #148, #186, #196 / #249, #237. Sibling of macOS TCC, not a port of it.

Why

macOS sensing consent is two TCC rows: Accessibility (Dock bounds) and Screen Recording (titles, and Capture when it ships). Linux is not that.

X11 window geometry, WM_CLASS, frontmost, idle, and DPMS are consent-free (#186, platform/x11/sensing.rs). There is no Dock SPI that needs an Accessibility grant. consent::live() is Null: never granted, never prompts. #249 omits the macOS TCC section on Linux on purpose. Do not fake those checkboxes.

The first real Linux grant is xdg-desktop-portal ScreenCast (and Screenshot if that is what Capture uses), when either:

  • Ambient / On-Demand Capture ships (DESIGN.md §11, deferred in v1), or
  • Wayland needs a portal to see other clients' contents or titles. Wayland already degrades spatial geometry (DESIGN.md §3); do not invent an X11-style Accessibility row to paper over that.

Until then, keep Null. Naming the process the portal will list is #237, not this ticket.

What to do

When Capture (or Wayland titles) is in scope:

  1. A Linux Probe that talks to xdg-desktop-portal. granted / prompt map onto the portal session, not TCC APIs. Do not add CapabilityId::Accessibility on Linux.
  2. Settings consumes form::describe() the same as today. Linux rows are the portal capabilities that actually exist (ScreenCast / Screenshot), with copy that names the portal, not "Privacy & Security".
  3. First run still grants nothing. The prompt fires only when the user flips a row on (decision 9 / #148). Unchecking stops using the grant; it does not have to revoke the portal session if the desktop has no revoke API — document that, same as macOS "off does not revoke TCC".
  4. #237 supplies the process name the portal UI will show. This ticket does not re-solve naming.

Out of scope

  • Porting macOS Accessibility / Screen Recording labels onto Linux.
  • Building Capture itself (pixels, Local Gate, cadence).
  • Wayland absolute positioning / overlay (spatial degrade stays DESIGN §3).
  • Windows. GTK settings window (#196 / #249). Secret store (#221).

Acceptance

  • X11 v1 sensing stays consent-free. No Accessibility row appears on Linux.
  • When Capture (or Wayland titles) ships, flipping the Linux settings row prompts xdg-desktop-portal and a grant is required before pixels/titles flow. First run still grants nothing.
  • consent::Null remains the Linux probe until that grant exists. No fake granted() -> true.
  • Hint copy does not say macOS, Accessibility, or Privacy & Security.

Tests

Probe is a trait. Unit-test a fake portal the way macOS tests inject Fake. Do not require a live portal in cargo test.


Does not close #148 or #237. Does not unblock Capture.

Activity

  1. added this to the V1 milestone on Sep 6, 2026
  2. moved this from Todo to In Progress in Fidgeton Sep 8, 2026
  3. omesser commented on Sep 8, 2026

    @omesser
    OwnerAuthor

    #538 takes the half of this that can be settled without a Linux desktop, and leaves the issue open.

    Done there. The Linux settings pane no longer declares the two TCC rows at all. They used to be declared in form::describe() on every platform and matched back out by an id blacklist in the GTK renderer, so the shared form described a consent model Linux does not have and one renderer's memory of two string constants was all that kept the checkboxes off screen. Null is unchanged, with a comment saying it is the answer rather than a stub, and a test pins that it grants nothing and prompts for nothing. ADR-0005, ADR-0020, DESIGN.md §9/§11 and docs/SPEC.md now name xdg-desktop-portal as Linux's first grant instead of calling it "the equivalent" of Screen Recording.

    Not done, and not attempted. The portal Probe itself. It is conditional on Capture, which is deferred in v1, and there is no way to exercise D-Bus portal code on the machine this was written on or in CI — which is also what "do not require a live portal in cargo test" already implies. Writing it now means shipping a session negotiation nobody has run.

    So three of the four acceptance boxes are ticked; the second one waits for Capture, and this stays open until then.

    One thing left on the floor: SettingsView.consent still carries both TCC rows on Linux, because consent::CAPABILITIES is not gated. Nothing renders them — the macOS window is the only consumer — so it is inert, but the view model is still TCC-shaped. Worth folding into whichever change brings Linux a real row.

    — Cursor agent (Coder), on @omesser's behalf.

  4. omesser commented on Sep 8, 2026

    @omesser
    OwnerAuthor

    Partial land via #538 (merge 162f6de): Settings no longer offers consent rows Linux cannot grant. Leaving this issue open for remaining Linux sensing/consent work called out in that PR.

    — Cursor agent (Coder), on @omesser's behalf.

  5. added
    p2Eventually: real, but nothing waits on it
    on Sep 9, 2026
  6. self-assigned this
    on Sep 17, 2026
  7. omesser commented on Sep 17, 2026

    @omesser
    OwnerAuthor

    Leftover from #538 is done in #829. On Linux, consent::rows() returns an empty vec, so SettingsView.consent is no longer the Accessibility + Screen Recording catalog. macOS and Windows rows are unchanged. consent::Null still grants nothing.

    Still waiting. xdg-desktop-portal Probe / ScreenCast / Screenshot. That stays blocked on Capture (DESIGN.md decision 25). This issue stays open for that. Do not close it from this leftover.

    — Cursor agent (Coder), on @omesser's behalf.

  8. omesser commented on Sep 18, 2026

    @omesser
    OwnerAuthor

    On main via #829 (merge 795f9f4): Linux consent::rows() is empty, so SettingsView.consent no longer carries Accessibility / Screen Recording. consent::Null unchanged.

    Still open for xdg-desktop-portal Probe / ScreenCast / Screenshot (blocked on Capture, DESIGN.md decision 25).

    — Cursor agent (Coder), on @omesser's behalf.

  9. omesser commented on Sep 18, 2026

    @omesser
    OwnerAuthor

    Landed on main. #829 merged (795f9f4). The #538 view-model leftover is done: Linux consent::rows() is empty, so SettingsView.consent is no longer TCC-shaped. consent::Null unchanged.

    Still waiting. xdg-desktop-portal Probe / ScreenCast / Screenshot — blocked on Capture (DESIGN.md decision 25). This issue stays open for that.

    — Cursor agent (Coder), on @omesser's behalf.

  10. added
    linuxLinux platform lane: X11, GTK, portals, packaging
    on Sep 20, 2026
  11. added a commit that references this issue on Sep 22, 2026
    7a27882
  12. omesser commented on Sep 22, 2026

    @omesser
    OwnerAuthor

    Capture drop landed as research on main via #878 (docs/research/capture-drop-and-harness-cu-path.md).

    Architect decision (2026-09-22): DROP pixel Capture (Ambient and On-Demand); KEEP Free sensing. Agent computer use is outside ai-buddy (harness-native or MCP; cua-driver primary).

    What that means for this issue

    Leaving open while #874 is open. Do not close from #878 alone.

    — Cursor agent (Coder), on @omesser's behalf.

  13. omesser commented on Sep 22, 2026

    @omesser
    OwnerAuthor

    Correction on the follow-up links above: use Architect's tickets from the same merge hygiene pass — #881 (ADR-0005), #883 (scrub copy), #882 (cua-driver user docs). The parallel #880 / #884 / #885 were closed as duplicates.

    — Cursor agent (Coder), on @omesser's behalf.

  14. moved this from In Progress to Done in Fidgeton Sep 22, 2026
  15. omesser commented on Sep 22, 2026

    @omesser
    OwnerAuthor

    Shipped on main via #874 (merge 4f579f5).

    Linux sensing consent is xdg-desktop-portal ScreenCast for Wayland window titles (not TCC, not Capture):

    • LinuxPortal Probe via ashpd (create session → select sources → start; no frames kept)
    • One Settings row (Screen Cast) behind CapabilityId::WindowTitles / use_window_titles
    • First run grants nothing; Fake Probe covers unit tests (no live D-Bus in CI)
    • No Accessibility row on Linux; hint/disclosure names the portal, not Privacy & Security
    • Screenshot portal omitted; Capture stays dropped

    Follow-up consumer for titles behind usable(WindowTitles): #886.

    — Cursor agent (Coder), on @omesser's behalf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestlinuxLinux platform lane: X11, GTK, portals, packagingp2Eventually: real, but nothing waits on itready-for-agentFully specified, ready for an AFK agent

Projects

  • Status
    Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions