Okay. In a clean Lunar VM with glib 2.75.3 installed and ibus enabled as
described in the bug description, I could reproduce the input problems
in Firefox. I saw the following AppArmor denial in the dmesg logs:

    [  +0.343553] audit: type=1400 audit(1678248386.012:62):
apparmor="DENIED" operation="connect" profile="snap.firefox.firefox"
name="/home/james/.cache/ibus/dbus-THbBfRNt" pid=2398 comm="pool-
firefox" requested_mask="wr" denied_mask="wr" fsuid=1000 ouid=1000

I edited /var/lib/snapd/apparmor/profiles/snap.firefox.firefox and added
the following rule:

    @{HOME}/.cache/ibus/dbus-* rw,

After reloading the policy with "apparmor_parser -r
.../snap.firefox.firefox", keyboard input worked again. So that confirms
my guess about the cause of the problem. This is something we can fix
via a snapd update.

Longer term, we should get these snaps using ibus's portal interface,
which is both more secure (i.e. suitable to allow in the desktop
interface) and should be immune to future changes of this type.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to ibus in Ubuntu.
https://bugs.launchpad.net/bugs/2008279

Title:
  glib2.0 2.75.3-3 breaks text input for Firefox & Chromium snaps if
  IBus is turned on

Status in glib2.0 package in Ubuntu:
  New
Status in ibus package in Ubuntu:
  New

Bug description:
  Test Case
  ---------
  From Ubuntu 23.04, install glib >= 2.75.3-3

  Test 1:
  Log out
  Click your name on the login screen.
  Click the gear button to choose Ubuntu on Xorg
  Enter your password to finish logging in.
  Open Firefox (or Chromium)
  Try to enter text in the address bar.

  Test 2:
  Install the ibus-libpinyin package.
  Log out and log in again.
  Go to Settings -> Keyboard and add "Chinese (Intelligent Pinyin)"
   to your input sources.
  Log out
  Click your name on the login screen.
  Click the gear button to choose Ubuntu (on Wayland).
  Enter your password to finish logging in.
  Open Firefox (or Chromium)
  Try to enter text in the address bar.

  What Happens
  ------------
  No text is inputted

  Other Info
  ----------
  You see the issue as soon as IBus has been 'turned on'. With the current 
g-s-d version you need to somehow trigger a need to turn IBus on. In an X11 
session IBus is always turned on due to im-config 0.55-1. In a Wayland session 
you need to tell it to turn IBus on by either adding an IBus input method to 
your input sources or make use of the Screen Keyboard feature.

  And I've only seen the issue with the Firefox and Chromium snaps.

  Warning message if you start firefox from terminal:

  [Parent 3792, Main Thread] WARNING: Unable to connect to ibus: Could
  not connect: Permission denied: 'glib warning', file
  /build/firefox/parts/firefox/build/toolkit/xre/nsSigHandlers.cpp:167

  (firefox:3792): IBUS-WARNING **: 15:23:11.814: Unable to connect to
  ibus: Could not connect: Permission denied

  gnome-settings-daemon
  ---------------------
  gnome-settings-daemon 44 Beta makes the situation worse since it always turns 
IBus on in both Wayland and X11, but I reverted 
https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/commit/27bc0889c so that 
we could continue with the update. See 
https://salsa.debian.org/gnome-team/gnome-settings-daemon/-/commit/baeeed93

  Before I did that, I tested disabling our patches but it didn't make a
  difference.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glib2.0/+bug/2008279/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to