mviereck / x11docker

Run GUI applications and desktops in docker and podman containers. Focus on security.
MIT License
5.62k stars 378 forks source link

Pinyin input method doesn't work in the latest version of Deepin desktop, started by x11docker. #434

Closed hongyi-zhao closed 2 years ago

hongyi-zhao commented 2 years ago

I start the docker image by x11docker, but find that the pinyin input methods can't be used, though they have been activated, anymore. I've tried fcitx-google pinyin and sogou pinyin.

Any hints for this problem?

Regards, HZ

mviereck commented 2 years ago

I could help you better if:

hongyi-zhao commented 2 years ago

I'll try to do it ASAP.

mviereck commented 2 years ago

Just an idea: fcitx uses environment variables. My test setups with fcitx used fcitx version 4. Some distributions has updated to fcitx5. That might make a difference. Also look at the environment variables that has to be set for fcitx. Maybe they refer to version 4.

hongyi-zhao commented 2 years ago

It's set from Dockerfile:

ENV XMODIFIERS=@im=fcitx QT4_IM_MODULE=fcitx QT_IM_MODULE=fcitx GTK_IM_MODULE=fcitx

How do I change and test it in the container at run time?

mviereck commented 2 years ago

How do I change and test it in the container at run time?

     --env VAR=value   Set custom environment variable VAR=value
hongyi-zhao commented 2 years ago

Do you mean I can test with something similar to the following?

--env XMODIFIERS="@im=fcitx5 QT4_IM_MODULE=fcitx5 QT_IM_MODULE=fcitx5 GTK_IM_MODULE=fcitx5"

mviereck commented 2 years ago

You need one --env for each variable. If in doubt, please just try out. You can check the result in container with command env.

hongyi-zhao commented 2 years ago

I tried with the following command, but the problem remains:

$ x11docker --env XMODIFIERS=@im=fcitx5 --env QT4_IM_MODULE=fcitx5 --env QT_IM_MODULE=fcitx5 --env GTK_IM_MODULE=fcitx5 --xephyr --desktop --clipboard --init=systemd -- hongyizhao/deepin-wine:apricot