Sogou Shurufa (Sogou Pinyin) is a popular Chinese input method engine (IME) known for its accurate and intuitive input capabilities. Installing it on Ubuntu 22.04 enhances your ability to type in Chinese seamlessly. This comprehensive guide will walk you through the step-by-step process to install and configure Sogou Shurufa on Ubuntu 22.04, ensuring smooth integration with your system’s input frameworks.
Prerequisites
Before you begin, ensure you have the following:
- Ubuntu 22.04 LTS installed and updated.
- Administrator (sudo) privileges on your system.
- Internet connection to download necessary packages and files.
- Basic knowledge of terminal commands.
Step 1: Install Necessary Dependencies
First, update your system and install the essential dependencies required for Sogou Shurufa and Fcitx.
- Open TerminalPress
Ctrl + Alt + T
to open the terminal. - Update Package Lists and Upgrade Packages
sudo apt update sudo apt upgrade -y
- Install Essential Packages
sudo apt install fcitx fcitx-config-gtk fcitx-sogoupinyin wget unzip -y
fcitx
: The Flexible Context-aware Input Tool with eXtension, an input method framework.fcitx-config-gtk
: Graphical configuration tool for Fcitx.fcitx-sogoupinyin
: Sogou Pinyin input method for Fcitx.wget
andunzip
: Tools to download and extract files.
Step 2: Download Sogou Shurufa
Note: Sogou Pinyin for Linux is typically available as a .deb
package. As of my knowledge cutoff in September 2021, Sogou Pinyin provided Linux installers, but ensure you download the latest version from the official source or trusted mirrors.
- Download the Latest Version of Sogou PinyinYou can download it directly using
wget
. Replace the URL with the latest version if available.wget https://cdn2.jianshu.io/assets/default-avatar/1-5c55b70cdc278144953ba7134c43b861.png -O sogoupinyin.deb
Important: The above URL is a placeholder. Please visit the official Sogou Pinyin website or a trusted source to get the correct download link for the latest
.deb
package. - Alternatively, Manually Download
- Visit the Sogou Pinyin Linux Download Page.
- Download the
.deb
package for Sogou Shurufa (Sogou Pinyin).
Step 3: Install Sogou Shurufa
- Navigate to the Download DirectoryIf you downloaded the
.deb
package usingwget
, it’s in your current directory. Otherwise, move to the directory where the package was downloaded.cd ~/Downloads
- Install the
.deb
PackageUsedpkg
to install the package:sudo dpkg -i sogoupinyin.deb
Note: Replace
sogoupinyin.deb
with the actual filename if different. - Fix Any Dependency IssuesIf you encounter dependency problems during installation, fix them using
apt
:sudo apt --fix-broken install -y
Then, retry installing the package:
sudo dpkg -i sogoupinyin.deb
Step 4: Configure Input Method Framework (Fcitx)
After installing Fcitx and Sogou Pinyin, configure Fcitx as your default input method framework.
- Set Fcitx as the Default Input MethodOpen Language Support settings:
- Press
Super
(Windows key) and type “Language Support” to find and open it. - In the “Language” tab, locate the “Keyboard input method system” dropdown menu.
- Select “Fcitx” from the list.
- Restart your computer if prompted.
![Language Support][]
- Press
- Configure Fcitx
- Open Fcitx Configuration:
fcitx-config-gtk3 &
Alternative: Search for “Fcitx Configuration” in the applications menu.
- In the Fcitx Configuration window:
- Click the “+” button to add new input methods.
- Search for “Sogou Pinyin” or “Sogou Shurufa” and add it.
- Arrange your input methods in the desired order.
![Fcitx Configuration][]
- Set Shortcut Keys:
- You can set keyboard shortcuts to switch between input methods, typically
Ctrl + Space
orSuper + Space
.
- You can set keyboard shortcuts to switch between input methods, typically
- Open Fcitx Configuration:
Step 5: Set Environment Variables
Ensure that environment variables are correctly set to allow Fcitx and Sogou Pinyin to function system-wide, especially for GUI applications.
- Open the Shell Configuration FileDepending on your shell (
bash
,zsh
, etc.), open the appropriate configuration file. Forbash
, it’s~/.bashrc
:nano ~/.bashrc
- Add the Following Lines at the End
export GTK_IM_MODULE=fcitx export QT_IM_MODULE=fcitx export XMODIFIERS=@im=fcitx
- Save and Exit
- Press
Ctrl + O
, thenEnter
to save. - Press
Ctrl + X
to exit the editor.
- Press
- Apply the Changes
source ~/.bashrc
Alternative: Log out and log back into your system to apply the changes.
Step 6: Add Sogou Shurufa to Fcitx
- Launch Fcitx Configuration Tool
fcitx-config-gtk3 &
Alternative: Search for “Fcitx Configuration” in the applications menu.
- Add Sogou Shurufa (Sogou Pinyin)
- In the “Input Method” tab, click the “+” button.
- Scroll through the list or use the search bar to find “Sogou Pinyin”.
- Select it and click “OK” to add.
![Add Input Method][]
- Set Sogou Pinyin as the Default Input Method
- Ensure “Sogou Pinyin” is at the top of the input method list for quick access.
- You can drag and drop to reorder input methods as needed.
Step 7: Restart Your System
To ensure all configurations take effect and that Fcitx and Sogou Shurufa are correctly integrated, restart your computer.
sudo reboot
Step 8: Test Sogou Shurufa Input
After restarting, verify that Sogou Shurufa is functioning correctly within Fcitx.
- Launch a Text EditorOpen any text editor like Gedit, LibreOffice Writer, or Vim.
- Switch to Sogou Shurufa
- Use the input method shortcut (e.g.,
Ctrl + Space
orSuper + Space
) to switch to Sogou Pinyin. - Alternatively, click on the Fcitx icon in the system tray and select “Sogou Pinyin”.
- Use the input method shortcut (e.g.,
- Start Typing in Chinese
- Begin typing Chinese characters. Sogou Shurufa should provide predictive text and character suggestions as you type.
![Sogou Pinyin Input][]
- Adjust Settings if NecessaryIf you encounter issues:
- Reopen Fcitx Configuration:
fcitx-config-gtk3 &
- Ensure “Sogou Pinyin” is correctly added and active.
- Check for any updates or additional configuration options within Fcitx.
- Reopen Fcitx Configuration:
Troubleshooting
If you experience issues with Sogou Shurufa not working correctly, follow these troubleshooting steps:
1. Ensure Fcitx is Running
- Check if Fcitx is active by looking for the Fcitx icon in the system tray.
- If not running, start it manually:
fcitx &
2. Verify Environment Variables
- Recheck that the environment variables are correctly set in
~/.bashrc
or~/.zshrc
. - Ensure no typos or missing lines.
3. Reinstall Fcitx and Sogou Shurufa
- Remove existing installations:
sudo apt remove --purge fcitx fcitx-sogoupinyin -y sudo apt autoremove -y
- Reinstall:
sudo apt install fcitx fcitx-sogoupinyin -y
4. Check for Software Updates
- Update your system to ensure all packages are up-to-date:
sudo apt update sudo apt upgrade -y
5. Consult Logs for Errors
- Check Fcitx logs for any error messages:
fcitx-diagnose
- Follow the prompts to identify and address issues.
6. Refer to Official Documentation
- Visit the Fcitx Wiki or Sogou Pinyin Support for detailed guides and support.
Frequently Asked Questions (FAQ)
1. Why Isn’t Sogou Shurufa Appearing in Fcitx Configuration?
Solution: Ensure that you’ve correctly installed the fcitx-sogoupinyin
package and set Fcitx as the default input method. Reinstall the package if necessary.
2. Can I Use Sogou Shurufa with IBus Instead of Fcitx?
Yes, but Fcitx generally offers better compatibility and performance for Sogou Shurufa. If you prefer using IBus, additional configurations are required.
3. How Do I Switch Between Input Methods Quickly?
Solution: Configure keyboard shortcuts in Fcitx Configuration to switch between input methods, such as Ctrl + Space
or Super + Space
.
4. Is There a Way to Customize Sogou Shurufa Settings?
Yes. Open the Fcitx Configuration tool, select “Sogou Pinyin,” and explore available settings like input styles, shortcuts, and appearance.
5. Does Installing Sogou Shurufa Affect System Stability?
No, provided it’s installed correctly and kept up-to-date. Always use trusted sources and follow installation guidelines to maintain system integrity.
6. How Do I Remove Sogou Shurufa from My System?
sudo apt remove --purge fcitx-sogoupinyin -y
sudo apt autoremove -y
Then, reconfigure Fcitx or switch to another input method.
7. Can I Use Sogou Shurufa Without an Internet Connection?
Yes. After installation, Sogou Shurufa can function offline, but updating word dictionaries and settings requires an internet connection.
8. How Do I Update Sogou Shurufa to the Latest Version?
- Check for Updates via PPA or Official Sources: If installed via a PPA, update using
sudo apt update && sudo apt upgrade
. If installed manually, download the latest.deb
package and reinstall.
9. Is Sogou Shurufa Free to Use?
Partially. Basic features are free, but premium features may require purchase. Check the official Sogou Pinyin website for detailed information.
10. Why is Chinese Input Not Displaying Correctly in Some Applications?
Solution: Ensure that environment variables are correctly set and that Fcitx is configured properly. Some desktop environments or applications may need additional settings or compatibility adjustments.
Conclusion
Installing Sogou Shurufa (Sogou Pinyin) on Ubuntu 22.04 empowers you with a robust and efficient Chinese input method, enhancing your ability to communicate and work seamlessly in Chinese. By following this step-by-step guide—installing dependencies, downloading and installing the IME, configuring Fcitx, and setting up environment variables—you can ensure a smooth integration of Sogou Shurufa into your Ubuntu system.
Key Takeaways:
- Fcitx Integration: Fcitx is the recommended input method framework for better compatibility with Sogou Shurufa on Ubuntu.
- Environment Variables: Correctly setting environment variables is crucial for the IME to function across all applications.
- Regular Updates: Keep both Fcitx and Sogou Shurufa updated to benefit from the latest features and security patches.
- Community Support: Leverage official documentation and community forums for ongoing support and troubleshooting.
Embrace the seamless Chinese typing experience that Sogou Shurufa brings to your Ubuntu 22.04 system, and enhance your productivity and communication capabilities.
Happy Typing!