Managing Rime User Dictionaries on Linux
Rime input method engine stores personal phrases, custom text expansions, and vocabulary weights in dedicated user directories. This guide covers file paths, custom phrase configuration, and deployment on Linux systems.
1. Directory Paths
The storage path depends on the active input method framework:
- Fcitx5 (
fcitx5-rime)
~/.local/share/fcitx5/rime/
- IBus (
ibus-rime)
~/.config/ibus/rime/
- Fcitx4 (
fcitx-rime)
~/.config/fcitx/rime/
2. Dynamic Dynamic User History (*.userdb)
Internal user history, including learned word frequencies and self-developed phrases, resides in folders ending with .userdb/ (e.g., luna_pinyin.userdb/). These binary databases adjust automatically based on input habits. Manual editing of these folders is not recommended.
3. Static Custom Phrases (custom_phrase.txt)
For persistent shortcuts, such as email addresses, code snippets, or long phrases, a static plain text file is the standard solution.
Configuration Steps
- Navigate to the appropriate
rime/directory. - Create or open a file named
custom_phrase.txt. - Add entries using a strict Tab-separated format:
# Format: Phrase [Tab] Code [Tab] Weight
example@gmail.com mailg 100
work_account@gmail.com mailg 90
hello_world_template hw 10
Key Rules
- Separators: Fields must be separated by a single Tab character, not spaces.
- Duplicate Codes: Multiple phrases can share the exact same code.
- Weights: The third column determines the order in the candidate list. Higher numbers appear first.
4. Applying Changes
Rime requires a compilation step to parse new plain text rules into its runtime binary format.
- Trigger Deployment: Click the Rime icon in the system tray and select Deploy, or use the keyboard shortcut
Ctrl + Option + ``(orF4) depending on the desktop environment configuration. - Verification: The input engine restarts momentarily, after which the newly defined shortcuts become available in the candidate window.