Skip to content

Name the process Linux permission UIs will list when a grant is requested #237

Open

Description

@omesser

Blocked by: #196. Related: #148, #186, #229. Sibling: Windows.

Why

#148 made consented capabilities reachable from settings. The macOS follow-up is that TCC does not list "ai-buddy" when you cargo run from an IDE — it lists Cursor (or Terminal, iTerm). Settings now prints that name so the user can find the row.

Linux does none of this:

  • There is no settings window. platform::show_settings eprints (#196).
  • consent::live() is Null: never granted, never prompts.
  • consent::process_listed_as() hardcodes "ai-buddy".
  • consent::listed_under_hint says "macOS lists this process as … Privacy & Security."

X11 window geometry is consent-free (#186). Do not invent an Accessibility grant to match macOS. The first real Linux grant is likely xdg-desktop-portal ScreenCast when titles or Capture land. Whenever that prompt exists, the desktop will still list Cursor, GNOME Terminal, or "Unknown" for a cargo run binary — not "ai-buddy".

What to do

When #196 has a GTK window that can print a hint (and when a real grant exists to prompt):

  • Name the process the portal / desktop permission UI will show. Packaged: .desktop Name or Flatpak app-id. cargo run: the launching terminal or IDE, not "ai-buddy".
  • Generalize listed_under_hint so it is not macOS-hardcoded. Do not copy TCC labels ("Accessibility", "Screen Recording", "Privacy & Security") onto Linux.
  • Keep Null until a real probe exists. This ticket is the naming, not inventing grants or porting TCC.

Out of scope

  • Building the GTK settings window (#196).
  • Porting macOS Accessibility / Screen Recording as Linux capabilities.
  • Windows (sibling issue).

Acceptance

  • A cargo run from an IDE or terminal prints the name that desktop will list, not "ai-buddy".
  • A packaged build prints the .desktop / Flatpak name the portal will list.
  • The hint copy does not say "macOS" or "Privacy & Security".

Tests

process_listed_as / listed_under_hint stay unit-tested. Do not require a live portal in cargo test.


Does not close #148 or #196.

Activity

  1. omesser commented on Sep 2, 2026

    @omesser
    OwnerAuthor

    #196 now has a GTK window on #249: the macOS TCC section is omitted on Linux, Null stays. Naming still waits on a real grant. That grant is #250 (xdg-desktop-portal, not a TCC clone). This ticket stays naming-only.

  2. omesser commented on Sep 3, 2026

    @omesser
    OwnerAuthor

    #196 / #249 shipped the GTK window. There is still no Linux grant to name: consent::live() stays Null, and the settings window omits the macOS TCC section. The hint this ticket would print has nowhere to go until #250 (xdg-desktop-portal) exists.

    Unblocks the “window that can print a hint” half. Still blocked on a real grant.

  3. moved this from Todo to In Progress in Fidgeton Sep 4, 2026
  4. omesser commented on Sep 4, 2026

    @omesser
    OwnerAuthor

    Attempted in #320 and closed unmerged. Recording why, so the next person does not repeat it.

    This ticket has two gates, and only one is open. The body says to act "when #196 has a GTK window that can print a hint and when a real grant exists to prompt." #196 is closed and the GTK window exists, so the first is met. The second is not: consent::live() is Null off macOS, X11 window geometry is consent-free (#186), and nothing on Linux prompts.

    And the hint has nowhere to appear. The resolved name reaches only two places, both macOS-only in practice:

    • settings/form.rs:488, the "What the buddy can see" section comment. GTK omits both consent checkboxes via should_omit_row, and build_section returns early on a section with no visible rows, so the section never draws.
    • SettingsView::consent_intro(), called only from platform/macos/settings_window.rs:503.

    So this ticket needs a third condition alongside the two it names: somewhere on the Linux window that actually renders the hint. Until then any naming work is unreachable, however correct.

    What #320 got as far as, if it helps whoever resumes: FLATPAK_ID, then GIO_LAUNCHED_DESKTOP_FILE's Name=, then this app's own installed .desktop entry, then a bounded /proc parent walk skipping pass-through processes, then "Unknown". Ppid is read from after the last ) in /proc/<pid>/stat, since the command field is parenthesised and can contain spaces and parens; comm is unusable because the kernel truncates it to 15 bytes, turning gnome-terminal-server into gnome-terminal-. All of it is unit-tested without a live desktop.

    The known ceiling, which no skip list fixes: the walk yields a process name where a portal shows a .desktop name, so a GNOME Terminal launch resolves to gnome-terminal-server while the dialog says "Terminal". Resolving that means asking the desktop which app owns the pid.

    Separately, and worth its own ticket rather than this one: a Linux user sees no "What the buddy can see" section at all. That is a real gap today, not groundwork.

    — Claude Code, on @omesser's behalf.

  5. added
    invalidThis doesn't seem right
    and removed
    ready-for-agentFully specified, ready for an AFK agent
    on Sep 4, 2026
  6. moved this from In Progress to Ice Box in Fidgeton Sep 4, 2026
  7. added this to the V1 milestone on Sep 6, 2026
  8. omesser commented on Sep 6, 2026

    @omesser
    OwnerAuthor

    Unblocked for appearance: #352 / merged #422 now draws the Linux Privacy section (prose-only). Process-naming for a future portal grant still belongs here when #250 lands a mechanism.

    — Cursor agent, on @omesser's behalf.

  9. added
    p2Eventually: real, but nothing waits on it
    on Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestinvalidThis doesn't seem rightp2Eventually: real, but nothing waits on it

    Projects

    • Status
      Ice Box

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions