Cannot Input Chinese in Google Chrome or Firefox with IBUS 1.5.10

After I've setup the Chinese input method in Ubuntu Gnome 15.10, one issue I've noticed was that I can't input any Chinese characters even through I've already switched to it. Google did return an answer on how to troubleshoot and solve this.

First is to check if Firefox load library. It seems to load but still, I can't input any Chinese characters.
$ strace firefox 2>&1 | grep immodules
open("/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules.cache", O_RDONLY) = 25
stat("/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/", {st_mode=S_IFREG|0644, st_size=31816, ...}) = 0
open("/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/", O_RDONLY|O_CLOEXEC) = 25

Then I remember that I did make some changes to the X in .xprofile. It seems I was setting Flexible Input Method Framework (fcitx) as my default input method framework instead of Intelligent Input Bus (IBus). This was setup last time as I need to setup a default input method framework when using i3 window manager.
$ cat .xprofile | grep export
    export GTK_IM_MODULE=fcitx
    export QT4_IM_MODULE=fcitx
    export QT_IM_MODULE=fcitx
    export XMODIFIERS="@im=fcitx"

Changing the .xprofile file by replacing all 'fcitx' to 'ibus'. Log out and re-login again did solve the issue.
$ cat .xprofile | grep export
    export GTK_IM_MODULE=ibus
    export QT4_IM_MODULE=ibus
    export QT_IM_MODULE=ibus
    export XMODIFIERS="@im=ibus"

No comments:

Post a Comment