Skip to content

Text hooking on Linux and Steam Deck

Textractor and LunaTranslator are Windows-only programs, so on Linux you normally have to run them inside the game’s own Wine or Proton prefix yourself. Kimochi runs them for you. 💪

Published · Updated

Kimochi is a free, open-source app for reading games in Japanese (and other languages!). Text hooking means using another program to read a game’s text from inside the game instead of off the screen. Install Kimochi on Linux or Steam Deck.

How it works

  • Kimochi runs LunaHook with the game’s own Proton or Wine, inside the game’s prefix. Neither hooker comes with Kimochi: the first time you hook a game, it downloads LunaHook (about 6 MB).
  • It hooks Windows games run through Steam (Proton) or a Wine launcher such as Lutris, Bottles or Heroic. Since Kimochi 1.0.0, games run through Flatpak apps can be hooked too, and since 1.1.0 so can games in NixOS Steam’s own Wine sessions (that needs nsenter from util-linux).
  • A hooked game sends several streams of text, called threads: the dialogue, the speaker’s name, menus. The first time, Kimochi picks the dialogue by reading the game’s window with a local OCR engine and matching each thread against what’s on screen. Pick another thread if it got it wrong; your choice is remembered for the game.
  • Each line lands in the Log and, with the overlay on, in a card over the game’s own text, where you can look its words up.

Start the game, choose its window in Kimochi’s sidebar, and turn on Text hooking under its card. The switch is kept for each game, so next time it hooks straight away. The full guide is Text hooking in the docs.

On the Steam Deck, in Gaming Mode

  1. Install Kimochi once from Desktop Mode (Steam Deck install, or step by step in the docs), and let it add itself to your Steam library.
  2. In Gaming Mode, start Kimochi from your library, then your game. Choose the game in Kimochi’s Source tab.
  3. Back in the game, press R4 (the upper right back button) for Kimochi’s controller menu. While you’re hooking a game it starts on Read along: step through the line’s words with the D-pad, and each one’s dictionary entry opens. Its Text Hooker item has the card’s settings.

See Gaming Mode in the docs.

Sentence audio from the game itself (Audio hooking)

With Text hooking on, Audio hooking takes each line’s voice straight from the game for its Anki sentence audio, without the music or sound effects. When a line’s voice can’t be taken from the game, Kimochi records it from your speakers instead.

What can’t be hooked

Only Windows games can be hooked. These can’t:

  • Native Linux games. If a game also has a Windows version on Steam, you can run that instead: the game’s Properties → Compatibility → Force the use of a specific Steam Play compatibility tool.
  • Linux on ARM64 computers.
  • Games built for ARM64 (a game must be a 32- or 64-bit x86 program), and apps that are protected or running as administrator.
  • macOS, which has no Text hooking.

For those, read the game with OCR, or feed Kimochi from a texthooker you run yourself, over WebSocket or the clipboard.

Already use Textractor, LunaTranslator or Agent?

Kimochi stands on their shoulders. Its hooker is LunaHook, from LunaTranslator, and Textractor is its fallback. What Kimochi adds is running them in the right prefix for you, picking the dialogue, and putting the lines over the game.

If you’d rather keep your own hooker, such as Textractor, LunaTranslator or Agent, point Kimochi at it over WebSocket (any texthooker that sends its text over a WebSocket works), or have it copy each line to the clipboard. See Texthookers and clipboard. And if you want a different workflow altogether, GameSentenceMiner has its own text hooking and advanced Anki card enrichment; the comparison has more.

Questions

Can I use Textractor on Linux?

Yes, inside the game’s Wine or Proton prefix. Kimochi does that for you with LunaHook (the hooker from LunaTranslator), and falls back to Textractor if LunaHook can’t hook the game.

Does text hooking work in Steam Deck Gaming Mode?

Yes. Choose the game in Kimochi’s Source tab.

Gaming Mode in the docs

Does it work with Lutris, Heroic or Bottles?

Yes, for Windows games run through Wine.

Is it free?

Yes. Kimochi is free and open source (GPL-3.0), and needs no account.

Hooking or OCR: which should I use?

Hook the game when it can be hooked: you get the exact text the game wrote, with no OCR misreads. Use OCR for everything else.

Reading with OCR

More answers about Kimochi in the FAQ.

Textractor, LunaTranslator, LunaHook, Agent and GameSentenceMiner belong to their own authors and aren’t affiliated with Kimochi.