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

thunderbird: keyboard does not work: Unable to connect to ibus #3379

Open
fabianhick opened this issue Apr 24, 2020 · 27 comments
Open

thunderbird: keyboard does not work: Unable to connect to ibus #3379

fabianhick opened this issue Apr 24, 2020 · 27 comments
Milestone

Comments

@fabianhick
Copy link

Hey,
after upgrading my installation to Ubuntu 20.04 I ran into the following issues:

Describe the bug
When running Thunderbird on Ubuntu 20.04 with firejail the keyboard input is broken.

Behavior change on disabling firejail
The keyboard input works as intended

To Reproduce
Steps to reproduce the behavior:

  1. Start Thunderbird: firejail --private thunderbird
  2. Try to enter something into the input fields
  3. See error in terminal:
(thunderbird:17): IBUS-WARNING **: 02:56:35.752: Unable to connect to ibus: Could not connect: Connection refused
(thunderbird:17): IBUS-WARNING **: 02:56:39.831: Events queue growing too big, will start to drop.
(thunderbird:17): IBUS-WARNING **: 02:56:39.877: Events queue growing too big, will start to drop.
(thunderbird:17): IBUS-WARNING **: 02:56:39.905: Events queue growing too big, will start to drop.

Expected behavior
Being able to input information with the keyboard.

Desktop (please complete the following information):

  • Ubuntu 20.04 LTS (focal)
firejail version 0.9.62

Compile time support:
	- AppArmor support is enabled
	- AppImage support is enabled
	- chroot support is enabled
	- file and directory whitelisting support is enabled
	- file transfer support is enabled
	- firetunnel support is enabled
	- networking support is enabled
	- overlayfs support is enabled
	- private-home support is enabled
	- seccomp-bpf support is enabled
	- user namespace support is enabled
	- X11 sandboxing support is enabled

Additional context
This issues also appears in gedit.

@rusty-snake
Copy link
Collaborator

Can you try firejail --ignore=nodbus thunderbird.

@fabianhick
Copy link
Author

@rusty-snake, I did try your command and the issue still persists.

@rusty-snake
Copy link
Collaborator

I cannot reproduce this in a ubu-focal test VM with firejail-git.

@JKjakay
Copy link

JKjakay commented May 1, 2020

I have the same problem. However, I do not use --private but instead just run:
firejail thunderbird

The firejailed TB works as usual, but does not accept keyboard input. The ibus warning shows up in the console - to be exact, one time for every keypress, I think.

@fabianhick
Copy link
Author

fabianhick commented May 1, 2020

It doesn't work for me both with and without --private.
I can confirm @JKjakay's description of the issue in regards to keypresses.

@rusty-snake
Copy link
Collaborator

Can you try with firejail --ignore=private-tmp --ignore=tracelog --ignore="shell none" --ignore=protocol --ignore=nogroups --ignore=noroot --ignore=machine-id. If this works, remove ignores till it breaks again.

@fabianhick
Copy link
Author

Thanks for the new command, @rusty-snake.
Unfortunately the issue still persists:

(thunderbird:10): IBUS-WARNING **: 23:06:29.152: Unable to connect to ibus: Could not connect: Connection refused

@rusty-snake
Copy link
Collaborator

Then you will need to comment every thing in thunderbird.profile and uncomment line for line to find the problematic line. (You can also uncomment a block of line and only go line for line in the block with the problematic line).

@fabianhick
Copy link
Author

fabianhick commented May 2, 2020

I did just try it out and commenting the line containing ignore nodbus in thunderbird.profile seems to solve the issue.
The initial error message (Unable to connect to ibus) still appears, but the Events queue isn't growing too big anymore and keyboard input is working again.

@rusty-snake
Copy link
Collaborator

So calling firejail (--private) --nodbus thunderbird works?

@fabianhick
Copy link
Author

fabianhick commented May 2, 2020

Yes indeed, @rusty-snake.
But I also just noticed that the thunderbird.profile on GitHub is different to mine from the Ubuntu Focal package...

@JKjakay
Copy link

JKjakay commented May 2, 2020

Starting TB with

firejail --nodbus thunderbird

works for me, too

@paddyredbeard
Copy link

FWIW - I was having exactly the same issue with Chromium browser on a fresh upgrade to Pop!_OS 20.04 (based on Ubuntu 20.04). Per @JKjakay's comment, firejail --nodbus chromium resolves this for me.

@FlyingKawasaki74
Copy link

I had this issue with several applications (Thunderbird, Firefox, Vivaldi, Brave, Text-Editor).
Using the --nodbus parameter helped (unless it's explicitely blocked like for Firefox, see issue #3408). Alternatively changing the profile files also helped (commenting out all dbus related lines in the main profile file)

Running it on Ubuntu 18.04

@rusty-snake
Copy link
Collaborator

Unfortunately we still do not know what the real reason is, or how it can be fixed. Blocking D-Bus breaks dconf and other things. It will not work with all programs.

@rusty-snake
Copy link
Collaborator

@buggitheclown @paddyredbeard @JKjakay @fabianhick can you try this: #116 (comment)

@paddyredbeard
Copy link

@rusty-snake GTK_IM_MODULE=xim firejail chromium works for me.

@rusty-snake
Copy link
Collaborator

rusty-snake commented May 22, 2020

ok, I'm now able to reproduce it. Ubuntu 20.04 (minimal) VM with firejail-git.

$ LC_ALL=C firejail --env=GTK_IM_MODULE=ibus --noprofile gedit
Parent pid 3034, child pid 3035
Child process initialized in 41.73 ms

(gedit:2): IBUS-WARNING **: 18:01:11.426: Unable to connect to ibus: Could not connect: Connection refused

(gedit:2): IBUS-WARNING **: 18:01:14.737: Events queue growing too big, will start to drop.

(gedit:2): IBUS-WARNING **: 18:01:14.746: Events queue growing too big, will start to drop.

(gedit:2): IBUS-WARNING **: 18:01:14.770: Events queue growing too big, will start to drop.

(gedit:2): IBUS-WARNING **: 18:01:14.815: Events queue growing too big, will start to drop.

Parent is shutting down, bye...

Thats are bad news, because it is broken even with --noprofile.

Knowed work arounds:

  • nodbus/dbus-user none or net none, both don't work for all programs
  • env GTK_IM_MODULE=xim and env QT_IM_MODULE=xim

@rusty-snake
Copy link
Collaborator

rusty-snake commented May 22, 2020

Problematic strace line (strace -f):
connect(14, {sa_family=AF_UNIX, sun_path=@"/home/ubuntu01/.cache/ibus/dbus-AyGV49uw"}, 41) = -1 ECONNREFUSED (Connection refused)

Looks like ibus is rejecting the connection. Maybe because of the PID-namespace?

@FlyingKawasaki74
Copy link

FlyingKawasaki74 commented May 23, 2020

@rusty-snake

That workaround you linked doesn't work for me. I tried creating the signal-desktop file in my home directory and using the console command like @paddyredbeard
So far using --noprofile --nodbus worked with all programs that had the issue for me.
EDIT: I changed my user name so don't be surprised why a new name showed up in the convo

@rusty-snake
Copy link
Collaborator

electron doesn't use gtk, maybe QT_IM_MODULE=xim works.

@wellcomez
Copy link

@rusty-snake for my case, I think this caused by multi ibus configuration file under ~/.config/ibus/bus/ and one of them contains wrong socket address.

@rusty-snake
Copy link
Collaborator

What do you mean with "wrong address"?

@wellcomez
Copy link

What do you mean with "wrong address"?
wrong means it doesn't exis in.

@wellcomez
Copy link

wellcomez commented Nov 16, 2022

What do you mean with "wrong address"?

  • i found there are several ibus_addres_file under .config/ibus/bus. One of them will be chosen by firejail and used as ibus_address.
    Maybe it looks right because its filename is confirmed with naming rule, but really it doesn't point to living unix socket.
    After i remove all these files ,keyboard works. After reboot again, new ibus_address file appears, then try gedit again, it also works.
  • Another finding:
    I use ss i can find ibus_address used by system is different with ibus_address which is set to sandbox by firejail.

@vaindru
Copy link

vaindru commented Jan 8, 2024

* i found there are several ibus_addres_file under .config/ibus/bus. One of them will be chosen by firejail and used as ibus_address.
  Maybe it looks right because  its filename is confirmed with naming rule, but really it doesn't point to living unix socket.
  **After i remove all these files ,keyboard  works**. After reboot again, new ibus_address file appears, then try gedit again, it also works.

* Another finding:
  I use ss i can find ibus_address used by system is different with ibus_address which is set to sandbox by firejail.

This saved me! Firefox didn't recognize keyboard input and also a friend had another editor software with same problem and it helped too. Thanks!:)

@wazaberry
Copy link

Thanks a lot Welcomez... deleting .config/ibus/bus did the trick and the keyboard now works in Firefox :)

@kmk3 kmk3 changed the title Keyboard not working IBUS-WARNING Thunderbird with Ubuntu 20.04 thunderbird: keyboard does not work: Unable to connect to ibus Aug 24, 2024
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

9 participants