How to setup chinese and input method?

Garuda seems not to have an Input Method Module by default. Through the KDE System Settings > Keyboard > Configure layouts it won't work setting up chinese and neither japanese IMEs.

I read the Arch Wiki and installed these Fcitx5 packages:

fcitx5
fcitx5-chewing
fcitx5-chinese-addons
fcitx5-configtool
fcitx5-gtk
fcitx5-qt
fcitx5-table-extra
fcitx5-table-other

And I've added the entry on /etc/environment/

GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS=@im=fcitx

This is the log from fcitx5-diagnose:

`╭─william@GLaDOS in ~  
╰─λ fcitx5-diagnose
# System Info:
1.  `uname -a`:

Linux GLaDOS 5.12.6-zen1-1-zen #1 ZEN SMP PREEMPT Sun, 23 May 2021 00:45:48 +0000 x86_64 GNU/Linux

2.  `lsb_release -a`:

LSB Version:    1.4
Distributor ID: Garuda                                                                                 
Description:    Garuda Linux                                                                           
Release:        Soaring                                                                                
Codename:       Spotted-Eagle                                                                          

3.  `lsb_release -d`:

Description:    Garuda Linux

4.  `/etc/lsb-release`:

LSB_VERSION=1.4
DISTRIB_ID=Garuda                                                                                      
DISTRIB_RELEASE=Soaring                                                                                
DISTRIB_DESCRIPTION="Garuda Linux"                                                                     
DISTRIB_CODENAME=Spotted-Eagle                                                                         

5.  `/etc/os-release`:

NAME="Garuda Linux"
PRETTY_NAME="Garuda Linux"                                                                             
ID=garuda                                                                                              
ID_LIKE=arch                                                                                           
BUILD_ID=rolling                                                                                       
ANSI_COLOR="38;2;23;147;209"                                                                           
HOME_URL="https://garudalinux.org/"                                                                    
DOCUMENTATION_URL="https://wiki.garudalinux.org/"                                                      
SUPPORT_URL="https://forum.garudalinux.org/"                                                           
BUG_REPORT_URL="https://gitlab.com/groups/garuda-linux/"                                               
LOGO=garudalinux                                                                                       

6.  Desktop Environment:

Desktop environment is `kde`.

7.  Bash Version:

BASH_VERSION='5.1.8(1)-release'

# Environment:
1.  DISPLAY:                                                                                                   

DISPLAY=':0'

2.  Keyboard Layout:

1.  `setxkbmap`:

xkb_keymap {
xkb_keycodes  { include "evdev+aliases(qwerty)" };                                             
xkb_types     { include "complete"      };                                                     
xkb_compat    { include "complete"      };                                                     
xkb_symbols   { include "pc+cn(altgr-pinyin)+br:2+jp:3+inet(evdev)"     };                     
xkb_geometry  { include "pc(pc86)"      };                                                     
};                                                                                                 

2.  `xprop`:

_XKB_RULES_NAMES(STRING) = "evdev", "pc86", "cn,br,jp", "altgr-pinyin,,", ""

3.  Locale:

1.  All locale:

C
en_US.utf8                                                                                         
POSIX                                                                                              
pt_BR.utf8                                                                                         

2.  Current locale:

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"                                                                             
LC_NUMERIC=pt_BR.UTF-8                                                                             
LC_TIME=pt_BR.UTF-8                                                                                
LC_COLLATE="en_US.UTF-8"                                                                           
LC_MONETARY=pt_BR.UTF-8                                                                            
LC_MESSAGES="en_US.UTF-8"                                                                          
LC_PAPER=pt_BR.UTF-8                                                                               
LC_NAME=pt_BR.UTF-8                                                                                
LC_ADDRESS=pt_BR.UTF-8                                                                             
LC_TELEPHONE=pt_BR.UTF-8                                                                           
LC_MEASUREMENT=pt_BR.UTF-8                                                                         
LC_IDENTIFICATION=pt_BR.UTF-8                                                                      
LC_ALL=                                                                                            

4.  Directories:

1.  Home:

/home/william

2.  `${XDG_CONFIG_HOME}`:

Environment variable `XDG_CONFIG_HOME` is not set.

Current value of `XDG_CONFIG_HOME` is `~/.config` (`/home/william/.config`).

3.  Fcitx5 Settings Directory:

Current fcitx5 settings directory is `~/.config/fcitx5` (`/home/william/.config/fcitx5`).

5.  Current user:

The script is run as william (1000).

# Fcitx State:
1.  executable:                                                                                                

Found fcitx5 at `/usr/bin/fcitx5`.

2.  version:

Fcitx version: `5.0.8`

3.  process:

Found 1 fcitx5 process:

2746 fcitx5

4.  `fcitx5-remote`:

`fcitx5-remote` works properly.

5.  DBus interface:

Using `dbus-send` to check dbus.

Owner of DBus name `org.fcitx.Fcitx5` is `:1.109`.

PID of DBus name `org.fcitx.Fcitx5` owner is `2746`.

# Fcitx Configure UI:
1.  Config Tool Wrapper:                                                                                       

Found fcitx5-configtool at `/usr/bin/fcitx5-configtool`.

2.  Config GUI for qt:

Found `fcitx5-config-qt` at `/usr/bin/fcitx5-config-qt`.

3.  Config GUI for kde:

Found fcitx5 kcm module.

kcm_fcitx5                 - Configure Input Method

# Frontends setup:
## Xim:                                                                                                        
1.  `${XMODIFIERS}`:                                                                                           

Environment variable XMODIFIERS is set to "@im=fcitx" correctly.
Xim Server Name from Environment variable is fcitx.

2.  XIM_SERVERS on root window:

Xim server name is the same with that set in the environment variable.

## Qt:
1.  qt4 - `${QT4_IM_MODULE}`:                                                                                  

Environment variable QT_IM_MODULE is set to "fcitx" correctly.

2.  qt5 - `${QT_IM_MODULE}`:

Environment variable QT_IM_MODULE is set to "fcitx" correctly.

3.  Qt IM module files:

Found unknown fcitx qt module: `/usr/lib/qt/plugins/kcms/kcm_fcitx5.so`.
Found fcitx5 im module for qt: `/usr/lib/qt/plugins/platforminputcontexts/libfcitx5platforminputcontextplu
gin.so`.                                                                                                       
Found fcitx5 qt5 module: `/usr/lib/fcitx5/qt5/libfcitx-quickphrase-editor5.so`.
Found fcitx5 im module for qt6: `/usr/lib/qt6/plugins/platforminputcontexts/libfcitx5platforminputcontextp
lugin.so`.                                                                                                     
**Cannot find fcitx5 input method module for Qt4.**

## Gtk:
1.  gtk - `${GTK_IM_MODULE}`:                                                                                  

Environment variable GTK_IM_MODULE is set to "fcitx" correctly.

2.  `gtk-query-immodules`:

1.  gtk 2:

Found `gtk-query-immodules` for gtk `2.24.33` at `/usr/bin/gtk-query-immodules-2.0`.
Version Line:

# Created by /usr/bin/gtk-query-immodules-2.0 from gtk+-2.24.33

Found fcitx5 im modules for gtk `2.24.33`.

"/usr/lib/gtk-2.0/2.10.0/immodules/im-fcitx5.so"  
"fcitx" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*"            
"fcitx5" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*"           

2.  gtk 3:

Found `gtk-query-immodules` for gtk `3.24.29` at `/usr/bin/gtk-query-immodules-3.0`.
Version Line:

# Created by /usr/bin/gtk-query-immodules-3.0 from gtk+-3.24.29

Found fcitx5 im modules for gtk `3.24.29`.

"/usr/lib/gtk-3.0/3.0.0/immodules/im-fcitx5.so"  
"fcitx" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*"            
"fcitx5" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*"           

3.  Gtk IM module cache:

1.  gtk 2:

Found immodules cache for gtk `2.24.33` at `/usr/lib/gtk-2.0/2.10.0/immodules.cache`.
Version Line:

# Created by /usr/bin/gtk-query-immodules-2.0 from gtk+-2.24.33

Found fcitx5 im modules for gtk `2.24.33`.

"/usr/lib/gtk-2.0/2.10.0/immodules/im-fcitx5.so"  
"fcitx" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*"            
"fcitx5" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*"           

2.  gtk 3:

Found immodules cache for gtk `3.24.29` at `/usr/lib/gtk-3.0/3.0.0/immodules.cache`.
Version Line:

# Created by /usr/bin/gtk-query-immodules-3.0 from gtk+-3.24.29

Found fcitx5 im modules for gtk `3.24.29`.

"/usr/lib/gtk-3.0/3.0.0/immodules/im-fcitx5.so"  
"fcitx" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*"            
"fcitx5" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*"           

3.  gtk 4:

**Cannot find immodules cache for gtk 4**

**Cannot find fcitx5 im module for gtk 4 in cache.**

4.  Gtk IM module files:

1.  gtk 2:

All found Gtk 2 immodule files exist.

2.  gtk 3:

All found Gtk 3 immodule files exist.

3.  gtk 4:

All found Gtk 4 immodule files exist.

# Configuration:
## Fcitx Addons:                                                                                               
1.  Addon Config Dir:                                                                                          

Found fcitx5 addon config directory: `/usr/share/fcitx5/addon`.

2.  Addon List:

1.  Found 30 enabled addons:

Chewing
Simplified and Traditional Chinese Translation                                                     
Classic User Inteface                                                                              
Clipboard                                                                                          
Cloud Pinyin                                                                                       
DBus                                                                                               
DBus Frontend                                                                                      
Emoji                                                                                              
Fcitx4 Frontend                                                                                    
Full width character                                                                               
IBus Frontend                                                                                      
Lua IME API                                                                                        
Input method selector                                                                              
Keyboard                                                                                           
KDE Input Method Panel                                                                             
Lua Addon Loader                                                                                   
M17N                                                                                               
Status Notifier                                                                                    
Notification                                                                                       
Pinyin                                                                                             
Extra Pinyin functionality                                                                         
Punctuation                                                                                        
Quick Phrase                                                                                       
Spell                                                                                              
Table                                                                                              
Unicode                                                                                            
Wayland                                                                                            
Wayland Input method frontend
XCB
X Input Method Frontend

2.  Found 0 disabled addons:

3.  Addon Libraries:

All libraries for all addons are found.

4.  User Interface:

Found 2 enabled user interface addons:

Classic User Inteface
KDE Input Method Panel

# Log:
1.  `date`:

ter 25 mai 2021 22:44:34 -03

2.  `/home/william/.config/fcitx5/crash.log`:

`/crash.log` not found.`

Read

If you include terminal outputs in your post please use the proper output format in your post. Using "~" 3 times above and "~" 3 times below the text block will provide a readable, raw look.

and
:slight_smile:

1 Like

Thanks @SGS, I found out this step by step that did work on getting japanese and chinese layouts IMEs:

  1. Run the command: sudo pacman -Syu fcitx fcitx-googlepinyin fcitx-im fcitx-configtool
  2. Edit ~/.xinitrc ( as I use startx):
# .xprofile or .xinitrc
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
  1. Logout and then login
  2. Launch Fcitx Config GUI from contrl center, add Google Pinyin.
    How to install Chinese fonts and input method in Arch Linux | by Stanley Meng | Medium
4 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.