1:sudo apt install fcitx fcitx-googlepinyin
2:sudo apt install fcitx-frontend-gtk3 fcitx-frontend-qt5 注:这里第二到第六可能不需要,但我成功运行了,可能是等待的时间不够
3:im-config -n fcitx
4:echo -e "export GTK_IM_MODULE=fcitx\nexport QT_IM_MODULE=fcitx\nexport XMODIFIERS=@im=fcitx\nfcitx -d &" >> ~/.xprofile
5:sudo reboot
6:重启 ->fcitx配置->输入法置顶
以上代码我打完后我发现可以使用中文输入法,