文章更新
- 2022-12-08: 使用 Fcitx4 和 搜狗輸入法
- 2023-03-04: 更新為 Fcitx5 和 Rime 輸入法
系統資訊
Ubuntu 22.10
安裝 Fcitx5 輸入法框架
# 更新系統
sudo apt update && apt upgrade -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
注意:修改完後,需要重新部署才能生效。