Bug 2243053 - Can't switch to Mozc to input Japanese characters with fcitx5-mozc
Summary: Can't switch to Mozc to input Japanese characters with fcitx5-mozc
Keywords:
Status: CLOSED COMPLETED
Alias: None
Product: Fedora
Classification: Fedora
Component: fcitx-qt5
Version: 38
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Qiyu Yan
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-10-10 12:13 UTC by james
Modified: 2023-10-11 09:50 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-10-11 09:50:34 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description james 2023-10-10 12:13:17 UTC
I'm trying to input Japanese characters with fcitx5-mozc on KDE Wayland, Fedora 38. I have this set in `/etc/profile.d/fcitx`:

```
QT_IM_MODULE=fcitx && export QT_IM_MODULE
GTK_IM_MODULE=fcitx && export GTK_IM_MODULE
XMODIFIERS=@im=fcitx && export XMODIFIERS
```

`fcitx5-diagnose` tells me the environment variables are set correctly.  I can confirm that myself when running `env` in a terminal.

I see two options (US and Mozc), but neither of the radio buttons is selected. After I click Mozc, the radio button is still unselected and I can't input Japanese characters.

I've tried inputting characters on Firefox, Alacritty, and Kwrite.

Reproducible: Always

Steps to Reproduce:
1. Install fcitx5-mozc
2. Add the environment variables
3. Reboot
4. Run fcitx5
5. Open configuration and add Mozc to the input method list
6. Try to switch to the Mozc IME to type Japanese
Actual Results:  
I can't switch to Mozc and when I type, I only get US letters.

Expected Results:  
I can type in 日本語.

Comment 1 james 2023-10-11 01:19:00 UTC
Referred issue upstream: https://github.com/fcitx/fcitx5/issues/874

Comment 2 james 2023-10-11 05:44:22 UTC
I resolved the issue by killing fcitx5, running `im-chooser` in the terminal, clicking fcitx, logging out, and logging back in again on the maintainer's suggestion.

I also needed to make sure fcitx was selected as the Virtual Keyboard in KDE's settings.

My impression is that this bug is probably related to Fedora-specific configuration, as im-chooser appears to be Fedora-exclusive. I'll keep this bug open as I think one of two things should be done:

1. Choosing fcitx as the Virtual Keyboard in KDE should work properly to begin with.
2. There should be documentation somewhere explaining you need to run im-chooser and select fcitx afterward.

Comment 3 Qiyu Yan 2023-10-11 06:58:34 UTC
Actually there is some documentation on how to setup fcitx5: https://fedoraproject.org/wiki/I18N/Fcitx5 
I will try to update to make it more clear.

Comment 4 james 2023-10-11 08:37:12 UTC
Oh, I didn't realize Fedora had a whole other wiki! I thought it was just the stuff on docs.fedoraproject.org

I tried to login to the Wiki with my Fedora account, but it wouldn't let me because I have to be part of a group. I signed the FCPA. This is what I wanted to add under the Configuration section:

---

KDE Setup

You need to select Fcitx 5 as your virtual keyboard. To do this, open System Settings, click on Input Devices, click Virtual Keyboard, click Fcitx 5, and click Apply.

You will also need to set Fcitx 5 as the Input Method Engine in imsettings. To do this, run the im-chooser command in a terminal to open the program. When it opens, select Fcitx 5.

To add the input method of your choice, click on Regional Settings, click on Input Method, and click Add Input Method... Once you've added your input method, click Apply to save the changes.

Log out and log back in again. You can test your new input method by right-clicking the keyboard icon in your system tray and selecting the input method. The keyboard icon will only be displayed if Fcitx 5 is currently running. It's a good idea to test your input method in a few programs like Firefox, Kate, and in your terminal to ensure it is working correctly across programs that use different graphical toolkits.

If you still can't use your new input method and you're certain Fcitx 5 is running, you may need to reboot your computer for the changes to fully take effect.

If you're still facing issues, run fcitx5-diagnose in your terminal. This will detect the most common problems users face with Fcitx and is a good place to start troubleshooting.

---

If you need my authorization to incorporate this into the wiki, I'm happy to license it under CC-BY SA 4.0.

Comment 5 james 2023-10-11 08:40:31 UTC
Small correction:

It should probably say "To add the input method of your choice, **open System Settings,**". It's a bit unclear which program the user needs to use otherwise.

Comment 6 Qiyu Yan 2023-10-11 09:50:34 UTC
Thank you for the detailed guide, I added it to the wiki.


Note You need to log in before you can comment on or make changes to this bug.