Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions electron/native/pipewire-capture/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,9 @@ fn main() {
{
let _ = emitter.emit(&Event::Warning {
code: "click-capture-unavailable".to_owned(),
message: "no readable /dev/input pointer device — add this user to the 'input' \
group to record click telemetry; cursor samples will otherwise all be moves"
message: "no readable /dev/input pointer device — grant this user access (a udev \
uaccess rule for mice, or the 'input' group) to record click telemetry; \
cursor samples will otherwise all be moves"
.to_owned(),
});
}
Expand Down
47 changes: 39 additions & 8 deletions website/docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ On Windows, the recommended route is the [Microsoft Store](#windows). Everywhere
|---|---|---|
| **Windows** | Windows 10 version 1903 (build 18362) or later, x64, Intel 8th Gen / AMD Ryzen 2000 series or newer. Native capture needs Windows 10 version 2004 (build 19041) or later; older builds record through the [browser-capture fallback](#platform-differences) | Windows 11, Intel 12th Gen / AMD Ryzen 4000 series or newer |
| **macOS** | macOS 13 (Ventura) — required by ScreenCaptureKit for capture. Recording the microphone needs macOS 15 or later | macOS 15.2 or later |
| **Linux** | x64. `xdg-desktop-portal` and PipeWire, which recording needs: the native capture helper goes through them, and a failure there is reported as an error. The [browser-capture fallback](#platform-differences) only takes over when a build is missing the helper itself. System audio additionally needs PipeWire as the sound server (the default on [Ubuntu 22.10+](https://discourse.ubuntu.com/t/kinetic-kudu-release-notes/27976) and [Fedora 34+](https://fedoraproject.org/wiki/Changes/DefaultPipeWire)). Recording mouse clicks on Wayland needs your user in the `input` group — see [Mouse clicks on Wayland](#mouse-clicks-on-wayland) | Same, kept up to date |
| **Linux** | x64. `xdg-desktop-portal` and PipeWire, which recording needs: the native capture helper goes through them, and a failure there is reported as an error. The [browser-capture fallback](#platform-differences) only takes over when a build is missing the helper itself. System audio additionally needs PipeWire as the sound server (the default on [Ubuntu 22.10+](https://discourse.ubuntu.com/t/kinetic-kudu-release-notes/27976) and [Fedora 34+](https://fedoraproject.org/wiki/Changes/DefaultPipeWire)). Recording mouse clicks on Wayland needs read access to mouse evdev devices — see [Mouse clicks on Wayland](#mouse-clicks-on-wayland) | Same, kept up to date |
| **RAM** | 8 GB | 16 GB |

:::note Older integrated graphics on Windows
Expand Down Expand Up @@ -129,18 +129,49 @@ You may need to grant screen-recording permission depending on your desktop envi

### Mouse clicks on Wayland

Wayland exposes no portal for input events, so OpenScreen reads left-button presses straight from the kernel's evdev interface (`/dev/input/event*`) instead. Those device nodes are owned by `root:input`, so a recording only distinguishes a click from ordinary cursor movement when your user is in the `input` group:
Wayland exposes no portal for input events, so OpenScreen reads left-button presses straight from the kernel's evdev interface (`/dev/input/event*`) instead. By default, those device nodes are restricted to `root:input`, so a recording only distinguishes a click from ordinary cursor movement when your user has read access to them.

Nothing breaks without this access — recording works exactly as it did before, and every cursor sample is simply recorded as a move.

The scope is deliberately narrow: click capture uses only left-button presses (`BTN_LEFT`) and ignores every other event, so keystrokes are never recorded. To turn the reader off entirely even where the permission exists, set `OPENSCREEN_DISABLE_CLICK_CAPTURE=1` in the environment OpenScreen is launched from.

#### Recommended: udev rule (least privilege)
Comment thread
EtienneLescot marked this conversation as resolved.

On systems where systemd-logind manages the local desktop seat, the safer approach is to grant that seat access (`TAG+="uaccess"`) exclusively to pointer devices (mice and touchpads) while explicitly excluding keyboards. This requires udev's `uaccess` support and ensures that only the actively logged-in seat user has access, without exposing your keyboard:

1. Create a udev rule file at `/etc/udev/rules.d/70-openscreen-mouse.rules` (the `70-` prefix is important so it runs before systemd's seat rules):

```bash
sudo usermod -aG input $USER
sudo tee /etc/udev/rules.d/70-openscreen-mouse.rules << 'EOF'
KERNEL=="event*", SUBSYSTEM=="input", ENV{ID_INPUT_MOUSE}=="1", ENV{ID_INPUT_KEYBOARD}!="1", TAG+="uaccess"
KERNEL=="event*", SUBSYSTEM=="input", ENV{ID_INPUT_TOUCHPAD}=="1", ENV{ID_INPUT_KEYBOARD}!="1", TAG+="uaccess"
EOF
```

2. Reload and apply the rules:

```bash
sudo udevadm control --reload-rules && sudo udevadm trigger --subsystem-match=input
```

Log out and back in for the new group to take effect. Nothing breaks without it — recording works exactly as it did before, and every cursor sample is simply recorded as a move.
You can verify that your user has access to mouse evdev nodes (e.g. `user:<your-username>:rw-`) with:

```bash
getfacl /dev/input/event*
```

#### Alternative: `input` group

Alternatively, you can add your user to the `input` group:

```bash
sudo usermod -aG input $USER
```

The scope is deliberately narrow: only the left mouse button (`BTN_LEFT`) is ever read, never keystrokes. To turn the reader off entirely even where the permission exists, set `OPENSCREEN_DISABLE_CLICK_CAPTURE=1` in the environment OpenScreen is launched from.
Log out and back in for the new group to take effect.

:::caution
The `input` group is not limited to OpenScreen: every program running as your user can then read every input device, keyboard included. Add yourself only if you accept that on this machine.
:::caution Security consideration
Adding your user to the `input` group grants all programs running under your user account ambient read access to **every** input device on the system, including keyboards (acting as an unprivileged keylogger). Using the udev rule above is recommended instead.
:::

**Touchpads:** only a physical click — pressing the pad down until it depresses — is recorded. **Tap-to-click is not**, because your compositor's input stack (libinput) synthesises those taps for its own use and never writes them back to the kernel device that OpenScreen reads, so there is nothing at the evdev layer to see. A mouse, or a touchpad with tap-to-click turned off, records every click.
Expand All @@ -152,7 +183,7 @@ The editing tools are the same everywhere — zooms, backgrounds, crop/trim/spee
| | macOS | Windows | Linux |
|---|---|---|---|
| Capture pipeline | Native (ScreenCaptureKit) | Native (Windows Graphics Capture) on build 19041 and later; browser fallback on older builds or without the helper | Native (PipeWire via the ScreenCast portal); browser fallback without the helper, losing hardware encode and cursor telemetry |
| Custom cursor / click effects | ✅ — clicks and cursor shape need the Accessibility permission | ✅ | ✅ on Wayland — click capture needs the `input` group ([details](#mouse-clicks-on-wayland)) |
| Custom cursor / click effects | ✅ — clicks and cursor shape need the Accessibility permission | ✅ | ✅ on Wayland — click capture needs mouse evdev permissions ([details](#mouse-clicks-on-wayland)) |
| Webcam | Browser capture, saved as a separate file (still works as PiP) | Native capture, saved as a separate file | Browser capture, saved as a separate file (still works as PiP) |
| System audio | Works out of the box; its own permission prompt on macOS 15.2+, covered by Screen Recording on older versions | Works out of the box | Needs PipeWire as the sound server (default on Ubuntu 22.10+, Fedora 34+) |
| MP4 export | ✅ | ✅ | ✅ — H.264 on the GPU through VAAPI when the GPU stack allows it (see the note below), software otherwise |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Unter Windows ist der [Microsoft Store](#windows) der empfohlene Weg. Auf allen
|---|---|---|
| **Windows** | Windows 10 Version 1903 (Build 18362) oder neuer, x64, Intel ab 8. Generation / AMD Ryzen ab Serie 2000. Die native Aufnahme braucht Windows 10 Version 2004 (Build 19041) oder neuer; ältere Builds nehmen über die [Browser-Aufnahme als Fallback](#platform-differences) auf | Windows 11, Intel ab 12. Generation / AMD Ryzen ab Serie 4000 |
| **macOS** | macOS 13 (Ventura), das ScreenCaptureKit für die Aufnahme voraussetzt. Die Mikrofonaufnahme braucht macOS 15 oder neuer | macOS 15.2 oder neuer |
| **Linux** | x64. `xdg-desktop-portal` und PipeWire, die die Aufnahme braucht: Das native Aufnahme-Hilfsprogramm läuft über sie, und schlägt dort etwas fehl, wird das als Fehler gemeldet. Die [Browser-Aufnahme als Fallback](#platform-differences) springt nur ein, wenn einem Build das Hilfsprogramm selbst fehlt. Systemaudio braucht zusätzlich PipeWire als Soundserver (Standard ab [Ubuntu 22.10](https://discourse.ubuntu.com/t/kinetic-kudu-release-notes/27976) und [Fedora 34](https://fedoraproject.org/wiki/Changes/DefaultPipeWire)). Damit unter Wayland Mausklicks aufgenommen werden, muss dein Benutzer in der Gruppe `input` sein, siehe [Mausklicks unter Wayland](#mouse-clicks-on-wayland) | Wie Minimum, jeweils aktuell |
| **Linux** | x64. `xdg-desktop-portal` und PipeWire, die die Aufnahme braucht: Das native Aufnahme-Hilfsprogramm läuft über sie, und schlägt dort etwas fehl, wird das als Fehler gemeldet. Die [Browser-Aufnahme als Fallback](#platform-differences) springt nur ein, wenn einem Build das Hilfsprogramm selbst fehlt. Systemaudio braucht zusätzlich PipeWire als Soundserver (Standard ab [Ubuntu 22.10](https://discourse.ubuntu.com/t/kinetic-kudu-release-notes/27976) und [Fedora 34](https://fedoraproject.org/wiki/Changes/DefaultPipeWire)). Damit unter Wayland Mausklicks aufgenommen werden, braucht dein Benutzer Lesezugriff auf die evdev-Geräte der Maus, siehe [Mausklicks unter Wayland](#mouse-clicks-on-wayland) | Wie Minimum, jeweils aktuell |
| **RAM** | 8 GB | 16 GB |

:::note Ältere integrierte Grafik unter Windows
Expand Down Expand Up @@ -129,18 +129,49 @@ Je nach Desktop-Umgebung musst du eventuell eine Berechtigung zur Bildschirmaufn

### Mausklicks unter Wayland {#mouse-clicks-on-wayland}

Wayland bietet kein Portal für Eingabeereignisse. OpenScreen liest das Drücken der linken Maustaste deshalb direkt über die evdev-Schnittstelle des Kernels (`/dev/input/event*`). Diese Gerätedateien gehören `root:input`. Eine Aufnahme kann einen Klick deshalb nur dann von einer normalen Cursorbewegung unterscheiden, wenn dein Benutzer in der Gruppe `input` ist:
Wayland bietet kein Portal für Eingabeereignisse. OpenScreen liest das Drücken der linken Maustaste deshalb direkt über die evdev-Schnittstelle des Kernels (`/dev/input/event*`). Standardmäßig sind diese Gerätedateien `root:input` vorbehalten. Eine Aufnahme kann einen Klick deshalb nur dann von einer normalen Cursorbewegung unterscheiden, wenn dein Benutzer sie lesen darf.

Ohne diesen Zugriff geht nichts kaputt: Die Aufnahme funktioniert genau wie vorher, und jede Cursorposition wird einfach als Bewegung aufgezeichnet.

Der Umfang ist bewusst eng: Die Klickerfassung nutzt nur das Drücken der linken Maustaste (`BTN_LEFT`) und ignoriert alle anderen Ereignisse, Tastatureingaben werden also nie aufgezeichnet. Um das Auslesen auch dort ganz abzuschalten, wo die Berechtigung besteht, setze `OPENSCREEN_DISABLE_CLICK_CAPTURE=1` in der Umgebung, aus der OpenScreen gestartet wird.

#### Empfohlen: udev-Regel (minimale Rechte) {#recommended-udev-rule-least-privilege}

Auf Systemen, auf denen systemd-logind den lokalen Arbeitsplatz (Seat) verwaltet, ist es sicherer, diesem Seat Zugriff (`TAG+="uaccess"`) ausschließlich auf Zeigegeräte (Mäuse und Touchpads) zu geben und Tastaturen ausdrücklich auszuschließen. Das setzt die `uaccess`-Unterstützung von udev voraus. Zugriff hat dann nur der gerade angemeldete, aktive Benutzer des Seats, und deine Tastatur bleibt außen vor:

1. Lege die udev-Regeldatei `/etc/udev/rules.d/70-openscreen-mouse.rules` an (das Präfix `70-` ist wichtig, damit sie vor den Seat-Regeln von systemd läuft):

```bash
sudo usermod -aG input $USER
sudo tee /etc/udev/rules.d/70-openscreen-mouse.rules << 'EOF'
KERNEL=="event*", SUBSYSTEM=="input", ENV{ID_INPUT_MOUSE}=="1", ENV{ID_INPUT_KEYBOARD}!="1", TAG+="uaccess"
KERNEL=="event*", SUBSYSTEM=="input", ENV{ID_INPUT_TOUCHPAD}=="1", ENV{ID_INPUT_KEYBOARD}!="1", TAG+="uaccess"
EOF
```

2. Lade die Regeln neu und wende sie an:

```bash
sudo udevadm control --reload-rules && sudo udevadm trigger --subsystem-match=input
```

Melde dich ab und wieder an, damit die neue Gruppe wirksam wird. Ohne sie geht nichts kaputt: Die Aufnahme funktioniert genau wie vorher, und jede Cursorposition wird einfach als Bewegung aufgezeichnet.
Ob dein Benutzer Zugriff auf die evdev-Gerätedateien der Maus hat (zum Beispiel `user:<dein-benutzername>:rw-`), prüfst du mit:

```bash
getfacl /dev/input/event*
```

#### Alternative: Gruppe `input` {#alternative-input-group}

Alternativ kannst du deinen Benutzer zur Gruppe `input` hinzufügen:

```bash
sudo usermod -aG input $USER
```

Der Umfang ist bewusst eng: Gelesen wird nur die linke Maustaste (`BTN_LEFT`), niemals Tastatureingaben. Um das Auslesen auch dort ganz abzuschalten, wo die Berechtigung besteht, setze `OPENSCREEN_DISABLE_CLICK_CAPTURE=1` in der Umgebung, aus der OpenScreen gestartet wird.
Melde dich ab und wieder an, damit die neue Gruppe wirksam wird.

:::caution
Die Gruppe `input` gilt nicht nur für OpenScreen: Danach kann jedes Programm, das unter deinem Benutzer läuft, alle Eingabegeräte auslesen, auch die Tastatur. Füge dich nur hinzu, wenn du das auf diesem Rechner akzeptierst.
:::caution Sicherheitshinweis
Mit der Gruppe `input` erhält jedes Programm, das unter deinem Benutzerkonto läuft, Lesezugriff auf **alle** Eingabegeräte des Systems, auch auf Tastaturen. Jedes dieser Programme könnte also deine Tastatureingaben mitschneiden. Empfohlen ist stattdessen die udev-Regel oben.
:::

**Touchpads:** Aufgenommen wird nur ein physischer Klick, bei dem du das Pad herunterdrückst, bis es nachgibt. **Tippen zum Klicken wird nicht aufgenommen**: Der Eingabe-Stack deines Compositors (libinput) erzeugt diese Taps für den eigenen Gebrauch und schreibt sie nie an das Kernel-Gerät zurück, das OpenScreen liest. Auf evdev-Ebene gibt es also nichts zu sehen. Mit einer Maus oder mit einem Touchpad, bei dem Tippen zum Klicken ausgeschaltet ist, wird jeder Klick aufgenommen.
Expand All @@ -152,7 +183,7 @@ Die Bearbeitungswerkzeuge sind überall gleich: Zooms, Hintergründe, Zuschneide
| | macOS | Windows | Linux |
|---|---|---|---|
| Aufnahme-Pipeline | Nativ (ScreenCaptureKit) | Nativ (Windows Graphics Capture) ab Build 19041; Browser-Fallback auf älteren Builds oder ohne das Hilfsprogramm | Nativ (PipeWire über das ScreenCast-Portal); Browser-Fallback ohne das Hilfsprogramm, dann ohne Hardware-Encoding und ohne Cursor-Telemetrie |
| Eigener Cursor / Klickeffekte | ✅, Klicks und Cursorform brauchen die Berechtigung „Bedienungshilfen“ | ✅ | ✅ unter Wayland, die Klickerfassung braucht die Gruppe `input` ([Details](#mouse-clicks-on-wayland)) |
| Eigener Cursor / Klickeffekte | ✅, Klicks und Cursorform brauchen die Berechtigung „Bedienungshilfen“ | ✅ | ✅ unter Wayland, die Klickerfassung braucht Zugriff auf die evdev-Geräte der Maus ([Details](#mouse-clicks-on-wayland)) |
| Webcam | Browser-Aufnahme, als separate Datei gespeichert (funktioniert trotzdem als Bild-im-Bild) | Native Aufnahme, als separate Datei gespeichert | Browser-Aufnahme, als separate Datei gespeichert (funktioniert trotzdem als Bild-im-Bild) |
| Systemaudio | Funktioniert ohne Einrichtung; eigene Berechtigungsabfrage ab macOS 15.2, in älteren Versionen durch „Bildschirmaufnahme“ abgedeckt | Funktioniert ohne Einrichtung | Braucht PipeWire als Soundserver (Standard ab Ubuntu 22.10, Fedora 34) |
| MP4-Export | ✅ | ✅ | ✅, H.264 auf der GPU über VAAPI, wenn der Grafik-Stack es zulässt (siehe Hinweis unten), sonst in Software |
Expand Down
Loading
Loading