Bug 469832 - AppArmor prevents fcitx5 working on Firefox
Summary: AppArmor prevents fcitx5 working on Firefox
Status: REPORTED
Alias: None
Product: neon
Classification: KDE Neon
Component: Packages User Edition (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Neon Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-16 03:03 UTC by Jumpei Ogawa
Modified: 2023-05-16 03:03 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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