skip to Main Content

Rime is an input method engine for entering Chinese characters, supporting a wide range of input methods.fcitx5-rime is the rime running on fcitx5 input method framework.
I have installed fcitx5-rime in my os which contains the below info:

uname -a
Linux debian 5.10.0-22-amd64 #1 SMP Debian 5.10.178-3 (2023-04-22) x86_64 GNU/Linux

fcitx5-rime‘s version:

dpkg -l  fcitx5-rime
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name              Version      Architecture Description
+++-=================-============-============-====================================
ii  fcitx5-rime:amd64 5.0.4-1      amd64        Rime input method support for fcitx5

I write the configuration in luna_pinyin.custom.yaml:

cat luna_pinyin.custom.yaml
patch:
  'speller/algebra':
    - erase/^xx$/                      

    - derive/^([zcs])h/$1/             # zh, ch, sh => z, c, s
    - derive/^([zcs])([^h])/$1h$2/     # z, c, s => zh, ch, sh

    - derive/([ei])n$/$1ng/            # en => eng, in => ing
    - derive/([ei])ng$/$1n/            # eng => en, ing => in

    - abbrev/^([a-z]).+$/$1/          
    - abbrev/^([zcs]h).+$/$1/         

Wherever to put the file ,$HOME/.config/fcitx5/rime/ or $HOME/.local/share/fcitx5/rime/,the fuzzy pinyin setting (speller)still can’t take effect in fcitx5-rime input method engine?
1.Is the configuration wrong?
2.Which directory can i put it in?
How to fix it?

2

Answers


  1. As mentioned in fcitx/fcitx5 discussion 372, consider running the fcitx5-diagnose.sh, in case it detects other factors which would explain your issue.

    You can review its output, for the following sections:

    • Fcitx State Check: Make sure fcitx5 and fcitx5-rime are running correctly.
    • Configuration UI Check: Verify that the configuration interfaces for fcitx5 are accessible and functioning.
    • Frontends Setup Check: Look for any issues with the input method framework setup, especially regarding environment variables and input method modules.
    • Module and Addons Check: Confirm that all necessary modules and addons, especially those related to fcitx5-rime, are enabled and working properly.
    • Input Methods Check: Although this might not directly review luna_pinyin.custom.yaml, it can still provide insights into the overall input method configuration.

    The default location of luna_pinyin.custom.yaml seems to be $HOME/.config/fcitx5/rime/.

    Login or Signup to reply.
    1. In Fcitx 5, the directory is ~/.local/share/fcitx5/rime/, unless you set XDG_DATA_HOME to something else (it’s actually $XDG_DATA_HOME/fcitx5/rime). You got that right.
    2. You need to make sure you’re luna_pinyin. Most likely you do, but you can check with Ctrl + ` to make sure.
    3. luna_pinyin.custom.yaml file name is correct. Here’s the content in my data directory, FYI:
    $ ls ~/.local/share/fcitx5/rime
    build  installation.yaml  luna_pinyin.custom.yaml  luna_pinyin.userdb  sync  user.yaml
    
    1. You need re-deploy to make it take effect. Restart fcitx5 should also trigger a deploy check.

    I can guarantee that your luna_pinyin.custom.yaml works for me.

    with luna_pinyin.custom.yaml

    without luna_pinyin.custom.yaml

    So you are most likely missing the last step.

    If you still can’t get it work, I can suggest you try to use strace -f fcitx5 -r 2>&1 | grep luna_pinyin.custom.yaml to see the actual path it tries to load. There might be some other reason that I can’t predict. strace trace system call so it can be use to inspect what files does the process try to accces. You may also change the grep string to do your own investigation.

    On my system, the output looks like (I don’t have luna_pinyin.custom.yaml when I produce this output so it’s ENOENT):

    [pid 459614] statx(AT_FDCWD, "/home/XXXXX/.local/share/fcitx5/rime/luna_pinyin.custom.yaml", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT, STATX_TYPE|STATX_MODE, 0x7fd3df8e9e90) = -1 ENOENT
    [pid 459614] statx(AT_FDCWD, "/usr/share/rime-data/luna_pinyin.custom.yaml", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT, STATX_TYPE|STATX_MODE, 0x7fd3df8e9e90) = -1 ENOENT
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search