iBus-rime initial setup
In 2023 I switched to Fcitx.
Autostart iBus and keep it in the background
After installing the rime input method on Linux, you need iBus support.
But after a bunch of settings in iBus, once I closed the window, iBus just exited…
Checked the docs: iBus Initial setup - Archlinux
Append to the end of ~/.bashrc:
# iBus always onexport GTK_IM_MODULE=ibusexport XMODIFIERS=@im=ibusexport QT_IM_MODULE=ibusibus-daemon -drxThe method above worked in a VM, but didn’t work on my laptop.
Still from the docs: create ~/.xprofile and add:
# iBus always onexport GTK_IM_MODULE=ibusexport XMODIFIERS=@im=ibusexport QT_IM_MODULE=ibusibus-daemon -drxFull install process
# 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 update
Installed again and optimized the steps a bit:
# 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 autostartChanges:
- Use
git cloneto download plum. The original one-liner runs the script directly and installs a bunch of input schemas I don’t need. - The path of rime
default.yamlchanged; contents seem similar. Just edit it.
Pitfalls:
- It’s best to edit rime
default.yamlfirst, then start iBus and switch to rime input method. - Because when rime starts for the first time, it deploys input schemas based on
default.yaml(converts.yamlschemas to.binfor faster usage). - If you edit the config first, deployment can finish in one go.
I got stuck on this for 3-4 days…
I started rime first, then after editing the config I couldn’t find where to redeploy.
I searched online: “there’s a deploy button”, but I couldn’t find it anywhere; CLI commands didn’t help either.
In the end I realized:
Left-click the rime tray icon and you’ll see deploy options… (I always right-clicked, which shows iBus options.)
I’m too noob.
Issues:
- One issue: in terminal, rime candidate popup doesn’t appear at the cursor; it jumps around. Kinda tiring…
2020/03/10 update
Found it’s not just in terminal; editing Google Docs in browser also has this issue…
2020/04/12 update: start iBus via . .xprofile
Previously I always logged out and back in to load .xprofile.
Today iBus crashed and I didn’t want to log out.
Then I thought: if . .bashrc or source .bashrc can refresh the shell environment, can . .xprofile do the same?
Tried it; it works.
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
Now there is nodefault.yamlunder~/.config/ibus/rime/. Docs online recommend not editing/usr/share/rime-data/default.yamldirectly (because upgrades will wipe custom changes).
2021/02/21 update DIY ibus-rime
Recommended approach: add patch files under ~/.config/ibus/rime/.
-
Add double-pinyin schema
Github - rime/rime-double-pinyin
Download the schema you need and copy it into~/.config/ibus/rime/. Mine isdouble_pinyin_flypy.schema.yaml.
Then apply a patch:Terminal window vim ~/.config/ibus/rime/default.custom.yaml# add following linespatch:schema_list:- schema: double_pinyin_flypyRedeploy and it takes effect.
This patch overrides the defaultschema_list. If you need other input methods, add them in the patch too. (Be careful with YAML syntax.) -
Make candidate menu horizontal
After an upgrade, the horizontal layout setting inibusstopped working. The workaround: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 配置 <<< this is great
2021/05/09 update
Install ibus-mozc-ut Japanese Input Method
On Manjaro (iBus framework), to install a Japanese input method, it seems the AUR package is ibus-mozc-ut.
It took 20 minutes to build. After installation I couldn’t make it show up, wasted half an hour.
Turns out it was because I didn’t log out & log in… (sorry. I should follow tutorials and not skip the log out step
After logging in again, Japanese - Mozc shows up. Then configure Romaji Input Method, Hiragana, etc.
More IME tricks still to learn~
2022/02/20 update
Found another config with more env vars
# 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
Switching to Fcitx
After a big distro upgrade, ibus-rime broke. It would deploy for a bit then exit, taking ibus down with it.
Couldn’t fix it, so I switched to Fcitx.
Chinese input uses fcitx5-rime.
(Also installed fcitx5-mozc-ut so I can type Japanese too. The dictionary is pretty complete and suggests common words. Nice.)
For Rime config I use 雾凇拼音
If telegram-desktop can’t use Chinese input, add these env vars to ~/.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