三件套:
- librime —— 引擎本体,C++ 写的库形式。Debian 13 / Ubuntu 26.04 上打包成
librime1t64加librime-datameta 包(meta 包在/usr/share/rime-data/default.yaml里塞了一个schema_list: [luna_pinyin, cangjie5]的默认配置)。这就是引擎的全部。 - fcitx5-rime —— 跟 fcitx5 框架的绑定。会把 librime 拉为依赖。Ubuntu 26.04 上是
fcitx5-rime 5.1.13-1;Debian 13 上同一个包名只是版本号不一样。源码:github.com/fcitx/fcitx5-rime。 - 可选:librime-plugin-lua —— 只有你要用 Lua 过滤器(自定义词组、内联英文补全、rime-ice/rime-wanxiang 的高级特性)才需要。Debian 13 上叫
librime-plugin-lua;旧版 Ubuntu 仓库里可能还叫librime-lua。
五笔这一块还需要 rime-wubi 本身,它提供 schema 文件。官方仓库(github.com/rime/rime-wubi)提供三个 schema:纯五笔的 wubi86.schema.yaml、输出繁体的 wubi_trad.schema.yaml、以及混输版 wubi_pinyin.schema.yaml(五笔·拼音)。这几个 apt 都没,需要 Plum 装。
第 1 步 —— 装(Debian 13 / Ubuntu 26.04)
sudo apt update
sudo apt install fcitx5 fcitx5-rime fcitx5-frontend-gtk3 fcitx5-frontend-gtk4
fcitx5-frontend-qt5 fcitx5-frontend-qt6 fcitx5-configtool
# 可选:要用 Lua 版的社区 schema 就加
sudo apt install librime-plugin-luaGNOME Wayland / KDE Plasma 6 下要 fcitx5 让应用能识别它,必须先设四个环境变量(不然只有 X11 应用能识别):
sudo tee /etc/environment.d/fcitx5.conf > /dev/null << 'EOF'
GTK_IM_MODULE=fcitx5
QT_IM_MODULE=fcitx5
XMODIFIERS=@im=fcitx5
INPUT_METHOD=fcitx5
EOFfcitx5 在登录时自动启动(GNOME Wayland 默认不会替你起):
mkdir -p ~/.config/autostart
cp /usr/share/applications/org.fcitx.Fcitx5.desktop ~/.config/autostart/
# GNOME 上还要开 AppIndicator 扩展
gnome-extensions enable ubuntu-appindicators@ubuntu.com注销再登。跑 fcitx5-configtool,点 +,搜 Rime,添加,移到激活列表最上面,保存。
这一瞬间你会看到 RIME is not configured —— 这正常。框架在了,引擎是空的。下面填。
第 2 步 —— 装 Plum
Plum 是 RIME schema 库的一键安装器。不在 apt(作者明确说过不会进 apt),要 curl-and-bash:
sudo apt install git # 没用过 git 才装
curl -fsSL https://raw.githubusercontent.com/rime/plum/master/rime-install | bashPlum 会在 ~/plum/ 留个目录,外加几个工具在 ~/.local/bin。验证:
which rime-install
rime-install --list-presets # 看可用的 preset tier层级命名约定::preset 默认精选集合;:extra 加一点相对小众的;:all 全要。五笔选 :preset 加 wubi 就行。
第 3 步 —— 装五笔 schema 和它的依赖
混输版 wubi_pinyin.schema.yaml 依赖 pinyin_simp(GitHub 上叫 rime-pinyin-simp)。Plum 会自动拉依赖,但装完了不替你启用(启用在第 5 步):
rime_frontend=fcitx5-rime bash rime-install wubi pinyin-simp
# 安装:wubi86.schema.yaml、wubi_trad.schema.yaml、wubi_pinyin.schema.yaml、
# wubi86.dict.yaml(~2 MB)、pinyin_simp.schema.yaml、pinyin_simp.dict.yaml
# 文件落在 ~/.local/share/fcitx5/rime/如果你还想要全拼备份(带智能排序、会英文候选):
bash rime-install luna-pinyin
# 安装:luna_pinyin.schema.yaml、luna_pinyin_simp.schema.yaml、luna_pinyin_fluency.schema.yaml可选但 2026 年值得知道的几个(都要 librime-plugin-lua):
bash rime-install iDvel/rime-ice # 霧凇拼音:长时间维护的精选词库 + 9 个 schema
bash rime-install gaboolic/rime-frost:others/recipes/full # 白霜拼音:7.45 亿字语料重训的词频,2026 SOTA
bash rime-install amzxyz/rime-wanxiang # 萬象拼音:2 亿规模 .gram 语模Frost 和 Wanxiang 都在 2025 年从零重训词频,是 2026 年开源 RIME 词库的第一梯队。新装挑这两个之一;想要可玩性最高的社区配置挑 ice;想贴近默认挑 Luna。
第 4 步 —— 混输机制(wubi_pinyin 到底在干啥)
打开 Plum 刚装的 schema 文件:
less ~/.local/share/fcitx5/rime/wubi_pinyin.schema.yaml相关块:
abc_segmentor:
extra_tags:
- reverse_lookup
reverse_lookup:
dictionary: pinyin_simp
prefix: "`"
suffix: "'"
tips: 〔拼音〕
recognizer:
import_preset: default
patterns:
reverse_lookup: "`[a-z]*'?$"合起来读:
- 主
table_translator用wubi86当字典 —— 你不加任何前缀打的每一键都去查五笔 86 根表。 - 第二个
reverse_lookup_translator注册了reverse_lookup这个 tag。当 recognizer 触发(pattern^`[a-z]*'?$—— 反引号开头、单引号收尾、中间只有 ASCII 字母),引擎把这段 buffer 交给pinyin_simp字典查。 - 两个翻译器命中的候选合在同一个候选列表里。没有模式切换。
disable_user_dict_for_patterns: "^z.*$"这行的意思是 RIME 不会让你打z-开头的内容污染个人词库(在纯wubi86里z是单字反查的快捷键 —— 在wubi_pinyin里已经用不上,所以忽略)。
实战对应:
| 你打 | 引擎做的事 |
|---|---|
wg |
查 wg 在 wubi86 里。候选:我、什、拿等 |
wg `ni' | 同时查 wg 在 wubi86 和 `ni' 在 pinyin_simp。候选合在一起 |
|
wgn(不存在的码) |
wubi86 查不到。跟下一个拼音触发自然衔接 |
`hainihaoniu(单 token,无收尾撇) | recognizer 不触发,整段在 wubi86 里查不到。删一格补上 ' |
几乎每个人都踩的坑:以为 wubi_pinyin 跟 wubi86 一样用 z 前缀。不对。z 是 wubi86 的单字反查快捷键,跟 wubi_pinyin 无关。wubi_pinyin 整个设计目标就是「你不需要那个模式切换」。
想要五笔 86 混输:你就要 wubi_pinyin 当主引擎。如果想要五笔 98 + 拼音混输,Debian/Ubuntu 上只有 fcitx5 的 wbpy schema 兜底,对比看上一篇。
第 5 步 —— 把装的启用
建用户 overlay。RIME 通过读 default.custom.yaml 叠在系统 default.yaml 上来合并所有配置。没这个文件,装了的 schema 对引擎不可见:
mkdir -p ~/.local/share/fcitx5/rime写 ~/.local/share/fcitx5/rime/default.custom.yaml。schema 顺序就是优先级,第一个是 RIME 启动时进的:
patch:
schema_list:
- schema: wubi_pinyin
- schema: wubi86
- schema: luna_pinyin
- schema: double_pinyin_flypy
menu/page_size: 9
switcher/hotkeys:
- Control+grave
- Control+Shift+gravemenu/page_size: 9 把可见候选数从默认 5 提到 9。Control+grave 是标准的 schema 切换热键。
部署。RIME 只有被要求重建时才读它的 YAML:
# 方法 1:GUI 托盘 → Rime → 部署 (Deploy)
# 方法 2:CLI:
rime_deployer --build按完 Control+grave 仍然不见新 schema,看一下文件是不是真落盘:
ls ~/.local/share/fcitx5/rime/
# 应该看到:default.custom.yaml、wubi_pinyin.schema.yaml、wubi86.dict.yaml ...试着打字。候选栏应该能用五笔码出字;打 `ni 加 ' 应该能拉出拼音候选。
第 6 步 —— 真正值得知道的 11 个定制点
这些放在 default.custom.yaml(全局)或 <schema>.custom.yaml(per-schema overlay)。两份都定义了同一 key 时 per-schema 优先。
加自定义词组
RIME 通过「我选过这个候选」自动学词组。常打的高频捷径,往 <schema>.userdb.txt 里写:
# ~/.local/share/fcitx5/rime/wubi_pinyin.userdb.txt
# 格式:syl<TAB>phrase<TAB>weight
nianhai 你好 100
ssch 随时随地 100然后 rime_deployer --build。这些词组打触发码会出现在候选列表最前面。
Shift_L 改成「提交码 + 切英文」
fcitx5-rime 默认把 Shift_L 绑成「切换英文模式」,意味着你在 buffer 里按 Shift 时会清空预编辑。改成:
patch:
ascii_composer:
switch_key:
Shift_L: commit_code
Shift_R: commit_code
Eisu_toggle: clearShift 现在是「提交 buffer + 切 ASCII」双动作,你打的字不会丢。
多看几个候选
patch:
menu/page_size: 9 # 默认 5,最大 10
menu/alternative_select_labels: ["1","2","3","4","5","6","7","8","9"]内联英文补全(rime-ice / rime-frost 风格)
这条对 wubi_pinyin 不适用 —— Lua fuse 跟 wubi 拼装起来不平凡。能做的:装个已经把这条内置好的社区 schema(rime-ice → melt_eng,rime-frost → melt_eng),加进 schema_list:
schema_list:
- schema: rime_ice # 或 frost_simp / wanxiang / 等
- schema: wubi_pinyinrime_ice 的 melt_eng translator 在 pinyin 形态里触发;但 wubi_pinyin 的形态不是拼音,所以五笔码不触发。把英文 fuse 当拼音 schema 的福利用。
打字时快速切 schema
Control+grave 打开 schema / 选项菜单。想直接跳到某个 schema,给 default.custom.yaml 加 key_binder:
patch:
key_binder:
bindings:
- {accept: "Control+1", select: ".next", when: always}
- {accept: "Control+2", toggle: ascii_mode, when: always}select: ".next" 是循环下一个(到末尾绕回开头);.prev 是反向。
流式繁简切换
wubi_pinyin 默认没暴露 simplification 这种 switch。装 rime-prelude 的 OpenCC 配置再覆盖:
patch:
__include: opencc:/ # 引入 OpenCC simplifer
switches:
- name: simplification
reset: 0然后 F4(或 Control+grave)选项菜单里会出现「汉字 / 漢字」切换。
取消 Space 在选词态的分页
默认行为:Space 提交第 1 候选,Tab 移到下个候选。如果你想按一次 Space 就直接 commit:
patch:
key_binder:
bindings:
- {accept: "space", send: Escape, when: composing}
- {accept: "Return", send: Return, when: composing}先按 ESC 取消 preedit,下个 app 键事件当 ASCII 处理。
自定义 ASCII 切换键
patch:
ascii_composer:
switch_key:
Caps_Lock: commit_code
Shift_L: commit_code
Shift_R: commit_codeCaps_Lock 是不提交的纯切换(中文段落里临时打英文用)。
用户词典跨机同步
RIME 自带 sync,配置写到 installation.yaml(自动生成,不手写 —— rime_deployer --build 会创建)。开 sync:
patch:
sync_dir: /dropbox/rime-sync # 或其他同步目录
sync_user_dir: same
# 支持的 syncer:dropbox、nutstore 等
# (查 librime 编译期支持:ldd 看 librime.so 链了哪些 syncer)你装 fcitx5-rime 时如果 librime 是带所有 sync backend 的版本就行。
手动装第三方 schema(绕过 Plum)
有时候 Plum 对一个 recipe 卡死。退回手动装:
git clone --depth=1 https://github.com/iDvel/rime-ice.git
cp -r rime-ice/cn/full/* ~/.local/share/fcitx5/rime/
# 只加你想要的 schema 到 schema_list
rime_deployer --buildcp -r 没事:RIME 重复自动跳过,取最后写的那个。别把 .git 拷进 rime 目录(引擎不在乎,但 ~/ 你看着办)。
重置一切
配置搞砸了:
mv ~/.local/share/fcitx5/rime ~/.local/share/fcitx5/rime.bak.$(date +%s)
rime_deployer --build
# 引擎 reload,只剩系统默认。然后重新跑第 5 步。
第 7 步 —— 排错:几种常见的炸了
每一种都咬过谁。
“RIME is not configured” / 没候选
原因:引擎装了,但 default.custom.yaml 不存在,或里头没 schema_list。修:建文件(第 5 步)然后 deploy。
新 schema 在 Control+grave 看不见
原因:Plum 把 .yaml 文件放下了,你忘跑 rime_deployer --build(或托盘菜单 deploy)。文件在了,但引擎没读。修:deploy。
自定义词组重启后没了
原因:编辑了 <schema>.userdb.txt,文件格式错,或者 deploy 没跑。修:确认 tab-separated 音节<TAB>词组<TAB>权重,再 deploy。重启后看 <schema>.userdb.txt 还是空的?查 ~/.local/share/fcitx5/rime/build/ 里有没有过期的 *.bin,那个会盖掉你的 dict。
五笔拼音混输”不工作”
原因:最常见的是你打了 `ni 没加收尾撇号。recognizer pattern 是 `[a-z]*'?$ —— 那个 ' 是强制的。不加 ' 引擎会以为你还要继续打字,buffer 一直涨。修:补 '。另一种可能:pinyin-simp 没装干净,跑 bash rime-install pinyin-simp,查 ~/.local/share/fcitx5/rime/pinyin_simp.dict.yaml 在不在。
fcitx5 吞 Shift 切换了 ASCII
原因:ascii_composer 默认行为。修:按上面”Shift_L 改成提交码 + 切英文”那段。改完重启 fcitx5(fcitx5-ctl restart)。
Wayland:托盘在,什么都打不进去
原因:env vars 没被应用读走。修:在当前 Wayland session 里跑 systemctl --user restart fcitx5,确认 /etc/environment.d/fcitx5.conf 那四行在。
2026 年初系统更新后 fcitx5-rime 在 Arch / CachyOS 炸了(4 月份)
CachyOS 给 librime 提了 ABI 版本,跟 fcitx5-rime 对不上。临时修法(2026-04):把 librime 钉到 LTS 版,确保 default.yaml 的 schema_list 显式写出来。Debian/Ubuntu 上没复现,看到 “undefined symbol” 来自 librime,跑 apt policy librime1t64 钉一下。
下一篇
如果你读到了这里,理论上你已经有一个完整可控的 RIME 栈了。两篇续作值得写:
- rime-ice / rime-frost / rime-wanxiang 横评 —— 三个都内置精选的
default.custom.yaml,可以直接 fork。对比你用同样三个词频训练源时谁更贴你日常。 - 跨 Linux + macOS + Windows 同步用户词典 —— librime 的
sync_dir+ Dropbox 看着简单,目录命名(userdb.txtvs 各 schema 自己的文件名)会坑人。
评论区告诉我哪个更想先看。
参考资料(2026 年 7 月核对):github.com/rime/rime-wubi/blob/master/wubi_pinyin.schema.yaml(master branch:prefix: `、suffix: ”’、dependencies[pinyin_simp])、packages.ubuntu.com/resolute/fcitx5-rime(5.1.13-1)、github.com/rime/plumREADME、github.com/fcitx/fcitx5-rimeREADME、github.com/rime/librime` releases(stable 1.16.1 / upstream 1.17.0)。
评论