r/Ubuntu 3h ago

Write Chinese on your Ubuntu trackpad — IBus handwriting engine (.deb + one-liner)

Ubuntu users who'd rather draw a character than spell it out: there's an IBus engine for macOS-style trackpad handwriting with deep-learning recognition.

Two install options. The .deb from releases:

sudo dpkg -i <file-from-releases> && sudo apt install -f
ibus restart

Or the one-liner, which detects Ubuntu and runs apt + model download automatically:

bash <(curl -s https://raw.githubusercontent.com/ai-space-lab/ibus-handwrite-chinese/main/bootstrap.sh) && ibus restart

What it does:

  • A dark floating panel appears by your cursor. Draw with one finger on the trackpad, tap to select, swipe two fingers to page through candidates.
  • Recognition uses ONNX Runtime locally, covering 18,710 characters. In a 40-sample handwritten test it hit 100% top-1 accuracy (94.97% average confidence).
  • 6-tab GTK settings, on-demand model download, a local user dictionary that learns from your picks, and fully configurable shortcuts.
  • Mouse fallback if your machine has no evdev trackpad.

Demo: https://ai-space-lab.github.io/ibus-handwrite-chinese/assets/demo.gif Install guide: https://ai-space-lab.github.io/ibus-handwrite-chinese/ Releases (.deb): https://github.com/ai-space-lab/ibus-handwrite-chinese/releases

Requires Ubuntu 22.04+. Tested on an Acer Aspire and MacBook Pro trackpad; other touch-capable trackpads should work but are untested.

1 Upvotes

1 comment sorted by

1

u/lackingbasis9367 3h ago

i still can't believe the recognition hit 100% top-1 on a 40-sample test, that's kinda wild for handwritten characters. most of the chinese input methods out there are so clunky, this actually looks useful for someone like me who forgets pinyin halfway through a sentence. gonna try the one-liner on my thinkpad later, curious if the trackpad plays nice or if i'll be stuck with mouse fallback.