Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ibus input methods other than default don't work #6

Open
sr258 opened this issue Nov 2, 2022 · 0 comments
Open

Ibus input methods other than default don't work #6

sr258 opened this issue Nov 2, 2022 · 0 comments

Comments

@sr258
Copy link

sr258 commented Nov 2, 2022

I'm trying to enter Chinese characters with ibus-libpinyin in Anki, but anki-ppd only seems to accept the default keyboard layout (German in my case). If I switch the input method to Chinese and type I still get the German keyboard layout. It also doesn't work if I start Anki with the Chinese layout already selected.

I can switch keyboard layouts in the Anki apt package from Ubuntu Universe (2.1.15+dfsg) and also in most other snaps (like Firefox, Insomnia, Lumi, Slack)._ There are a few snaps that don't work (VS Code).

I've done a bit of research and I believe that it's necessary to add some library to enable IBUS in Snaps: https://forum.snapcraft.io/t/cant-use-input-method-in-snap-apps/4712 (The thread is concerned with GTK 3, but I think the general issue is applicable to QT 5 as well). They mention the required libraries for GTK in the thread, but not for QT5.

It might also be a security violation issue, as suggested here: https://forum.snapcraft.io/t/ibus-input-method-not-available-in-qt5-applications/11712

However, the logs don't show any violations that are connected with IBUS, I think:

sudo journalctl --follow | grep audit
Nov 02 08:17:53 ubuntu-2204 audit[12452]: AVC apparmor="DENIED" operation="open" profile="snap.anki-ppd.anki" name="/etc/" pid=12452 comm="python3" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Nov 02 08:17:53 ubuntu-2204 kernel: audit: type=1400 audit(1667373473.364:397): apparmor="DENIED" operation="open" profile="snap.anki-ppd.anki" name="/etc/" pid=12452 comm="python3" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Nov 02 08:17:53 ubuntu-2204 audit[12452]: SECCOMP auid=1000 uid=1000 gid=1000 ses=3 subj=? pid=12452 comm="python3" exe="/usr/bin/python3.10" sig=0 arch=c000003e syscall=203 compat=0 ip=0x7ff9443d55b1 code=0x50000
Nov 02 08:17:53 ubuntu-2204 kernel: audit: type=1326 audit(1667373473.508:398): auid=1000 uid=1000 gid=1000 ses=3 subj=? pid=12452 comm="python3" exe="/usr/bin/python3.10" sig=0 arch=c000003e syscall=203 compat=0 ip=0x7ff9443d55b1 code=0x50000
Nov 02 08:17:53 ubuntu-2204 audit[12452]: AVC apparmor="DENIED" operation="open" profile="snap.anki-ppd.anki" name="/usr/share/zoneinfo-icu/44/le/zoneinfo64.res" pid=12452 comm="python3" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Nov 02 08:17:53 ubuntu-2204 audit[12452]: AVC apparmor="DENIED" operation="open" profile="snap.anki-ppd.anki" name="/usr/share/zoneinfo-icu/44/le/timezoneTypes.res" pid=12452 comm="python3" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Nov 02 08:17:53 ubuntu-2204 kernel: audit: type=1400 audit(1667373473.592:399): apparmor="DENIED" operation="open" profile="snap.anki-ppd.anki" name="/usr/share/zoneinfo-icu/44/le/zoneinfo64.res" pid=12452 comm="python3" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Nov 02 08:17:53 ubuntu-2204 kernel: audit: type=1400 audit(1667373473.592:400): apparmor="DENIED" operation="open" profile="snap.anki-ppd.anki" name="/usr/share/zoneinfo-icu/44/le/timezoneTypes.res" pid=12452 comm="python3" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Nov 02 08:17:53 ubuntu-2204 audit[12571]: AVC apparmor="DENIED" operation="open" profile="snap.anki-ppd.anki" name="/usr/share/zoneinfo-icu/44/le/zoneinfo64.res" pid=12571 comm="QtWebEngineProc" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Nov 02 08:17:53 ubuntu-2204 audit[12572]: AVC apparmor="DENIED" operation="open" profile="snap.anki-ppd.anki" name="/usr/share/zoneinfo-icu/44/le/zoneinfo64.res" pid=12572 comm="QtWebEngineProc" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Nov 02 08:17:53 ubuntu-2204 audit[12572]: AVC apparmor="DENIED" operation="open" profile="snap.anki-ppd.anki" name="/usr/share/zoneinfo-icu/44/le/timezoneTypes.res" pid=12572 comm="QtWebEngineProc" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Nov 02 08:17:53 ubuntu-2204 audit[12571]: AVC apparmor="DENIED" operation="open" profile="snap.anki-ppd.anki" name="/usr/share/zoneinfo-icu/44/le/timezoneTypes.res" pid=12571 comm="QtWebEngineProc" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Nov 02 08:17:53 ubuntu-2204 kernel: audit: type=1400 audit(1667373473.632:401): apparmor="DENIED" operation="open" profile="snap.anki-ppd.anki" name="/usr/share/zoneinfo-icu/44/le/zoneinfo64.res" pid=12571 comm="QtWebEngineProc" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Nov 02 08:17:53 ubuntu-2204 kernel: audit: type=1400 audit(1667373473.632:402): apparmor="DENIED" operation="open" profile="snap.anki-ppd.anki" name="/usr/share/zoneinfo-icu/44/le/zoneinfo64.res" pid=12572 comm="QtWebEngineProc" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Nov 02 08:17:53 ubuntu-2204 kernel: audit: type=1400 audit(1667373473.632:403): apparmor="DENIED" operation="open" profile="snap.anki-ppd.anki" name="/usr/share/zoneinfo-icu/44/le/timezoneTypes.res" pid=12572 comm="QtWebEngineProc" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Nov 02 08:17:53 ubuntu-2204 kernel: audit: type=1400 audit(1667373473.632:404): apparmor="DENIED" operation="open" profile="snap.anki-ppd.anki" name="/usr/share/zoneinfo-icu/44/le/timezoneTypes.res" pid=12571 comm="QtWebEngineProc" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0

The issue is also described for QT5 and Flatpak here: ibus/ibus#2220 They mention a workaround (setting environment variables), but it doesn't work for me.

@ppd ,it would be great if you could have a look at this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant