This is a fork from https://gist.github.com/tjumyk/4f33583010533961952f84cfe353457b, but I made some updates since it did not work for me.
sudo apt purge ibus
sudo apt autoremove
# Download deb installer from https://shurufa.sogou.com/linux
sudo dpkg -i <sogou_xxx.deb>
sudo apt install -f
# Additional dependencies (refer to: https://shurufa.sogou.com/linux/guide)
sudo apt install libqt5qml5 libqt5quick5 libqt5quickwidgets5 qml-module-qtquick2 libgsettings-qt1
fcitx-diagnose
It is most likely that GTK Query Immodules
is missing, as it is not installed by default since Ubuntu 24.04.
Install it with the following command to fix this problem:
sudo apt install libgtk-3-dev
Edit ~/.profile
:
vim ~/.profile
Add the following lines:
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
- Note that setting the IME switch hotkey to
Super+Space
WILL cause a BadWindow error. - Reboot.
- At the login screen, when you type in the password, an icon shows up at the bottom-right of the screen. Click that icon to select Ubuntu on Xorg. Then log in.
- Right-click the keyboard icon at the top-right of the screen, then click Configure, click +, uncheck Only show current language, find Sogou Pinyin, and click OK.
- Done. Now you may switch to Sogou Pinyin via the
Ctrl+Space
hotkey.