iBus-rime 初期設定
2023年に Fcitx に乗り換えた
iBusを自動起動して常駐させる
Linuxにrime入力を入れた後、ibusのサポートが必要になる。
でもibusで色々設定して、ウィンドウを閉じるとibusが終了してしまう…
ドキュメント参照: iBus Initial setup - Archlinux
~/.bashrc の末尾に追加:
# iBus always onexport GTK_IM_MODULE=ibusexport XMODIFIERS=@im=ibusexport QT_IM_MODULE=ibusibus-daemon -drx上の方法はVMでは成功したが、ノートPCでは効かなかった。
同じくドキュメントの方法で、~/.xprofile を作って以下を追加:
# iBus always onexport GTK_IM_MODULE=ibusexport XMODIFIERS=@im=ibusexport QT_IM_MODULE=ibusibus-daemon -drxインストール全手順
# install plum : https://github.com/rime/plumcurl -fsSL https://git.io/rime-install | bash
# install double-pinyincd plumbash rime-install double-pinyin
# install ibus-rimepacman -S ibus-rime
# modify home/user/.config/ibus/rime/default.yaml, add double-pinyin schema
# create home/user/.xprofile, add following commands# iBus always onexport GTK_IM_MODULE=ibusexport XMODIFIERS=@im=ibusexport QT_IM_MODULE=ibusibus-daemon -drx
# log out, and log in2020/03/08 更新
もう一度入れて、手順を少し最適化した:
# install plum bash: https://github.com/rime/plumgit clone https://github.com/rime/plum.git
# install double-pinyincd plumbash rime-install double-pinyin
# install ibus-rimepacman -S ibus-rime
# modify ~/.config/ibus/rime/build/default.yaml# add double-pinyin to `schema_list`
# create ~/.xprofile, add following# iBus always onexport GTK_IM_MODULE=ibusexport XMODIFIERS=@im=ibusexport QT_IM_MODULE=ibusibus-daemon -drx
# log out, and log in# iBus will autostart変更点:
git cloneでplumスクリプトを入れる。元のワンライナーはスクリプトを直接実行して、要らない入力方案まで大量に入る。- rimeの
default.yamlパスが変わった。内容は大体同じなので編集すればよい。
避坑:
- まず rime の
default.yamlを編集してから ibus を起動して rime を切り替えるのが良い。 - rimeの初回起動時に
default.yamlに基づいて入力方案をデプロイする(.yamlを.binに変換する)。 - 先に設定を直しておけば、一回でデプロイできる。
これで3-4日詰まった…
先にrimeを起動してしまい、その後設定を変えても再デプロイの場所が分からなかった。
ネットでは「デプロイボタンがある」と言うが、どこにも見つからない。CLIもいくつか試したがダメ。
最後に気づいた:
rimeのトレイアイコンを左クリックするとデプロイがある…(自分は右クリックばかりで、出るのはiBusのメニュー)
自分が菜すぎる
問題:
- いま気づいた問題:ターミナルでは候補ウィンドウがカーソル位置に出ず、あちこち飛ぶ。目が疲れる…
2020/03/10 更新
ターミナルだけでなく、WebでGoogle Docsを編集するときも同様だった…
2020/04/12 更新 . .xprofile でiBus起動
今まではログアウトして再ログインし、.xprofile を読み込ませていた。
今日はiBusがクラッシュして、ログアウトしたくなかった。
. .bashrc や source .bashrc で環境を更新できるなら、. .xprofile でもいけるのでは?と思って試したら、確かにできた。
2020/11/28 update
manjaro-kde-20.1.2-201019-linux58 kde desktop crash when using .xprofile
edit ~/.bashrc is ok
# iBus always onexport GTK_IM_MODULE=ibusexport XMODIFIERS=@im=ibusexport QT_IM_MODULE=ibusibus-daemon -drxdefault.yaml file at /usr/share/rime-data/default.yaml
2021/02/21 update
いま~/.config/ibus/rime/の下にdefault.yamlはなく、/usr/share/rime-data/default.yamlを直接編集するのは推奨されない(アップグレードで消える)。
2021/02/21 update DIY ibus-rime
推奨方法は ~/.config/ibus/rime/ の下に patch ファイルを追加すること。
-
双拼方案の追加
Github - rime/rime-double-pinyin
必要な方案をダウンロードして~/.config/ibus/rime/にコピーする。自分はdouble_pinyin_flypy.schema.yaml。
そしてパッチを当てる:Terminal window vim ~/.config/ibus/rime/default.custom.yaml# add following linespatch:schema_list:- schema: double_pinyin_flypy再デプロイすると有効になる。
このパッチはデフォルトのschema_listを上書きする。別の入力法が必要ならパッチに追加する(YAML文法に注意)。 -
候補メニューを横並びに
アップグレード後、ibus側で横並び設定が効かなくなった。対策:Terminal window vim ~/.config/ibus/rime/ibus_rime.custom.yaml# add following linespatch:style:horizontal: true
Ref:
RIME | 中州韻輸入法引擎 幫助文檔
Rime 定製指南 - 定製方案選單
Cannot get ibus_rime.yaml to work - unable to set my style/horizontal to true
可能只适合我自己的 RIME 配置 <<< これ良い
2021/05/09 update
Install ibus-mozc-ut Japanese Input Method
Manjaroのibusフレームワークで日本語入力を入れるなら、AURパッケージは ibus-mozc-ut っぽい。
ビルドに20分。入れた後どうやっても出てこなくて、30分無駄にした。
原因は log out & log in していないだけだった…(ごめん、教程に従ってログアウトを省略しないべきだった
入り直すと Japanese - Mozc が出てきて、Romaji Input Method や Hiragana を設定できる。
入力法の技巧はまだ勉強中~
2022/02/20 update
もっと変数が多い例を見つけた
# iBus always onexport INPUT_METHOD="ibus"export XMODIFIERS="@im=ibus"export GTK_IM_MODULE="ibus"export QT_IM_MODULE="ibus"export QT4_IM_MODULE="ibus"ibus-daemon -drxR --panel=/usr/lib/kimpanel-ibus-panel2023/05/18 update
Fcitxへ移行
大きめのアップグレード後、ibus-rime が炸裂した。デプロイしてしばらくすると落ち、ついでに ibus も巻き添えで落ちる。
どうにもならず、Fcitx に乗り換えた。
中国語入力は fcitx5-rime を使う。
(ついでに fcitx5-mozc-ut も入れて日本語入力もできる。辞書が結構充実していて、よく使う単語も出てきて楽)
Rime の設定は 雾凇拼音 を使っている。
telegram-desktop で中国語入力できない場合は、~/.xprofile に以下を追加:
export XMODIFIERS="@im=fcitx5"export XMODIFIER="@im=fcitx5"export GTK_IM_MODULE=fcitx5export QT_IM_MODULE=fcitx5export DefaultIMModule=fcitx5fcitx5 &Ref:
Archlinux - Fcitx5
Archlinux - Rime
Cannot type Chinese in some applications