For the complete documentation index, see llms.txt. This page is also available as Markdown.

12.5 Wubi Input Method

The Wubi input method is a commonly used shape-based input method in the field of Chinese input. FreeBSD can implement Wubi support through either the IBus + Rime or Fcitx 5 + Wubi Pinyin combination.

IBus Input Method Framework

IBus must be installed and configured first; this section does not provide detailed instructions.

Installing the Rime Input Method

Under the IBus framework, the Wubi input method is used by installing the Rime input method.

  • Install using pkg:

# pkg install zh-ibus-rime

Or install using Ports:

# cd /usr/ports/chinese/ibus-rime/
# make install clean

Run the initialization command ibus-setup in the terminal to add the rime input method:

Adding Rime input method

Configuring the Rime Input Method

After installation, configure the Rime input method to use the Wubi input method.

Copy the 98 Wubi table files (free-bsd-98wubi-tables-master/wubi98.dict.yaml and free-bsd-98wubi-tables-master/wubi98.schema.yaml) to the /usr/local/share/rime-data directory. 98 Wubi table download address: FreeBSD-98wubi-tables. This repository provides 98 Wubi input method table files for FreeBSD.

Configuration file structure:

Edit the user-level configuration file ~/.config/ibus/rime/default.custom.yaml (IBus) or ~/.local/share/fcitx5/rime/default.custom.yaml (Fcitx 5). Write the following content:

Note

default.custom.yaml is Rime's user-level patch file, which overrides the corresponding configuration items in the system-level default.yaml through the patch mechanism, without the need to directly modify system files. Redeploying the Rime input method will apply the changes.

Save and exit. Redeploy the Rime input method to apply the changes.

Configuring Rime input method
Rime configuration interface

Fcitx 5

In addition to IBus, the Wubi input method can also be used under the Fcitx 5 input method framework.

Installing Fcitx 5

The specific configuration steps for Fcitx 5 are not covered in detail in this section.

Configuring 98 Wubi in Fcitx 5

To configure the 98 Wubi input method under the Fcitx 5 framework, follow these steps:

Download the required files from https://github.com/FreeBSD-Ask/98-input.

  • Copy the 98五笔/98wbx.conf file to the /usr/local/share/fcitx5/inputmethod/ directory;

  • Copy the 98五笔/fcitx-98wubi.png and org.fcitx.Fcitx5.fcitx-98wubi.png icons to the /usr/local/share/icons/hicolor/48x48/apps/ directory;

  • Place the 98五笔/98wbx.main.dict dictionary in the /usr/local/share/libime/ directory.

  • Restart fcitx5 and enable 98 Wubi in the settings.

Related file structure:

Fcitx 5 configuration interface
Fcitx 5 input method settings

Appendix: Method for Generating .dict Library from Wangma 98 Wubi

Use the libime tool to convert 98wbx.txt to the 98wbx.main.dict dictionary file:

Configuring Rime to Use 86 Wubi

Install and configure Fcitx 5; configuration steps are omitted.

Install using pkg:

Or install using Ports:

The method for adding the Rime input method is the same as above.

Edit the user-level configuration file default.custom.yaml (create it if it does not exist) and write the following content:

Configuration Files

After installing the Wubi input method, the Rime configuration file locations are as follows:

  • Rime configuration file path under IBus

  • Rime configuration file path under Fcitx 5

Related file structure:

Modifying Candidate Characters to Display 9 Columns Per Page

First switch to the configuration file directory mentioned above, then perform the following operations.

Method ①

Use the rime_patch tool to generate a menu for the default Rime input method:

Where:

  • default corresponds to the default.custom.yaml file

  • menu corresponds to the first-level option, page_size corresponds to the second-level option

Restart.

Method ②

Use the rime_patch tool to generate a menu with page size settings for the default Rime input method:

Restart.

Method 2 is recommended for configuration; Method 1 requires some understanding of the configuration file format in complex scenarios.

Default English Output

Use the rime_patch tool to reset the first switch (ascii_mode) configuration of the wubi86 input method:

Here the patch is applied to the wubi86 input method (written to the wubi86.custom.yaml file); most options are input method-related, while a few options are global settings (written to the default.custom.yaml file).

Restart.

IBus Horizontal Output

Edit the ~/.config/ibus/rime/ibus_rime.custom.yaml file, write the following content, and redeploy the input method or restart:

IBus horizontal layout setting

Troubleshooting

Directly modifying system-level files (such as /usr/local/share/rime-data/default.yaml) affects global settings and can easily be overwritten during system updates. It is recommended to always customize through user-level configuration files (default.custom.yaml).

References

Last updated