This is a fork from [https://gist.github.com/tjumyk/4f33583010533961952f84cfe353457b](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 ```bash sudo apt purge ibus sudo apt autoremove ``` ## Install Sogou Pinyin and Dependencies ```bash # Download deb installer from https://shurufa.sogou.com/linux sudo dpkg -i 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 ```bash 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: ```bash sudo apt install libgtk-3-dev ``` ## Update `.profile` Edit `~/.profile`: ```bash vim ~/.profile ``` Add the following lines: ```text 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.