Skip to content

Instantly share code, notes, and snippets.

@tanyuan
Last active February 26, 2023 14:20
Show Gist options
  • Star 52 You must be signed in to star a gist
  • Fork 12 You must be signed in to fork a gist
  • Save tanyuan/c0d4ee15cf0c9c93da28cc1cf0ff87b3 to your computer and use it in GitHub Desktop.
Save tanyuan/c0d4ee15cf0c9c93da28cc1cf0ff87b3 to your computer and use it in GitHub Desktop.
Ubuntu: fcitx + chewing 新酷音輸入法

Ubuntu: fcitx + chewing 新酷音輸入法

fcitx 輸入法架構比預設的 ibus 穩定許多。

  1. 安裝 fcitx (框架) 以及 fcitx-chewing (框架下的新酷音輸入法):

     sudo apt-get install fcitx fcitx-chewing
    
  2. 設為預設輸入法架構: System Settings > Language Support > Language Tab > Keyboard input method system: set to fcitx

  3. 讓每個程式獨立維持輸入法狀態: System Settings > Keyboard > Typing Tab > Click on Text Entry > Select Allow different sources for each application

  4. fcitx 設定沒事別跳出選字框: 右上角工具列 fcitx 鍵盤圖示 > Configure > Global Config > Click Show Advance Option > Appearance > Do not show input window if there is only preedit string

  5. 下載這個 Gist 的圖示,取代原本新酷音超不搭的圖示,符合 Ubuntu Ambiance 主題風格:

     sudo cp fcitx-chewing.png /usr/share/icons/hicolor/48x48/apps/fcitx-chewing.png
    
@rightson
Copy link

@HaoGood 我也遇過打字打太快會出現英文字母穿梭在中文的情況,更慘的是整句還會不見。
我試著調整 Configure -> Global Config -> Show Advanced Options -> Interval of Two Key Input 改成 1 之後,「感覺」有「比較少」遇到。

@benny-sun
Copy link

benny-sun commented Jun 26, 2019

@HaoGood 我也遇過打字打太快會出現英文字母穿梭在中文的情況,更慘的是整句還會不見。
我試著調整 Configure -> Global Config -> Show Advanced Options -> Interval of Two Key Input 改成 1 之後,「感覺」有「比較少」遇到。

已經找到解決辦法囉!
在家目錄建立一個.xsessionrc檔,並寫入一些環境變數

vim ~/.xsessionrc

-- ↓寫入的內容↓ --

export GTK_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export QT_IM_MODULE=fcitx

這樣fcitx輸入法就完全正常了,輸入速度多快都沒問題

但重開機後fcitx輸入法就不會自動啟動了,因此要另外設定,每次開機自動執行

fcitx-autostart

@amjltc295
Copy link

amjltc295 commented Sep 12, 2019

@HaoGood 我也遇過打字打太快會出現英文字母穿梭在中文的情況,更慘的是整句還會不見。
我試著調整 Configure -> Global Config -> Show Advanced Options -> Interval of Two Key Input 改成 1 之後,「感覺」有「比較少」遇到。

已經找到解決辦法囉!
在家目錄建立一個.xsessionrc檔,並寫入一些環境變數

vim ~/.xsessionrc

-- ↓寫入的內容↓ --

export GTK_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export QT_IM_MODULE=fcitx

這樣fcitx輸入法就完全正常了,輸入速度多快都沒問題

但重開機後fcitx輸入法就不會自動啟動了,因此要另外設定,在開機後自動執行指令

fcitx-autostart

我也遇到相同的問題,加了這些變數還是沒有完全解決欸,請問這個解決的原理是?

Update:
再重開機好像就解決了~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment