📖 Fedora輸入法安裝與設定

分類:桌面應用 | 作者:pake | 發布時間:2024-11-01 23:27

Fedora Linux 中文輸入法設定指南

Fedora Linux 支援多種中文輸入法,例如 IBus(Intelligent Input Bus)Fcitx(Flexible Input Method Framework)Rime(中州韻輸入法)。本篇將介紹如何安裝、設定與最佳化中文輸入法,以確保流暢的輸入體驗。


目錄


安裝與切換輸入法框架

Fedora 預設使用 IBus 作為輸入法框架,但可以選擇 Fcitx5Rime 來獲得更好的輸入體驗。

檢查當前輸入法框架

echo $XMODIFIERS

若顯示 @im=ibus,表示 IBus 為目前的輸入法框架。

安裝 IBus 與 Fcitx5

sudo dnf install ibus ibus-libpinyin ibus-table-chinese ibus-gtk3 ibus-gtk4 -y
sudo dnf install fcitx5 fcitx5-chinese-addons fcitx5-gtk -y

切換至 IBus

echo "export GTK_IM_MODULE=ibus" >> ~/.bashrc
echo "export QT_IM_MODULE=ibus" >> ~/.bashrc
echo "export XMODIFIERS=@im=ibus" >> ~/.bashrc
source ~/.bashrc

切換至 Fcitx5

echo "export GTK_IM_MODULE=fcitx" >> ~/.bashrc
echo "export QT_IM_MODULE=fcitx" >> ~/.bashrc
echo "export XMODIFIERS=@im=fcitx" >> ~/.bashrc
source ~/.bashrc

設定 IBus 輸入法

啟動 IBus 設定工具

ibus-setup

添加中文輸入法

  1. 開啟 ibus-setup
  2. 選擇 "Input Method" 頁籤
  3. 點擊 "+",搜尋並添加 "Chinese - Intelligent Pinyin""Chinese - Wubi"

重新啟動 IBus

ibus restart

測試輸入法

Super + Space(或 Ctrl + Space)切換輸入法,嘗試輸入中文。


設定 Fcitx5 輸入法

啟動 Fcitx5 設定工具

fcitx5-configtool

添加中文輸入法

  1. 開啟 fcitx5-configtool
  2. 點擊 "+",搜尋並添加 "Pinyin""Wubi"

重新啟動 Fcitx5

fcitx5 -r &

設定開機自動啟動

echo "fcitx5 &" >> ~/.bashrc

設定 Rime(中州韻)輸入法

Rime 是一款高級可定制的中文輸入法,支援拼音、倉頡、五筆等。

安裝 Rime

sudo dnf install ibus-rime fcitx5-rime -y

啟動 Rime 配置工具

ibus restart
ibus-setup

fcitx5-configtool

初始化 Rime

mkdir -p ~/.config/ibus/rime
rime_dict_manager

自訂 Rime 配置

編輯 default.custom.yaml 設定方案,例如使用 小狼毫拼音

patch:
  schema_list:
    - schema: luna_pinyin
    - schema: wubi86

重新部署 Rime:

rime_deployer

解決輸入法相關問題

IBus 輸入法無法啟動

ibus-daemon -rd

Fcitx5 無法輸入中文

fcitx5-diagnose

Rime 配置未生效

rime_deployer --build

結語

本篇介紹了 Fedora Linux 的中文輸入法設定,涵蓋 IBus、Fcitx5、Rime 三種框架,並提供詳細的設定與疑難排解方法。透過這些步驟,您可以流暢地在 Fedora 上輸入中文。

⬅ 上一篇 下一篇 ➡
🔙 返回 桌面應用 📚 返回教學列表 🏠 返回首頁