Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save BolunHan/7987fcc1933dd23c9476281c526d3156 to your computer and use it in GitHub Desktop.
Save BolunHan/7987fcc1933dd23c9476281c526d3156 to your computer and use it in GitHub Desktop.
Ubuntu 24.04 Install Sogou Pinyin

This is a fork from https://gist.github.com/tjumyk/4f33583010533961952f84cfe353457b, but I made some updates since it did not work for me.


Install Chinese Language and Characters

Remove ibus

sudo apt purge ibus
sudo apt autoremove

Install Sogou Pinyin and Dependencies

# 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

Check for Errors and Logs

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

Update .profile

Edit ~/.profile:

vim ~/.profile

Add the following lines:

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

Post-Installation

  • 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment