[CentOS] fcitx-anthy request (for Japanese users)

Sat Aug 5 15:39:02 UTC 2017
H <agents at meddatainc.com>

On 08/03/2017 07:34 PM, H wrote:
> On 08/02/2017 09:07 PM, Scott Robbins wrote:
>> On Wed, Aug 02, 2017 at 08:15:58PM -0400, H wrote:
>>
>>
>>> On 08/02/2017 09:46 AM, Scott Robbins wrote:
>>>> On Wed, Aug 02, 2017 at 09:37:06AM -0400, H wrote:
>>>>>> Ah, also, in my .xinitrc (I boot into text mode then run startx I have,
>>>>>> above the line calling the window manager
>>>>>>
>>>>>> export LC_CTYPE=en_US.UTF-8
>>>>> I suspect there may be some configuration setting I have missed but since there is no graphical configuration utility it's hard to figure out what might be wrong by just looking at the several configuration text files.
>>>> What about, from terminal, doing something like
>>>> XMODIFIERS=@im=fcitx LC_CTYPE=zh_TW.Big5 GTK_IM_MODULE=fcitx firefox
>>>>
>>>> (the zh_TW.Big5 is just a guess, one that I saw googling lc_ctype for
>>>> Chinese.).
>>>> These are just guesses on my part. I've not had a similar issue, save for
>>>> the firefox thing on FreeBSD that I mentioned.
>>>>
>>> Interesting, that seems to work! Will check it out more tomorrow. However, it seemed to work only for firefox (that you have on the command line), it did not work for thunderbird or geany.
>>>
>>> The Big5 is likely not correct but I will check tomorrow.
>>>
>>> Thought: I do have XMODIFIERS and GTK_IM_MODULE set in .bashrc:
>>>
>>> export GTK_IM_MODULE=fcitx
>>> export QT_IM_MODULE=fcitx
>>> export XMODIFIERS=@im=fcitx
>> In the FreeBSD install where this was an issue in firefox, I had them in
>> .bash_profile, I think.  Or maybe .bashrc.  :) I don't remember.  But the
>> only thing I remember being an issues was Firefox, and the only variable I
>> had to add at the time was changing LC_CTYPE from English to Japanese.
>>
>>> I guess that these settings in .bashrc are picked up by the terminal only and not by GUI applications?? If so, there is maybe another file I need to add them to?
>> Try .bash_profile, (and then log out and log in.)
>>
> Still struggling here. Adding them to .bash_profile does not make any difference. I /think/ I need to put them somewhere so all GUI programs get initialized. Spending a couple of minutes on the 'net it seems .xinitrc i my home directory should be suitable. This file did not exist so I created it and made it executable.
>
> Based on my googling, this is what I came up with:
>
> #!/bin/sh
>
> export GTK_IM_MODULE=fcitx
> export QT_IM_MODULE=fcitx
> export LC_CTYPE=zh_CN.GB18030
> export XMODIFIERS=@im=fcitx
>
> Restarting the computer has no effect, nor does executing this script in a terminal window and then running e.g. geany. However, when I put geany in the script itself everything works fine. Note, by the way, that I changed to the encoding above since I am doing pinyin and using simplified characters.
>
> So, I now believe there is a place where I need to add these statements for them to have effect on system-wide GUI programs but where?
>
> Anyone know which file?
>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> https://lists.centos.org/mailman/listinfo/centos

I have done some experimenting:

- switching between two western languages and pinyin works well in a terminal window

- I just discovered all of this also works well in a note-type field in KeePassX BUT

- none of it works in firefox, thunderbird, libreoffice or geany

My setup is thus partly correct and I draw the conclusion that KeePassX is compiled using a different window library than the other four applications?

Can anyone shed light on this?