文章更新
- 2022-12-08: 使用 Fcitx4 和 搜狗输入法
- 2023-03-04: 更新为 Fcitx5 和 Rime 输入法
系统信息
- Ubuntu 22.10 kinetic
安装 Fcitx5 输入法框架
# 更新系统
sudo apt update && apt upgrade -y
# 安装 Fcitx5 输入法框架
sudo apt install fcitx5 -y
# 安装 Fcitx5 框架和必要组件
sudo apt install fcitx5 fcitx5-frontend-qt5 fcitx5-frontend-gtk3 fcitx5-frontend-gtk2 fcitx5-chinese-addons
# 安装 Fcitx-rime 输入法
sudo apt install fcitx5-rime
系统设置中添加中文
英文系统:
- Settings -> Region & Language -> Manage Installed Languages -> Add/Remove Languages -> Chinese(Simplified) -> Apply & Apply System-Wide
- On the bottom of the window, click the drop-down menu and select
Fcitx5as theKeyboard input method systemand clickApply System-Widebutton. Then clickClosebutton. - Reboot the system (or logout and login again)
- After reboot, click the
keyboardicon on the top right corner of the screen, click theconfiguremenu and uncheck theOnly Show Current Languageoption. - Type
rimein the search box and double click theRimeoption to add it to the input method list. - Switch to
Global optionstab to set the hotkey to switch input method. (Ctrl + Left Shift) - Click the
Applybutton andclosethe window.
中文系统:
- 设置 -> 区域与语言 -> 已安装的语言 -> 添加/删除语言 -> 简体中文 -> 应用 -> 应用系统范围
- 在窗口底部,点击下拉菜单,选择
Fcitx5作为键盘输入法系统,然后点击应用系统范围按钮。然后点击关闭按钮。 - 重启系统(或注销并重新登录)
- 重启后,点击屏幕右上角的
键盘图标,点击配置菜单并取消选中仅显示当前语言选项。 - 在搜索框中输入
rime,并双击Rime选项将其添加到输入法列表中。 - 切换到
全局选项选项卡,设置切换输入法的热键。(Ctrl + 左 Shift) - 点击
应用按钮并关闭窗口。
(可选) 卸载 ibus 输入法系统
sudo apt purge ibus -y # 卸载 ibus
sudo apt autoremove -y # 卸载依赖
设置输入方案
Option 1
在切换到 RIME 输入法后,输入法默认为繁体中文,需要手动切换为简体中文。
键入任意字符后在候选字菜单,按下F4键,选择明月拼音-简化字,即可切换为简体中文。
Option 2
鼠标点击屏幕右上角的输入法图标后,选择 Rime 输入法,然后再次点击输入法图标,在第二个菜单区域,选择明月拼音,即可展开所有的可用的输入方案,选择明月拼音-简化字,即可切换为简体中文。
安装额外的输入法词库
下面的仓库是我常用的 Rime 输入法简体中文词库,由作者 iDvel 维护,感谢作者的付出。
cd ~/.local/share/fcitx5/rime
git clone https://github.com/iDvel/rime-ice && mv rime-ice/* . && rm -rf rime-ice
然后点击状态栏的输入法图标,选择Rime输入法,然后再次点击输入法图标,点击Deploy(部署)即可部署词库,等待部署完成后,选择雾淞拼音作为输入方案。
输入法配置文件修改
cd ~/.local/share/fcitx5/rime
vim default.yaml
注意:修改完后,需要重新部署才能生效。