fcitx5 ‐ Input method for Chinese or other languages - MikeTeok/LinuxMint-XFCE-RosePine GitHub Wiki
- 
Install fcitx5
sudo apt install fcitx5-config-qt fcitx5-frontend-gtk2 fcitx5-frontend-gtk3
sudo apt install fcitx5-chinese-addons
sudo apt install fcitx5 fcitx5-pinyin - 
Add below line to
~/.xprofile, I am not sure if it takes effect.
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export DefaultIMModule=fcitx5 - 
Configure fcitx5, can find the tool from application menu.
 - 
Add fcitx5 to startup app