Cannot type Chinese in some applications

Hi, I’m trying to use a pinyin input method to type simplified Chinese, but it doesn’t work in some apps. It works great it xed (Text Editor) and Firefox, Terminal, Thunderbird, even Calculator! But it doesn’t work in Telegram or Anki.

I tried fcitx and IBus, but both have the same issue.

fcitx have an FAQ page for this. It doesn’t seem to be a problem with GTK applications as Gedit works fine. The test for checking Qt applications must be outdated because it doesn’t make any sense. I also tried different suggested configurations for .bashrc in this Arch wiki article.

Please let me know if I need to provide any extra information, and I hope I have adequately described my problem.

Cheers.

(I couldn’t include links in my post, sorry; I guess it’s because this is a new account)

fcitx is old and outdated. I use fcitx5 and my ~/.xprofile contains:

export XMODIFIERS="@im=fcitx5"
export XMODIFIER="@im=fcitx5"
export GTK_IM_MODULE=fcitx5
export QT_IM_MODULE=fcitx5
export DefaultIMModule=fcitx5
fcitx5 &

I have installed the following packages:

pacman -S fcitx5 fcitx5-configtool fcitx5-chinese-addons fcitx5-gtk fcitx5-qt

Works great for me in all applications. One problem I had was the font size of the IME. Here is a simple fix:

2 Likes

Thanks so much! Worked perfectly for me. I followed your instructions and then rebooted to find it working in all my applications! Cheers mate.

As an aside, would you know how to type pinyin tones with fcitx5? With fcitx I used a package called fcitx-m17n which added another input method to fcitx but I can’t find a way to do this with fcitx5? There is a package called fcitx5-m17n-git but it wants to remove my existing fcitx5 installation.

I’ve never had the need to type tones. You can install fcitx5-m17n-git, but it will also want you to update the other fcitx5 packages to git. The only difference is that git will build the package from source, and may be a slightly newer version (There may be a bug or two). The non git packages have already been tested.

Okay got it, thanks

Unfortunately the build failed on Manjaro… Guess I’ll try to find another way.

I found a method to input pinyin using fcitx5. Install the package fcitx5-rime and enable it as an input method. Create the file ~/.local/share/fcitx5/rime/default.custom.yaml with the following content (indentation is important):

patch:
  schema_list:
    - schema: luna_pinyin 

Select the rime IME (you may also need to click deploy to refresh the changes). You can now type pinyin by first / then a vowel a. You will be prompted with the tones for that letter.

This has the advantage of only needing one IME for both Characters and pinyin. However, I don’t yet know how their dictionary files are.

More info about the rime IME can be found here:
https://wiki.archlinux.org/index.php/Rime
Though note, the directories on that page are for fcitx4 and are wrong!

1 Like

You sir, are a legend.

I followed your instructions but - out of curiosity - missed out the ~/.local/share/fcitx5/rime/default.custom.yaml bit to see if it would work without it. And it did! I confirmed and that file does not exist on my machine, so it looks like this solution doesn’t require that step (at least, for machines that haven’t used rime before).

Thanks so much for your assistance!

By default, rime has about 6 built in IMEs. You can see them, their Chinese names at least, by opening the IME and pressing f4. This file I mentioned limits it to use only one. You can try the others, but I found that only luna_pinyin would allow tones.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.