萬盛學電腦網

您现在的位置: 萬盛學電腦網 >> 作業系統 >  >> Linux 教學

Fedora 17 安裝配置 IBus 中文拼音輸入法完整步驟

Fedora 17 預設整合 IBus 輸入法框架,透過圖形介面即可啟用中文拼音,無需額外編譯。

圖形介面啟用步驟

  1. 開啟「活動」總覽 → 應用程式 → 其他 → 輸入法選擇器 (Input Method Selector)
  2. 選擇 Use IBus → 點擊 Preferences 開啟 IBus 設定
  3. 切換至 輸入法 (Input Method) 分頁
  4. 勾選 自訂啟用輸入法 (Customize active input methods)
  5. 下拉選單選 Show all input methods → 選擇 Chinese → Pinyin (拼音)
  6. 點擊 Add 加入輸入法清單
  7. 在 一般 (General) 分頁可修改觸發熱鍵 (預設 Ctrl+Space)
  8. 登出重新登入或重啟 IBus:ibus restart

命令列安裝補充套件 (若缺少元件)


sudo yum install -y ibus ibus-libpinyin ibus-gtk3 ibus-qt
# ibus-libpinyin: 新一代拼音引擎 (取代舊版 ibus-pinyin)
# ibus-gtk3/qt: GTK3/Qt 應用程式整合模組

環境變數確認 (非圖形登入/SSH X11 轉發需手動設定)


# ~/.bashrc 或 ~/.xprofile
export GTK_IM_MODULE=ibus
export QT_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
# 啟動 IBus daemon
ibus-daemon -drx

常見問題排查

現象原因解決
無法切換中文環境變數未設定、IBus daemon 未啟動檢查環境變數、執行 ibus-daemon -drx
候選框不顯示GTK/Qt 模組缺失安裝 ibus-gtk3 ibus-qt
拼音無法選字引擎未正確載入IBus 設定 → 輸入法 → 移除重新加入 Pinyin
終端無法輸入中文終端模擬器不支援 IBus使用 GNOME Terminal、Tilix、Alacritty (需啟用 ime)

進階配置:雲拼音、雙拼、自定義詞庫

  • IBus 設定 → 拼音 → 啟用「雲拼音」提升候選準確度
  • 選擇「雙拼方案」 (自然碼、微軟雙拼、小鶴音形等)
  • 匯入用戶詞庫:ibus-table-createdb -s user.db -n user

切換至 Fcitx 5 (替代方案)


sudo dnf install fcitx5 fcitx5-chinese-addons fcitx5-gtk fcitx5-qt
# 設定環境變數指向 fcitx5
imsettings-switch fcitx5

IBus 整合度高、設定直觀,是 Fedora/GNOME 環境首選中文輸入法方案;若需更豐富引擎 (倉頡、注音、雙拼)、更佳效能,Fcitx 5 是優秀替代選擇。

copyright © 萬盛學電腦網 all rights reserved