Skip to content

Instantly share code, notes, and snippets.

@weehong-1
Last active March 24, 2026 02:30
Show Gist options
  • Select an option

  • Save weehong-1/b256fcc7eaae104769aa92d76116fece to your computer and use it in GitHub Desktop.

Select an option

Save weehong-1/b256fcc7eaae104769aa92d76116fece to your computer and use it in GitHub Desktop.
Ubuntu 25.10 - Chinese Installation (Ibus and Fcitx5)

🇨🇳 Ultimate Chinese Pinyin Guide for Ubuntu 25.10 (Questing Quokka)

This guide covers the installation, activation, and optimization of Chinese input methods on Ubuntu 25.10, which utilizes GNOME 49 and Wayland.


🚀 1. Automated Installation Script

Use this script to install all necessary dependencies for either the standard IBus method or the modern Fcitx5 method.

bash -c "$(curl -fsSL https://gist.githubusercontent.com/weehong-1/b256fcc7eaae104769aa92d76116fece/raw/menu.sh)"
Click to expand Bash Script
#!/bin/bash
# Ubuntu 25.10 Pinyin Input Method Installer
# Specifically tuned for GNOME 49 / Wayland

set -e

echo "------------------------------------------------"
echo "  Ubuntu 25.10 Chinese Pinyin Installer"
echo "------------------------------------------------"
echo "Select your preferred input framework:"
echo "1) IBus (Default GNOME integration - simplest)"
echo "2) Fcitx5 (Recommended for Wayland, Apps, & Gaming)"
echo "3) Exit"
read -p "Enter choice [1-2]: " choice

sudo apt update

case $choice in
    1)
        echo "Installing IBus Pinyin..."
        sudo apt install -y ibus-libpinyin language-pack-zh-hans
        echo "------------------------------------------------"
        echo "SUCCESS: Now go to Settings -> Keyboard -> Input Sources"
        echo "Click '+' -> Three Dots -> Other -> Chinese (Intelligent Pinyin)."
        ;;
    2)
        echo "Installing Fcitx5 with Cloud Pinyin..."
        sudo apt install -y fcitx5 fcitx5-chinese-addons fcitx5-module-cloudpinyin fcitx5-configtool im-config
        
        # Setting Fcitx5 as the default input method system
        im-config -n fcitx5
        
        echo "------------------------------------------------"
        echo "SUCCESS: Fcitx5 installed. LOG OUT and LOG IN now."
        echo "Then search for 'Fcitx5 Configuration' in your apps to add Pinyin."
        ;;
    *)
        echo "Exiting..."
        exit 0
        ;;
esac

⚙️ 2. Post-Installation Activation

After running the script, you must manually enable the input source in the system interface.

If you chose IBus (Option 1)
  1. Open Settings > Keyboard.
  2. In the Input Sources section, click the + (Plus) button.
  3. Select the three vertical dots (More) > Other.
  4. Find and select Chinese (Intelligent Pinyin).
  5. Click Add.
If you chose Fcitx5 (Option 2)
  1. Important: Restart your computer or Log Out/In first.
  2. Open your App Launcher and search for Fcitx5 Configuration.
  3. In the Input Method tab, search for Pinyin in the right-hand list.
  4. Select it and click the < (Left Arrow) to move it to your active list.
  5. Click Apply.

☁️ 3. Enabling Cloud Pinyin (Improved Accuracy)

Cloud Pinyin fetches trending words and phrases from the web to improve suggestion accuracy. This is available for Fcitx5.

  1. Open Fcitx5 Configuration.
  2. Navigate to the Addons tab.
  3. Find Cloud Pinyin in the list and click the Configure (gear icon).
  4. Change the Cloud Pinyin Source to Baidu or Google.
  5. Click OK and Apply.

⌨️ 4. Usage & Shortcuts

Action IBus (Default) Fcitx5 (Modern)
Switch Language Super + Space Ctrl + Space
Quick Toggle (EN/ZH) Shift Shift
Select Candidate Number (1-9) Number (1-9)
Next Page . or -> . or ->
Commit/Confirm Space Space
Commit as English Enter Enter

🛠 Troubleshooting for Ubuntu 25.10

  • Missing Candidate Window: Since 25.10 is Wayland-heavy, if the candidate box doesn't appear in some apps (like Steam or Discord), ensure you have fcitx5-frontend-gtk3 and fcitx5-frontend-qt5 installed.
  • Ptyxis Terminal: The new default terminal in 25.10 handles Pinyin natively, so no extra configuration is needed there!

Generated for Ubuntu 25.10 "Questing Quokka"

#!/bin/bash
# Ubuntu 25.10 Pinyin Input Method Installer
# Specifically tuned for GNOME 49 / Wayland / Questing Quokka
set -e
echo "------------------------------------------------"
echo " Ubuntu 25.10 Chinese Pinyin Installer (v2)"
echo "------------------------------------------------"
echo "Select your preferred input framework:"
echo "1) IBus (Default GNOME integration - recommended for most)"
echo "2) Fcitx5 (Better for Gaming/Flatpaks/Cross-distro consistency)"
echo "3) Exit"
read -p "Enter choice [1-2]: " choice
sudo apt update
case $choice in
1)
echo "Installing IBus Pinyin and GNOME Language Support..."
# Added language-pack-gnome-zh-hans to ensure GNOME menus recognize the language
sudo apt install -y ibus-libpinyin language-pack-zh-hans language-pack-gnome-zh-hans
echo "Restarting IBus daemon..."
ibus restart &
sleep 2
echo "Automatically adding 'Intelligent Pinyin' to your Input Sources..."
# This command fetches your current sources and appends Pinyin automatically
current_sources=$(gsettings get org.gnome.desktop.input-sources sources)
if [[ $current_sources == "[]" ]]; then
gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'us'), ('ibus', 'libpinyin')]"
elif [[ $current_sources != *"'ibus', 'libpinyin'"* ]]; then
new_sources=${current_sources%]*}, "('ibus', 'libpinyin')]"
gsettings set org.gnome.desktop.input-sources sources "$new_sources"
fi
echo "------------------------------------------------"
echo "SUCCESS: Intelligent Pinyin has been added to your top bar."
echo "You can switch using Super + Space."
echo "If it doesn't appear immediately, Log Out and Log In."
;;
2)
echo "Installing Fcitx5 and modern GTK/Qt frontends..."
# Added frontends to ensure Pinyin works in Snap/Flatpak apps on Wayland
sudo apt install -y fcitx5 fcitx5-chinese-addons fcitx5-module-cloudpinyin \
fcitx5-frontend-gtk3 fcitx5-frontend-gtk4 fcitx5-frontend-qt5 \
fcitx5-configtool im-config
echo "Setting Fcitx5 as the default input method system..."
im-config -n fcitx5
echo "------------------------------------------------"
echo "SUCCESS: Fcitx5 installed. IMPORTANT:"
echo "1. LOG OUT and LOG IN now."
echo "2. Open 'Fcitx5 Configuration' from your apps."
echo "3. Add 'Pinyin' to your list of input methods."
;;
*)
echo "Exiting..."
exit 0
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment