Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

fix(linux): link libgobject-2.0 for AT-SPI2 text monitor build

iSparsh1d1bcf8dc5ae
diff --git a/.github/workflows/build-linux-text-monitor.yml b/.github/workflows/build-linux-text-monitor.yml
index fae3d3b77..7180e5f7c 100644
--- a/.github/workflows/build-linux-text-monitor.yml
+++ b/.github/workflows/build-linux-text-monitor.yml
@@ -30,12 +30,16 @@ jobs:
- name: Compile Linux Text Monitor
run: |
- gcc -O2 resources/linux-text-monitor.c -o linux-text-monitor $(pkg-config --cflags --libs atspi-2)
+ gcc -O2 resources/linux-text-monitor.c -o linux-text-monitor $(pkg-config --cflags --libs --static atspi-2)
- name: Verify binary
run: |
file linux-text-monitor
- test -f linux-text-monitor || { echo "Binary not found"; exit 1; }
+ test -x linux-text-monitor || { echo "Binary not found or not executable"; exit 1; }
+ ldd linux-text-monitor
+ ldd linux-text-monitor | grep -q "not found" && { echo "Unresolved shared library dependency"; exit 1; }
+ ldd linux-text-monitor | grep -q libgobject-2.0.so || { echo "libgobject-2.0 not linked - pkg-config --static flag may have regressed"; exit 1; }
+ exit 0
- name: Create tar.gz archive
run: |
diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md
index b45e8eb90..54183b85c 100644
--- a/TROUBLESHOOTING.md
+++ b/TROUBLESHOOTING.md
@@ -136,6 +136,19 @@ OpenWhispr tries clipboard methods in order: `wl-copy` (most reliable) → rende
4. Restart OpenWhispr and start meeting transcription again
5. No screen-share chooser is expected for Linux system audio; OpenWhispr captures the default sink monitor directly through PipeWire
+### Linux Auto-Learn Correction (AT-SPI2) Issues
+
+**Symptoms:** Auto-learn correction (Settings → Dictionary) never updates the custom dictionary after an edit, with no error shown, on Linux sessions other than GNOME.
+
+**Fix:**
+
+1. GTK/Gecko apps (Firefox, Claude Desktop, etc.) only register with AT-SPI2 when `org.gnome.desktop.interface toolkit-accessibility` is enabled — this is off by default on non-GNOME sessions (niri, Hyprland, sway, KDE). Enable it:
+ ```
+ gsettings set org.gnome.desktop.interface toolkit-accessibility true
+ ```
+2. Restart the target app (Firefox, etc.) after enabling — the flag is read once at startup, not watched live.
+3. This affects only apps that don't expose their accessibility tree; apps that do keep working as before, and unsupported apps simply skip correction learning silently rather than erroring.
+
### Meeting Transcription Issues
**Symptoms:** Meeting detection not working, no transcription, audio not captured
diff --git a/resources/linux-text-monitor.c b/resources/linux-text-monitor.c
index fde5dee78..2cd3448dd 100644
--- a/resources/linux-text-monitor.c
+++ b/resources/linux-text-monitor.c
@@ -17,7 +17,12 @@
* First line: original pasted text (informational)
*
* Compile:
- * gcc -O2 linux-text-monitor.c -o linux-text-monitor $(pkg-config --cflags --libs atspi-2)
+ * gcc -O2 linux-text-monitor.c -o linux-text-monitor $(pkg-config --cflags --libs --static atspi-2)
+ *
+ * Note: --static is required because atspi-2.pc lists gobject-2.0 under
+ * Requires.private rather than Requires, so a plain `pkg-config --libs`
+ * omits -lgobject-2.0 and fails to link with linkers defaulting to
+ * --as-needed (e.g. current Ubuntu/Arch toolchains).
*/
#include <stdio.h>
diff --git a/scripts/build-linux-text-monitor.js b/scripts/build-linux-text-monitor.js
index f789b5cd1..420cb7a4e 100644
--- a/scripts/build-linux-text-monitor.js
+++ b/scripts/build-linux-text-monitor.js
@@ -113,7 +113,7 @@ function getPkgConfigFlags() {
});
if (check.status !== 0) return null;
- const result = spawnSync("pkg-config", ["--cflags", "--libs", "atspi-2"], {
+ const result = spawnSync("pkg-config", ["--cflags", "--libs", "--static", "atspi-2"], {
stdio: ["pipe", "pipe", "pipe"],
env: process.env,
});