Fcitx 5 on openSUSE with Kitty

Linux 平台上的中文输入颇不易。我没有很大的精力去自己折腾(往往是这样)。

经过多方探索,我现在锁定了雾凇拼音。不出意外地,它是 Rime 㞢 的一种配置。 痛点则是 这些较好的方案都需要一个正确的 Rime 的安装(这当然是极其合理的需求)。但是 openSUSE 的官方 Rime 安装在 Lua 脚本的支持方面总会出问题。下面记述我是如何解决这个问题的。

安装 Fcitx 5 & Rime 从 Flatpak

从 Flatpak 安装可以获得一份正确的包含 Lua 支持的 Rime。 参考 Fcitx 官网的非常不完整的说明。

sudo flatpak install org.fcitx.Fcitx5
sudo flatpak install org.fcitx.Fcitx5.Addon.Rime

sudo zypper in 'fcitx5-gtk*' 'fcitx5-qt*'

正常人都会问为什么还有 zypper 的戏份。啊,就是这样的。按照官网的说法,flatpak 没有办法安装 im-module,也能理解,flatpak比较没有那么底层。

然后设置开机自启。在 ~/.config/autostart/org.fcitx.Fcitx5.desktop 里写下

[Desktop Entry]
Name[ca]=Fcitx 5
Name[da]=Fcitx 5
Name[de]=Fcitx 5
Name[fr]=Fcitx 5
Name[ja]=Fcitx 5
Name[ko]=Fcitx 5
Name[ru]=Fcitx 5
Name[vi]=Fcitx 5
Name[zh_CN]=Fcitx 5
Name[zh_TW]=Fcitx 5
Name=Fcitx 5
GenericName[ca]=Mètode d'entrada
GenericName[da]=Inputmetode
GenericName[de]=Eingabemethode
GenericName[fr]=Méthode de saisie
GenericName[ja]=入力メソッド
GenericName[ko]=입력기
GenericName[ru]=Метод ввода
GenericName[vi]=Phương Thức Nhập
GenericName[zh_CN]=输入法
GenericName[zh_TW]=輸入法
GenericName=Input Method
Comment[ca]=Mètode d'entrada estàndard
Comment[da]=Start inputmetode
Comment[de]=Eingabemethode starten
Comment[fr]=Démarrer la méthode de saisie
Comment[ja]=入力メソッドを開始
Comment[ko]=입력기 시작
Comment[ru]=Запустить метод ввода
Comment[vi]=Kiểu Gõ Bắt Đầu
Comment[zh_CN]=启动输入法
Comment[zh_TW]=啟動輸入法
Comment=Start Input Method
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=/app/bin/fcitx5 org.fcitx.Fcitx5
Icon=org.fcitx.Fcitx5
Terminal=false
Type=Application
Categories=System;Utility;
StartupNotify=false
X-GNOME-AutoRestart=false
X-GNOME-Autostart-Notify=false
X-KDE-autostart-after=panel
X-KDE-StartupNotify=false
X-KDE-Wayland-VirtualKeyboard=true
X-KDE-Wayland-Interfaces=org_kde_plasma_window_management
X-Flatpak=org.fcitx.Fcitx5

但是这样还是不行用。

/etc/profile.d/fcitx5.sh 里写下

export XMODIFIERS=@im=fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx

export GLFW_IM_MODULE=ibus

正常人都会问为什么还有 ibus 的戏份。这是 Kitty 的要求,我也没办法。

重启计算机。