mviereck / dockerfile-x11docker-deepin

3D desktop deepin from China
MIT License
33 stars 11 forks source link

Install and config the fcitx5/fcitx5-rime/rime as the Chinese characters input method engine in Dockerfile. #43

Closed hongyi-zhao closed 3 years ago

hongyi-zhao commented 3 years ago

For using the fcitx5 on Linux, here told the following environment variables settings method in ~/.pam_environment:

 GTK_IM_MODULE DEFAULT=fcitx5
 QT_IM_MODULE  DEFAULT=fcitx5
 XMODIFIERS    DEFAULT=@im=fcitx5

I noticed that there are some differences between the ones used in your Dockerfile and the above snippet.

Any hints for this question?

Regards, HY

mviereck commented 3 years ago

Beside the version number the difference is DEFAULT=. I don't know if or where this makes a difference in practice. The documentation of fcitx might help.

hongyi-zhao commented 3 years ago

BTW, I suggest upgrade to fctix5 and using the rime input method engine for Chinese characters input which is more efficient and safe -- It works entirely based on local data rather than the cloud. The librime, fcitx5, fcitx5-rime, and plum are needed for using it.

This input method seems complex at the first glimpse, but it's really the most powerful, elegant and efficient one among all Chinese IMs.

To be frank, it's really complex to some extent, but I and all the people selected this IM think so. OTOH, just like emacs, you can customize all the stuff if you like.

Regards, HY

mviereck commented 3 years ago

For x11docker/deepin I prefer to stick with the default fcitx method that ships with deepin, just to stay close to the dde distribution.

If you like to, you could explore some input methods and write a general article comparing their advantages and disadvantages and about how to set them up in containers.

Especially it would be of interest how to set up fcitx/fcitx5 with cli commands only. That would help to automatize the setup. I once had a look at this, but has been very confused and finally was happy to get fcitx working at all.

That would be useful for other containers than x11docker/deepin, too. Compare https://github.com/mviereck/x11docker/issues/269

hongyi-zhao commented 3 years ago

As far as fcitx5 and rime are concerned, there are so many dependencies. The author of the fcitx5 has a project based on flatpack for this purpose. I myself am still struggling with its local installation and configuration.

Among all the dependencies, one of the most tricky things is the version of qt5 which doesn't match the version shipped with Ubuntu 20.04. Besides, there are still so many tricky installation steps. See here for some pertinent discussion.

And the following website is for dealing with the above mentioned complicated packages dependencies problem utilizing/leveraging the power of flatpack:

https://flatpak.fcitx-im.org/

hongyi-zhao commented 3 years ago

Follow-up report: I've successfully figured out the compilation procedure of all the necessary packages required by fcitx5/fcitx5-rime. But to be frank, it's rather complicated, and maybe not so suitable for implementation in Dockerfile.