Bug 469832

Summary: AppArmor prevents fcitx5 working on Firefox
Product: [KDE Neon] neon Reporter: Jumpei Ogawa <phanective>
Component: Packages User EditionAssignee: Neon Bugs <neon-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: jr, neon-bugs-null, sitter
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Jumpei Ogawa 2023-05-16 03:03:01 UTC
SUMMARY

I want to input Japanese using fcitx5, but I cannot input Japanese only on Firefox.
On other apps, fcitx5 works fine and I can input Japanese without any problems. It works appropriately on Kate (Qt-based), Inkscape (GTK-based), and Google Chrome (GTK-based?).
In addition, fcitx5 works on Firefox installed from snap. This issue only happens on Firefox from the PPA.

It is probably caused by AppArmor and it can be solved by disabling Firefox profile of AppArmor.


See ADDITIONAL INFORMATION section for details.

STEPS TO REPRODUCE
1. `sudo apt install firefox fcitx5 fcitx5-mozc kde-config-fcitx5` and reboot
2. Set mozc to the default IME of the fcitx5
3. Open Firefox, and press katakana/hiragana key (only exist in Japanese keyboard) to enable fcitx5
4. focus on the address bar and press "a" key for four times


OBSERVED RESULT

"aaaa" is entered in the address bar


EXPECTED RESULT

"ああああ" is entered in the address bar


SOFTWARE/OS VERSIONS

Linux/KDE Plasma: 
KDE Plasma Version: 5.27.4 (KDE neon 5.27)
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.9

Firefox version: 113.0, installed from https://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu (Mozilla PPA)
fcitx version: 5.0.23, installed from http://archive.neon.kde.org/user


ADDITIONAL INFORMATION

The following commands disable an AppArmor profile for Firefox.
By running these commands and restarting Firefox, I could successfully input Japanese using fcitx5 on Firefox from PPA.

```
$ sudo ln -s /etc/apparmor.d/usr.bin.firefox /etc/apparmor.d/disable/
$ sudo apparmor_parser -R /etc/apparmor.d/usr.bin.firefox
```

I hear Kubuntu disables this AppArmor profile by default to solve this issue.
I know it is not the best solution because it degrades the security level, but is it possible to disable the profile on KDE neon by default as well?

---

I asked fcitx developer and Ubuntu Japanese team member for help to investigate this problem. Here are the answers from them:

fcitx5 does not work only on Firefox
https://github.com/fcitx/fcitx5/discussions/789

Cannot input Japanese using fcitx5 on Firefox installed from the deb from the PPA (Japanese)
https://lists.ubuntu.com/archives/ubuntu-jp/2023-May/006616.html
Comment 1 Carlos De Maine 2025-09-20 09:36:23 UTC
Thank you for your bug report! 
However this bug report was created/provided previous to 01/01/2023 and also has not received any updates since  before 01/01/2025. 
Unfortunately KDE neon no longer provides updates for anything older than noble 24.04 based edition's.
Please upgrade to KDE neon noble and if you can reproduce the issue after upgrading to an active version, feel free to re-open this bug report.
Thanks for understanding!
Comment 2 Jumpei Ogawa 2025-09-20 12:54:44 UTC
I migrated to Google Chrome from Firefox and I'm not sure if this problem still happens, but IIRC, I guess this problem has been resolved before KDE neon's KDE6/Wayland  migration. Sorry for not closing this.

If I remember wrongly and the problem still happens, I will reopen this bug report.