Fcitx Chinese Input Setup on Ubuntu for Gaming
Introduction
Inputting Chinese on the English Ubuntu system is not news. Ubuntu uses IBus
keyboard input method system by default and there is a Chinese input method ibus-pinyin
which could be easily installed via sudo apt-get install ibus-pinyin
. However, when it comes to gaming, especially in the full-screen mode, ibus-pinyin
will not show any word selection menu in the game, because it is in the IBus
system and IBus
system is not compatible with most of the gaming engines.
To support Chinese input in Ubuntu games, in this blog post, I will introduce how to install fcitx
based input methods, which is compatible with games, on Ubuntu. It should also be noted that this method might also apply to the input methods from other languages.
As of April 23rd 2022, this protocol has been tested and verified on Ubuntu 18.04 LTS, 20.04 LTS and 22.04 LTS.
Protocols
Installing Components
We would need to install fcitx
and fcitx-googlepinyin
first.
1 | # Install fcitx input method system |
Ubuntu Setups
Change the input method system from IBus
to fcitx
in Region & Language
.
Click Manage Installed Languages
.
Click Install/Remove Languages
to install Chinese Simplified
and/or Chinese Traditional
if necessary.
Remove all the input sources except English (US)
under the Input Sources
in Region & Language
. Otherwise, there will be two input icons on your system.
Reboot the computer and we would see a new input icon at the top right corner of our desktop. We then add Google Pinyin to the fcitx
method. We start the fcitx-configtool
by running the following command in the terminal.
1 | $ fcitx-configtool |
Click +
to add input methods.
Uncheck Only Show Current Language
, select Google Pinyin
, and press OK
.
Now you can start to use Google Pinyin
by toggling using Ctrl
+ Space
by default.
Ugly Default Idle Icon
The default fcitx
icon at idle is ugly. We would like to make it look better. We run the following commands in the terminal.
1 | # Remove classic UI |
Reboot the computer and we would see a new penguin input icon at the top right corner of our desktop. It will turn to a keyboard icon whenever the cursor is placed somewhere allows inputs.
Demo
Dota 2
In the game Dota 2, we press Ctrl
+ Space
to switch to Google Pinyin
and start to input Chinese.
It was successful!
Miscellaneous
To see how to play games in Ubuntu, please check my blog post “Ubuntu Gaming Guide”.
Fcitx Chinese Input Setup on Ubuntu for Gaming