Setting up a Chinese input method on Debian
2019-11-05 00:00
This guide will teach you how to setup a Chinese input method on Debian. It is intended for users who have basic graphical navigation and command-line skills in a Unix-like environment or a Debian-based Linux distribution.
This document consists of the following sections:
- Conventions used in this guide
- Requirements
- Downloading the fcitx input method using apt
- Accessing fcitx’s configuration settings
- Finding the fcitx Sunpinyin input method
- Configuring fcitx
- Enabling fcitx at startup
- Making sure fcitx is working correctly
Conventions used in this guide
- Note: Signifies additional information
- Tip: Signifies an alternative procedure for completing a step
- Warning: Signifies that damage, such as data loss, may occur
- Example: Shows how a procedure would be performed in a real scenario
Inline code and code blocks
: Signify package names, filenames, file contents, or commands- Figure caption Signifies a description for a figure (an image)
<variable>
Signifies that the text between the<
and>
should be replaced, and the<
and>
should be removed- Bold font Signifies user interface items
Requirements
- A Debian-based Linux distribution
- A package manager (in this guide, I use the
apt
package manager)
Downloading the fcitx input method using apt
This section will guide you through downloading the fcitx
package using the apt
package manager. The fcitx
package will allow you to type in Pinyin to produce Chinese characters.
To download the fcitx package using apt
Run the following command:
sudo apt install fcitx fcitx-sunpinyin
Confirm the installation by typing
y
when prompted
Accessing fcitx’s configuration settings
This section will help you access fcitx’s configuration settings, so you can then make using fcitx more convenient.
To access fcitx’s configuration settings
Run
fcitx
on the command line to access fcitx’s configuration settingsRight-click the icon in your system tray
Click Configure
Finding the fcitx Sunpinyin input method
This section will help you find the Sunpinyin input method, so you can then add it to your list of active input methods.
To find the fcitx Sunpinyin input method
Click the + symbol on the bottom-left of fcitx window
Click Only Show Current Language to uncheck the Only Show Current Language box
Click the search bar
Search for sunpinyin
Click Sunpinyin to select it
Click the OK button in the bottom-right of the window
Ensure that Sunpinyin has been added to your list of input methods
Click Global Config at the top of the window
Configuring fcitx
This section will help you configure fcitx, so fcitx will be easier to access and use.
To configure fcitx
Click the Show Advanced Options tab in the bottom-left corner of the fcitx configuration window
Uncheck Use extra trigger key only after using it to inactivate
Click the drop-down menu to the right of Extra key for trigger input method
Choose Disabled
Check Enable Hotkey to scroll Between Input Method
Check Include Inactive when scrolling between Input Method
Close the fcitx windows
Ensure your settings match the settings shown in the image below
Enabling fcitx at startup
Gnome and Xfce desktop environments will automatically add fcitx
to their startup applications.
Openbox requires you to put fcitx &
in your ~/.config/openbox/autostart
file. The fcitx
part tells Openbox to start fcitx on startup, and the &
part tells your computer to run fcitx as a background process.
If you are not using Gnome, Xfce, or Openbox, continue to the section below.
To enable fcitx at startup
Add the following contents to your
~/.xinitrc
file:fcitx
Logout then log back in
Making sure fcitx is working correctly
This section will guide you through a series of tests to ensure fcitx is workign correctly.
To make sure fcitx is working correctly
- Open up something you can type text into
- Hold down Ctrl
- While continuing to hold down ctrl, press spacebar
- Release spacebar
- Release Ctrl
You should now see the keyboard icon you saw earlier, if you have a taskbar, panel, or system tray .