Type in Japanese with a US keyboard

I want to type in Japanese and I have a US keyboard. This are the steps I have done so far

sudo pacman -S fcitx-im

:: There are 2 members in group fcitx-im:
:: Repository community
   1) fcitx  2) fcitx-qt5

Enter a selection (default=all): 
resolving dependencies...
looking for conflicting packages...

Packages (2) fcitx-4.2.9.8-1  fcitx-qt5-1.2.6-1

Total Download Size:    8.14 MiB
Total Installed Size:  35.58 MiB

:: Proceed with installation? [Y/n] Y
:: Retrieving packages...
 fcitx-4.2.9.8-1-...     8.0 MiB  2.02 MiB/s 00:04 [######################] 100%
 fcitx-qt5-1.2.6-...   186.9 KiB   692 KiB/s 00:00 [######################] 100%
 Total (2/2)             8.1 MiB  1876 KiB/s 00:04 [######################] 100%
(2/2) checking keys in keyring                     [######################] 100%
(2/2) checking package integrity                   [######################] 100%
(2/2) loading package files                        [######################] 100%
(2/2) checking for file conflicts                  [######################] 100%
(2/2) checking available disk space                [######################] 100%
:: Processing package changes...
(1/2) installing fcitx                             [######################] 100%
Optional dependencies for fcitx
    enchant: for word predication support [installed]
    opencc: optional engine to do chinese convert
    gettext: for fcitx-po-parser [installed]
    fcitx-configtool: for configuration (GTK based)
    kcm-fcitx: for configuration under KDE
(2/2) installing fcitx-qt5                         [######################] 100%
:: Running post-transaction hooks...
(1/7) Arming ConditionNeedsUpdate...
(2/7) Refreshing PackageKit...
(3/7) Probing GTK2 input method modules...
(4/7) Probing GTK3 input method modules...
(5/7) Updating icon theme caches...
(6/7) Updating the desktop file MIME type cache...
(7/7) Updating the MIME type database...

sudo pacman -S ibus

warning: ibus-1.5.25-3 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) ibus-1.5.25-3

Total Installed Size:  7.58 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 ibus-1.5.25-3-x86_64 is up to date
(1/1) checking keys in keyring                     [######################] 100%
(1/1) checking package integrity                   [######################] 100%
(1/1) loading package files                        [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
(1/1) checking available disk space                [######################] 100%
:: Running pre-transaction hooks...
(1/1) Creating Timeshift snapshot before upgrade...
==> skipping timeshift-autosnap due skipRsyncAutosnap in /etc/timeshift-autosnap.conf set to TRUE.
:: Processing package changes...
(1/1) reinstalling ibus                            [######################] 100%
:: Running post-transaction hooks...
(1/8) Arming ConditionNeedsUpdate...
(2/8) Refreshing PackageKit...
(3/8) Updating system dconf databases...
(4/8) Compiling GSettings XML schema files...
(5/8) Probing GTK2 input method modules...
(6/8) Probing GTK3 input method modules...
(7/8) Updating icon theme caches...
(8/8) Updating the desktop file MIME type cache...

nano /etc/environment

  GNU nano 5.9                    /etc/environment                              
#
# This file is parsed by pam_env module
#
# Syntax: simple "KEY=VAL" pairs on separate lines
#
GTK_IM_MODULE=ibus
QT_IM_MODULE=ibus
XMODIFIERS=@im=ibus












                                [ Read 8 lines ]
^G Help      ^O Write Out ^W Where Is  ^K Cut       ^T Execute   ^C Location
^X Exit      ^R Read File ^\ Replace   ^U Paste     ^J Justify   ^/ Go To Line

ibus-daemon -drxR

What else am i missing? Thanks in advanced. Additional info:
inxi -Fazy

System:
  Kernel: 5.14.10-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.14-x86_64
  root=UUID=ef4e4c8f-309a-4d13-a170-4bb076485909 rw quiet apparmor=1
  security=apparmor resume=UUID=99de7c2a-e392-4477-8a3f-913dcb8bc315
  udev.log_priority=3
  Console: pty pts/4 wm: kwin_x11 DM: SDDM Distro: Manjaro Linux
  base: Arch Linux
Machine:
  Type: Laptop System: Acer product: Aspire A514-53 v: V1.16 serial: <filter>
  Chassis: type: 10 serial: N/A
  Mobo: IL model: Sneezy_IL v: V1.16 serial: <filter> UEFI: Insyde v: 1.16
  date: 01/18/2021
Battery:
  ID-1: BAT0 charge: 30.8 Wh (100.0%) condition: 30.8/53.0 Wh (58.2%)
  volts: 16.5 min: 15.4 model: PANASONIC KT004 AP19B5L type: Li-ion
  serial: <filter> status: Full cycles: 386
CPU:
  Info: Dual Core model: Intel Core i3-1005G1 socket: U3E1 bits: 64
  type: MT MCP arch: Ice Lake family: 6 model-id: 7E (126) stepping: 5
  microcode: A6 cache: L2: 4 MiB
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  bogomips: 9524
  Speed: 3026 MHz min/max: 400/3400 MHz base/boost: 3400/8300 volts: 1.0 V
  ext-clock: 100 MHz Core speeds (MHz): 1: 3026 2: 3349 3: 3087 4: 3050
  Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: spec_store_bypass
  mitigation: Speculative Store Bypass disabled via prctl and seccomp
  Type: spectre_v1
  mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Enhanced IBRS, IBPB: conditional, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel Iris Plus Graphics G1 vendor: Acer Incorporated ALI
  driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:8a56 class-ID: 0300
  Device-2: Chicony HD User Facing type: USB driver: uvcvideo bus-ID: 1-6:4
  chip-ID: 04f2:b64f class-ID: 0e02 serial: <filter>
  Display: server: X.Org 1.20.13 compositor: kwin_x11 driver:
  loaded: modesetting alternate: fbdev,vesa display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 361x203mm (14.2x8.0")
  s-diag: 414mm (16.3")
  Monitor-1: eDP-1 res: 1366x768 hz: 60 dpi: 112 size: 309x173mm (12.2x6.8")
  diag: 354mm (13.9")
  OpenGL: renderer: Mesa Intel UHD Graphics (ICL GT1) v: 4.6 Mesa 21.2.3
  direct render: Yes
Audio:
  Device-1: Intel Ice Lake-LP Smart Sound Audio vendor: Acer Incorporated ALI
  driver: snd_hda_intel v: kernel alternate: snd_sof_pci_intel_icl
  bus-ID: 00:1f.3 chip-ID: 8086:34c8 class-ID: 0401
  Device-2: C-Media USB PnP Sound Device type: USB
  driver: hid-generic,snd-usb-audio,usbhid bus-ID: 1-4:23 chip-ID: 0d8c:013a
  class-ID: 0300
  Sound Server-1: ALSA v: k5.14.10-1-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.19 running: no
  Sound Server-3: PulseAudio v: 15.0 running: yes
  Sound Server-4: PipeWire v: 0.3.38 running: yes
Network:
  Device-1: Intel Ice Lake-LP PCH CNVi WiFi driver: iwlwifi v: kernel
  bus-ID: 00:14.3 chip-ID: 8086:34f0 class-ID: 0280
  IF: wlp0s20f3 state: up mac: <filter>
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
  vendor: Acer Incorporated ALI driver: r8169 v: kernel port: 3000
  bus-ID: 01:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp1s0 state: down mac: <filter>
  IF-ID-1: br-058257d9edb9 state: down mac: <filter>
  IF-ID-2: br-062f9e47a08d state: down mac: <filter>
  IF-ID-3: docker0 state: down mac: <filter>
  IF-ID-4: ipv6leakintrf0 state: unknown speed: N/A duplex: N/A mac: <filter>
  IF-ID-5: proton0 state: unknown speed: 10 Mbps duplex: full mac: N/A
Bluetooth:
  Device-1: Intel AX201 Bluetooth type: USB driver: btusb v: 0.8
  bus-ID: 1-10:5 chip-ID: 8087:0026 class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 5 state: down bt-service: enabled,running
  rfk-block: hardware: no software: yes address: see --recommends
RAID:
  Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci
  v: 3.0 port: 4060 bus-ID: 00:17.0 chip-ID: 8086:282a rev: N/A class-ID: 0104
  Device-1: md127 maj-min: 9:127 type: mdraid level: N/A status: inactive
  size: N/A
  Info: report: N/A blocks: 2944 chunk-size: N/A
  Components: Online: N/A Spare:
  0: nvme1n1 maj-min: 259:6 size: 27.25 GiB state: S
Drives:
  Local Storage: total: 1.4 TiB used: 288.53 GiB (20.1%)
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Intel model: HBRPEKNX0202A
  size: 476.94 GiB block-size: physical: 512 B logical: 512 B speed: 15.8 Gb/s
  lanes: 2 type: SSD serial: <filter> rev: G002 temp: 35.9 C scheme: GPT
  SMART: yes health: PASSED on: 241d 1h cycles: 1,776
  read-units: 14,157,706 [7.24 TB] written-units: 28,901,835 [14.7 TB]
  ID-2: /dev/nvme1n1 maj-min: 259:6 vendor: Intel model: HBRPEKNX0202AO
  size: 27.25 GiB block-size: physical: 512 B logical: 512 B speed: 15.8 Gb/s
  lanes: 2 type: SSD serial: <filter> rev: K5110440 temp: 48.9 C
  SMART: yes health: PASSED on: 288d 16h cycles: 1,777
  read-units: 40,112,074 [20.5 TB] written-units: 42,929,075 [21.9 TB]
  ID-3: /dev/sda maj-min: 8:0 vendor: Seagate model: ST1000LM048-2E7172
  family: Barracuda 2.5 5400 size: 931.51 GiB block-size: physical: 4096 B
  logical: 512 B sata: 3.1 speed: 6.0 Gb/s type: HDD rpm: 5400
  serial: <filter> rev: 0001 temp: 35 C scheme: GPT
  SMART: yes state: enabled health: PASSED on: 254d 11h cycles: 1751
  read: 5.01 TiB written: 3.72 TiB Old-Age: g-sense error rate: 356 Pre-Fail:
  attribute: Spin_Retry_Count value: 100 worst: 100 threshold: 97
Partition:
  ID-1: / raw-size: 186.26 GiB size: 182.28 GiB (97.86%)
  used: 29.46 GiB (16.2%) fs: ext4 block-size: 4096 B dev: /dev/nvme0n1p3
  maj-min: 259:3
  ID-2: /boot/efi raw-size: 476 MiB size: 475.1 MiB (99.80%)
  used: 27.6 MiB (5.8%) fs: vfat block-size: 512 B dev: /dev/nvme0n1p2
  maj-min: 259:2
  ID-3: /home raw-size: 93.13 GiB size: 91.11 GiB (97.83%)
  used: 48.95 GiB (53.7%) fs: ext4 block-size: 4096 B dev: /dev/nvme0n1p4
  maj-min: 259:4
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 14.9 GiB used: 1.26 GiB (8.4%)
  priority: -2 dev: /dev/nvme0n1p1 maj-min: 259:1
Sensors:
  System Temperatures: cpu: 61.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 251 Uptime: 3d 7h 52m wakeups: 6 Memory: 7.45 GiB
  used: 6.75 GiB (90.5%) Init: systemd v: 249 tool: systemctl Compilers:
  gcc: 11.1.0 clang: 12.0.1 Packages: pacman: 1466 lib: 431 flatpak: 0
  Shell: Bash (sudo) v: 5.1.8 running-in: terminator inxi: 3.3.08

If you want to use Fcitx to input Japanese, you also need to install at least one Japanese IME (Mozc or anthy).

I recommend you read the Arch wiki carefully.
https://wiki.archlinux.org/title/Fcitx5#Japanese

Also, you might want to use Fcitx5, the latest version of Fcitx.

After you installed the Japanese IME, open your Fcitx configuration tool and click the “Add input method” at the right bottom.

I’m actually using a JP keyboard with US layout to type in Japanese. (yeah, I know it sounds wired.)

Fcitx5 is really a good and powerful input framework for multi-language usage, enjoy it.

I ran these following commands:

☁  ~  sudo pacman -S fcitx5-mozc

[sudo] password for soumi: 
resolving dependencies...
looking for conflicting packages...
:: fcitx5 and fcitx are in conflict. Remove fcitx? [y/N] y
error: failed to prepare transaction (could not satisfy dependencies)
:: removing fcitx breaks dependency 'fcitx' required by fcitx-qt5
☁  ~  sudo pacman -Rs fcitx fcitx5            
error: target not found: fcitx5
☁  ~  sudo pacman -Rs fcitx
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing fcitx breaks dependency 'fcitx' required by fcitx-qt5
☁  ~  sudo pacman -Rs fcitx-qt5   
checking dependencies...

Packages (1) fcitx-qt5-1.2.6-1

Total Removed Size:  0.69 MiB

:: Do you want to remove these packages? [Y/n] y
:: Processing package changes...
(1/1) removing fcitx-qt5                           [######################] 100%
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Refreshing PackageKit...
☁  ~  sudo pacman -Rs fcitx
checking dependencies...

Packages (1) fcitx-4.2.9.8-1

Total Removed Size:  34.89 MiB

:: Do you want to remove these packages? [Y/n] y
:: Processing package changes...
(1/1) removing fcitx                               [######################] 100%
:: Running post-transaction hooks...
(1/7) Arming ConditionNeedsUpdate...
(2/7) Refreshing PackageKit...
(3/7) Probing GTK2 input method modules...
(4/7) Probing GTK3 input method modules...
(5/7) Updating icon theme caches...
(6/7) Updating the desktop file MIME type cache...
(7/7) Updating the MIME type database...
☁  ~  sudo pacman -S fcitx5-mozc

resolving dependencies...
looking for conflicting packages...

Packages (4) fcitx5-5.0.9-1  unicode-cldr-annotations-38.0-2
             xcb-imdkit-1.0.3-1  fcitx5-mozc-2.26.4360.102.gca82d39-1

Total Download Size:   20.85 MiB
Total Installed Size:  68.41 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 fcitx5-mozc-2.26...    14.4 MiB  2.22 MiB/s 00:06 [######################] 100%
 unicode-cldr-ann...     3.4 MiB  1111 KiB/s 00:03 [######################] 100%
 fcitx5-5.0.9-1-x...     2.8 MiB  1967 KiB/s 00:01 [######################] 100%
 xcb-imdkit-1.0.3...   344.4 KiB   349 KiB/s 00:01 [######################] 100%
 Total (4/4)            20.9 MiB  1515 KiB/s 00:14 [######################] 100%
(4/4) checking keys in keyring                     [######################] 100%
(4/4) checking package integrity                   [######################] 100%
(4/4) loading package files                        [######################] 100%
(4/4) checking for file conflicts                  [######################] 100%
(4/4) checking available disk space                [######################] 100%
:: Processing package changes...
(1/4) installing xcb-imdkit                        [######################] 100%
(2/4) installing unicode-cldr-annotations          [######################] 100%
(3/4) installing fcitx5                            [######################] 100%
(4/4) installing fcitx5-mozc                       [######################] 100%
:: Running post-transaction hooks...
(1/4) Arming ConditionNeedsUpdate...
(2/4) Refreshing PackageKit...
(3/4) Updating icon theme caches...
(4/4) Updating the desktop file MIME type cache...
☁  ~  sudo pacman -S fcitx5     
warning: fcitx5-5.0.9-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) fcitx5-5.0.9-1

Total Installed Size:  11.10 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                     [######################] 100%
(1/1) checking package integrity                   [######################] 100%
(1/1) loading package files                        [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
(1/1) checking available disk space                [######################] 100%
:: Running pre-transaction hooks...
(1/1) Creating Timeshift snapshot before upgrade...
==> skipping timeshift-autosnap due skipRsyncAutosnap in /etc/timeshift-autosnap.conf set to TRUE.
:: Processing package changes...
(1/1) reinstalling fcitx5                          [######################] 100%
:: Running post-transaction hooks...
(1/4) Arming ConditionNeedsUpdate...
(2/4) Refreshing PackageKit...
(3/4) Updating icon theme caches...
(4/4) Updating the desktop file MIME type cache...

[Hori ~]# nano /etc/environment

  GNU nano 5.9                    /etc/environment                              
#
# This file is parsed by pam_env module
#
# Syntax: simple "KEY=VAL" pairs on separate lines
#
GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS=@im=fcitx












                                [ Read 8 lines ]
^G Help      ^O Write Out ^W Where Is  ^K Cut       ^T Execute   ^C Location
^X Exit      ^R Read File ^\ Replace   ^U Paste     ^J Justify   ^/ Go To Line

It led me to another problem…when I try to run fcitx 5 Configuration, it gives me this error:

You're currently running KDE, but KCModule for fcitx couldn't be found, the package name of this KCModule is usually kcm-fcitx or kde-config-fcitx. Now it will open config directory.
The file or folder /home/soumi/.config/fcitx5 does not exist.

What should I do? Did I do something wrong?

Have you installed the fcitx5-configtool package?

not yet. i’ll try that

If you do not install that package, then I’m afraid that you will have to create the configuration file and do all the config on your own.

Hi. Was working on it a while ago.
Here’s the forum thread.

Probably more of the same but more condensed. Have a look.

You either do mozc with ibus or mozc with fcitx.

Fcitx5 and all necessary components are in the repos and are faster to install.

Ibus has better integration with in gnome.

1 Like

I finished installing the package. What should I do next?

Thanks for this! I will try this. I just want to ask. Does ibus conflict with fcitx5 in KDE Plasma? Thanks

Ibus and fcitx5 are two tools for the same purpose.

For plasma I recommend fcitx5.

Start your Fcitx, then you should be able to see an icon appear in your panel. Right-click on it, choose “Configure”, and you should be able to open the GUI configuration tool.

Also, remember to add Fcitx to autostart list.

I have now tried this. I can now type in Japanese! Thanks. Btw I want to ask…what’s the keyboard shortcut for switching languages in fcitx5? Thanks

If it’s not there after that logging out and in should fix it.

How can I do that? adding something to autostart list is something new to me. Thanks

Voilà.

2 Likes

I personally haven’t had to do it manually. If after logging out and logging in. You have the keyboard icon in the system tray - then you are fine.

1 Like

Oh thank you for that.

Nice thanks for the help

Something other than installation and configuration, if you are using a US keyboard, you will not be able to use the “無変換” key. This key is really useful for Japanese input, espescially for Katagana and half-width Katagana. This key is the only point I like about Japanese keyboard.

1 Like

If you have an empty desktop in front of you, you can just start typing and krunner will find it for you. It also searches among your files and browser bookmarks.

1 Like