Can't use input method in snap apps


#1

I’ve tried using ibus and fcitx with firefox, vscode, slack, libreoffice. None of them works.
There are no (relevant) security policy denials ($ sudo journalctl --follow | grep audit returns nothing)
I’m using ubuntu budgie 18.04. I had one of my friends try it with ubuntu 16.04 LTS but it seems it doesn’t work either.
Anyone know what the problem is?


How to input chinese in snap firefox
Call for testing Musescore 2.2.0
#2

@willcooke - fyi. Perhaps someone from the desktop team can take a look?


#3

Sure, we’ll take a look.


#4

@willcooke - fyi, I was working on enabling support for an unrelated feature in the peek snap and noticed when I started it:

Cannot load module /snap/peek/x1/gnome-platform/usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules/im-fcitx.so: GModule (/snap/peek/x1/gnome-platform/usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules/im-fcitx.so) initialization check failed: GLib version too old (micro mismatch)
/snap/peek/x1/gnome-platform/usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules/im-fcitx.so does not export GTK+ IM module API: GModule (/snap/peek/x1/gnome-platform/usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules/im-fcitx.so) initialization check failed: GLib version too old (micro mismatch)
Cannot load module /snap/peek/x1/gnome-platform/usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules/im-ibus.so: GModule (/snap/peek/x1/gnome-platform/usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules/im-ibus.so) initialization check failed: GLib version too old (micro mismatch)
/snap/peek/x1/gnome-platform/usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules/im-ibus.so does not export GTK+ IM module API: GModule (/snap/peek/x1/gnome-platform/usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules/im-ibus.so) initialization check failed: GLib version too old (micro mismatch)

Relevant details:

$ snap version
snap    2.32+18.04~pre6
snapd   2.32+18.04~pre6
series  16
ubuntu  18.04
kernel  4.15.0-13-generic

$ snap list
Name             Version             Rev   Tracking  Developer  Notes
core             16-2.31.2           4206  stable    canonical  core
gnome-3-26-1604  3.26.0              53    stable    canonical  -
peek             1.2.2+git7.0cbdd30  x1    -         -          -

$ snap interfaces peek
Slot                             Plug
:desktop                         peek
:gsettings                       peek
:home                            peek
:unity7                          peek
:wayland                         peek
:x11                             peek
gnome-3-26-1604:gnome-3-26-1604  peek
peek:session-dbus-interface      -

#5

Thanks @jdstrand.

Tagging @kenvandine and @oSoMoN who will be looking in to this further.


GLib-GObject-WARNING
#6

I managed to get ibus working with the chromium snap by doing those two things:

  • added ibus-gtk3 to stage-packages
  • cp $HOME/.config/ibus/bus/* $HOME/snap/chromium/current/.config/ibus/bus/

(this was suggested by comment #3 in bug #1580463)


#7

The same trick works for the firefox snap too (it also needs libibus-1.0-5 in its stage-packages).


#8

This pull request should enable ibus out-of-the-box for snaps that use the desktop-gtk3 helper.


#9

The PR was merged (thanks @kenvandine!), now snaps that depend on the desktop-gtk3 helper will need to be rebuilt to take advantage of it.


#10

Still missing stage packages for some desktop helper parts. This follow-up PR should do the trick.


#11

chromium in the candidate channel has now working ibus support (tested with ibus-cangjie), and a build of libreoffice with ibus support is ongoing.


#12

chromium in the stable channel now has working ibus support. Everyone interested, please give it a try and report here whether this works as expected.


#13

libreoffice 6.0.3.2 in the candidate channel now has working ibus support (tested with ibus-cangjie). Everyone interested, please give it a try and report here whether this works as expected.


#14

Can confirm ibus works fine with chromium.


#15

I rebuilt the hexchat snap (which uses the desktop-gtk2 helper) locally and that was enough to enable ibus input.

I am now going to look into support for Qt apps.


#16

This pull request should enable ibus input in Qt apps that use the snapcraft desktop helpers.


#17

This is now merged. Snaps that use the desktop-qt* helpers should now accept ibus input (after being rebuilt to pick up the last change in the desktop helpers).


#18

How about fcitx support for snap apps? I just tested with lastest libreoffice in the ubuntu 18.04 store and it didn’t work


#19

Please add support fcitx


#20

yep

I tried mailspring and telegram snap app but they cant work with fcitx well

but flatpak apps are working with fcitx well

wish you can solve this problem

thanks