Cannot change input method in snaps

I am not able to write in japanese through fcitx+mozc input method within snaps.

Example of snaps with this behavior: discord, simplenote.

I have just tested this with libreoffice snap.
Same issue - cannot change input method.

This is a serious limitiation, CJK languages have a fairly large userbase.

Any chance for fixing this?

Do you see any security denials at the time of the failure? Eg:

$ sudo journalctl | grep audit

journalctl is full of these:

Jan 26 12:44:42 xusus audit[25645]: AVC apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=25645 comm="Discord" requested_mask="trace" denied_mask="trace" peer="unconfined"

Feb 06 18:17:36 xusus audit[6034]: AVC apparmor="STATUS" operation="profile_load" profile="unconfined" name="snap.libreoffice.base" pid=6034 comm="apparmor_parser"
Feb 06 18:17:36 xusus kernel: audit: type=1400 audit(1517908656.349:69): apparmor="STATUS" operation="profile_load" profile="unconfined" name="snap.libreoffice.base" pid=6034 comm="apparmor_parser"
Feb 06 18:17:36 xusus audit[6036]: AVC apparmor="STATUS" operation="profile_load" profile="unconfined" name="snap.libreoffice.calc" pid=6036 comm="apparmor_parser"
Feb 06 18:17:36 xusus kernel: audit: type=1400 audit(1517908656.639:70): apparmor="STATUS" operation="profile_load" profile="unconfined" name="snap.libreoffice.calc" pid=6036 comm="apparmor_parser"
Feb 06 18:17:36 xusus audit[6038]: AVC apparmor="STATUS" operation="profile_load" profile="unconfined" name="snap.libreoffice.draw" pid=6038 comm="apparmor_parser"
Feb 06 18:17:36 xusus kernel: audit: type=1400 audit(1517908656.943:71): apparmor="STATUS" operation="profile_load" profile="unconfined" name="snap.libreoffice.draw" pid=6038 comm="apparmor_parser"
Feb 06 18:17:37 xusus audit[6040]: AVC apparmor="STATUS" operation="profile_load" profile="unconfined" name="snap.libreoffice.impress" pid=6040 comm="apparmor_parser"
Feb 06 18:17:37 xusus kernel: audit: type=1400 audit(1517908657.233:72): apparmor="STATUS" operation="profile_load" profile="unconfined" name="snap.libreoffice.impress" pid=6040 comm="apparmor_parser"
Feb 06 18:17:37 xusus audit[6042]: AVC apparmor="STATUS" operation="profile_load" profile="unconfined" name="snap.libreoffice.libreoffice" pid=6042 comm="apparmor_parser"
Feb 06 18:17:37 xusus kernel: audit: type=1400 audit(1517908657.536:73): apparmor="STATUS" operation="profile_load" profile="unconfined" name="snap.libreoffice.libreoffice" pid=6042 comm="apparmor_parser"
Feb 06 18:17:37 xusus audit[6044]: AVC apparmor="STATUS" operation="profile_load" profile="unconfined" name="snap.libreoffice.math" pid=6044 comm="apparmor_parser"
Feb 06 18:17:37 xusus kernel: audit: type=1400 audit(1517908657.827:74): apparmor="STATUS" operation="profile_load" profile="unconfined" name="snap.libreoffice.math" pid=6044 comm="apparmor_parser"
Feb 06 18:17:38 xusus audit[6046]: AVC apparmor="STATUS" operation="profile_load" profile="unconfined" name="snap.libreoffice.writer" pid=6046 comm="apparmor_parser"
Feb 06 18:17:38 xusus kernel: audit: type=1400 audit(1517908658.118:75): apparmor="STATUS" operation="profile_load" profile="unconfined" name="snap.libreoffice.writer" pid=6046 comm="apparmor_parser"
Feb 06 18:20:39 xusus audit[7072]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/home/vlkn/.local/share/font-manager/Library/" pid=7072 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 06 18:20:39 xusus audit[7072]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/home/vlkn/.local/share/font-manager/Library/" pid=7072 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 06 18:20:39 xusus audit[7072]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/home/vlkn/.local/share/font-manager/Library/" pid=7072 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 06 18:20:39 xusus audit[7072]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/home/vlkn/.local/share/font-manager/Library/" pid=7072 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 06 18:20:39 xusus kernel: audit: type=1400 audit(1517908839.835:80): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/home/vlkn/.local/share/font-manager/Library/" pid=7072 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 06 18:20:39 xusus kernel: audit: type=1400 audit(1517908839.836:81): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/home/vlkn/.local/share/font-manager/Library/" pid=7072 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 06 18:20:39 xusus kernel: audit: type=1400 audit(1517908839.836:82): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/home/vlkn/.local/share/font-manager/Library/" pid=7072 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 06 18:20:39 xusus kernel: audit: type=1400 audit(1517908839.836:83): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/home/vlkn/.local/share/font-manager/Library/" pid=7072 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 06 18:20:42 xusus audit[6967]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/home/vlkn/.local/share/font-manager/Library/" pid=6967 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 06 18:20:42 xusus audit[6967]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/home/vlkn/.local/share/font-manager/Library/" pid=6967 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 06 18:20:42 xusus audit[6967]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/home/vlkn/.local/share/font-manager/Library/" pid=6967 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 06 18:20:42 xusus audit[6967]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/home/vlkn/.local/share/font-manager/Library/" pid=6967 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 06 18:20:42 xusus kernel: audit: type=1400 audit(1517908842.947:84): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/home/vlkn/.local/share/font-manager/Library/" pid=6967 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 06 18:20:42 xusus kernel: audit: type=1400 audit(1517908842.947:85): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/home/vlkn/.local/share/font-manager/Library/" pid=6967 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 06 18:20:42 xusus kernel: audit: type=1400 audit(1517908842.947:86): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/home/vlkn/.local/share/font-manager/Library/" pid=6967 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 06 18:20:42 xusus kernel: audit: type=1400 audit(1517908842.947:87): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/home/vlkn/.local/share/font-manager/Library/" pid=6967 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000

I should’ve had you filter out the STATUS messages, but I don’t see anything in the denials that is blocking using fcitx or mozc specifically. The unity7 and desktop-legacy interfaces are intended to be used with these input methods. I suspect is it something wrong with the snaps (perhaps in the desktop-launch provided by the snapcraft desktop parts).

This denial is unrelated to fcitx+mozc AFAICT, but is interesting to me. Can you describe ‘font-manager’, how you installed it and how you are using it?

@kenvandine or @jamesh - I wonder if this is something that you or someone from the desktop team can investigate?

I have font manager installed, through official repos iirc. I do have several fonts in my ~/.local/share/fonts folder, maybe that’s why?

@jdstrand
hi, any new info on this? I am now testing newest libreoffice snap, and the issue persists

I believe that ~/.local/share/fonts is now handled correctly by the desktop interface, but this shouldn’t have anything to do with fcitx.

@oSoMoN is looking at fcitx in this other thread: Can't use input method in snap apps