Skip to content

v0.6.2 — clipboard text entry (fixes the Chromium crash)

Choose a tag to compare

@javimosch javimosch released this 12 Aug 15:53
· 4 commits to main since this release

Fixes #4: the default text-entry path crashed the browser it was typing into.

The bug

AT-SPI key synthesis (atspi_generate_keyboard_event) crashes Chromium/Edge launched with --force-renderer-accessibility. Reproduced on a bare <input> page with focus verified — 3/3 times, payloads of 11/16/112 chars. Since that flag is the only way to make a browser expose web content to AT-SPI, the crash landed exactly where the tool is most useful. sendtext even reported ok:true while the target died.

The fix

Text entry now goes through the clipboard by default: set the CLIPBOARD selection, send ctrl+v via XTEST, restore the previous clipboard. That path never touches the AT-SPI input controller.

Measured A/B on the repro page, focus confirmed on the input:

mechanism result
default (clipboard+ctrl_v) text lands, browser alive
sendtext --via atspi browser dead
  • sendtext --via auto|clipboard|atspiauto (default) prefers the clipboard when xclip is present, and warns loudly on stderr when it must fall back.
  • type <ref> uses the clipboard for its fallback, and now verifies the element actually took focus first — grab_focus silently does nothing on some web elements, and typing into an unknown focus is how a stray space presses whatever button is focused.
  • paste <text> remains the explicit clipboard command.
  • doctor reports clipboard_backend and text_entry_actual, and flags a missing xclip as a problem rather than letting it silently degrade.

Upstream

Not linux-use's bug to fix — worth reporting to at-spi2-core/Chromium once a minimal C repro exists. Environment: Ubuntu 22.04.3, at-spi2-core 2.44.0, Edge 151.0.4129.72, X11.

Install

curl -L -o linux-use https://github.com/javimosch/linux-use/releases/download/v0.6.2/linux-use-v0.6.2-x86_64-linux
chmod +x linux-use && sudo mv linux-use /usr/local/bin/
sudo apt install libatspi2.0-0 libxtst6 libx11-6 libglib2.0-0 xclip
linux-use doctor && linux-use guide

sha256: 60e874cfdad46218e794a1306b1564be68ad97386b0eac957c2831263a780a07

Full Changelog: v0.6.0...v0.6.2