Ibus keyboard input problem with LO 7.x on linux Debian Bookworm (2023)

Software involved:

I’m using: LibreOffice 7 on Debian Bookworm with the ibus (Input Bus) daemon running.


The problem:

After a reboot typing on the keyboard into all other Linux applications, except LibreOffice, seems to work normally, e.g. terminal, gedit, thunderbird, firefox, gnote, etc. get input from the keyboard normally.

But in both Libreoffice Calc and Base, when I type on my keyboard LibreOffice doesn’t see the typing at all. (It’s as if I’m not typing on the keyboard at all.)

Previously using LibreOffice 5.4 on Debian Buster I did not have this problem.

I also noticed that the system tray icon will switch from Screenshot from 2024-01-09 17-12-21 to Screenshot from 2024-01-09 17-13-39 when I restart ibus (by clicking on this icon and selecting restart). And then when I start Calc will reliably switch back to Screenshot from 2024-01-09 17-12-21 when calc loads (starts). Also I’ve seen it switch to EN (English) just on it’s own for unknown reasons. (More on using restart below as a workaround.)


What I’ve tried:

If I stop the ibus daemon (by right clicking on the panel icon in my Cinnamon desktop and then selecting Quit)

Screenshot from 2023-12-21 09-14-19

now LibreOffice begins to hear what is typed on the keyboard.

If I then restart ibus (by searching for ibus in the start menu, then selecting IBus Preferences then Clicking Yes in this dialog:
Screenshot from 2023-12-21 08-16-57

And then clicking OK here:
Screenshot from 2023-12-21 08-17-23

And finally clicking Close here:
Screenshot from 2023-12-21 08-17-47

Now typing works generally in Linux as before but also works in LibreOffice, i.e. now what I type appears in LibreOffice.


Other related investigation:

In terminal if I type:

$ env | grep ibus

It returns:

GTK_IM_MODULE=ibus
XMODIFIERS=@im=ibus
CLUTTER_IM_MODULE=ibus
QT_IM_MODULE=ibus

These are mostly setup in my .bashrc. On my system

/home/user/.bashrc reads in part:

. /etc/bash.shared		#colorizes and prefix on other paths, and adds useful aliases and functions

and /etc/bash.shared reads in part:

	 export 						  GTK_IM_MODULE=ibus
	 export 						 XMODIFIERS=@im=ibus
	 export 						   QT_IM_MODULE=ibus


(I would have simply extended the existing “using ibus” topic in ask.libreoffice.org but it was closed a long time ago by Alex Kemp. So unfortunately I had to start a new topic on the same issue. I wish we could get past this habit of closing topics here as I find it to be an unhelpful protocol.)