This is a post for anyone who is searching the internet for how to get Chinese characters and input set up on OpenSUSE, and like me couldn't really find out why the Pinyin input wasn't working. In my case it was working many moons ago, but recently it began displaying an
[Invalid UTF-8] instead of the character I was trying to type.
Install and Set Up Ibus
To start, install the *nix input system Ibus (project website here). I've seen some people in the community that don't think much of Ibus, but for me it's done the job pretty well and I don't have many complaints. In OpenSUSE, either search for Ibus in the control center YAST or pop open a terminal and type
$ sudo zypper in ibus (I find zypper a bit slow compared to other CLI package managers, but I do appreciate the preset command abbreviations). You can also use the one-click install from the OpenSUSE repository here. If you have Gnome 3 as your desktop environment Ibus is installed by default. When you have sufficiently determined that Ibus is installed, log out and log back in.
Installing the Input Method
Ibus works on what amount to a series of plugins to translate keyboard input into the charaters you desire. Because Chinese is a written language of characters, many ways of typing characters have sprung up over the years. Methods such as RIME, Chewing, and Bopomofo are popular. I don't understand how to use those input methods, so I use pinyin. Specifically, the
ibus-libpinyin package. If you choose to install this, make sure you choose the
ibus-libpinyin package, and not the
ibus-pinyin package as that doesn't work with the Ibus 1.4+ framework. If you are familiar with a different Chinese input method, search for it in YAST or in the CLI with
$ zypper se ibus-[your_input_method_here]. If it doesn't come up on the CLI right away, search through all the Ibus options like so:
$ zypper se 'ibus*' | less. Install it by typing
$ sudo zypper in ibus-[package].
$ ibus-setup, which should get Ibus ready on your desktop. I am currently using KDE, and I have a nice panel widget to easily control Ibus. However, the Gnome 3 Ibus integration is really slick, and I personally prefer it. Regardless, Ibus should still run. I've used it with Ratpoison and DWM so it should work with any window manager.
After installing Ibus, there should be a panel widget if your environment has a panel. If it does, right-click it and select "Preferences". If you don't have a panel widget but you do have a panel, try logging out and back in. If you don't have a panel, just run
$ ibus-setup from the CLI again.
In the Ibus settings, set how you'd like to move between Ibus input methods (presumably you don't want just Chinese all the time) by clicking the elipsis. Then click the "Input Method tab. Select a Chinese input method from the drop-down menu and press "Add" to add that method to your ibus choices. You've now got all the pieces to type Chinese, save one.
OpenSUSE actually has a nice collection of fonts for the discerning typist. You can see them all by searching "font" in YAST or typing
$ zypper se '*font*'. To pair it down to only the Chinese options, run
$ zypper se '*font*' | grep -i Chinese. I personally use the
wang-fonts package (yeah, grow up) and the
wyq-zenhei-fonts package. Install a few Chinese fonts and you are all set! Chinese typing is now set up on your desktop.
If you've got more questions or things aren't working properly, check out the ArchWiki article on Ibus, or this blogpost here. If anything here is wrong or should be updated, please let me know.