1.切換國內源 (會自動推薦,都打上對勾) 這里自動添加的源存在 /etc/pacman.d/morrorlist 這些源可能不包含搜狗輸入法選喲做第二部操作
sudo pacman-mirrors -i -c China -m rank //更新鏡像排名 sudo pacman -Syy //更新數據源
2.添加中文社區倉庫 只能選擇1個 (參考https://blog.csdn.net/weixin_43968923/article/details/86349914)
[archlinuxcn] # The Chinese Arch Linux communities packages. # SigLevel = Optional TrustedOnly
SigLevel = Optional TrustAll
# 1.官方源 Server = http://repo.archlinuxcn.org/$arch
# 2.163源 Server = http://mirrors.163.com/archlinux-cn/$arch
# 3.清華大學 Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch
3.安裝搜狗輸入法
yay -S qtwebkit-bin(這個好像可以不用安裝)
$ sudo pacman -S fcitx-sogoupinyin $ sudo pacman -S fcitx-im # 全部安裝 $ sudo pacman -S fcitx-configtool # 圖形化配置工具
4.配置文件編 輯命令 vi /etc/environment (有的說編輯~/.xprofile還有的編輯 ~/.xprofile沒搞明白怎么回事) 我在虛擬機里面都試了 不生效,物理機生效了
export GTK_IM_MODULE=fcitx export QT_IM_MODULE=fcitx export XMODIFIERS="@im=fcitx"
5.sudo reboot 重啟生效
如果以上不生效試試如下 (kde環境)
參考連連接:https://zhuanlan.zhihu.com/p/74931620
1.安裝fcitx-qt4
yay -S fcitx-qt4
2.刪除:
sudo pacman -Rsn fcitx-im fcitx-configtool
sudo pacman -S fcitx-lilydjwg-git fcitx-sogoupinyin
GNOME(GTK)用戶:
sudo pacman -S fcitx-configtool fcitx-qt5
注意:fcitx-qt5可選依賴於fcitx-configtool,可以直接安裝fcitx-configtool,然后選擇fcitx-qt5。
KDE(QT)用戶:
sudo pacman -S kcm-fcitx
kcm-fcitx這個包依賴於fcitx-qt5,所以后者就不用再次安裝了。
配置 vi /etc/environment
export GTK_IM_MODULE=fcitx export QT_IM_MODULE=fcitx export XMODIFIERS="@im=fcitx"
