When starting Eclipse for the first time in my Ubuntu 20.04, I got a warning (which actually seem to be 2 warnings)
***WARNING: Detected: GTK_IM_MODULE=xim. This input method is unsupported and can cause graphical issues.
***WARNING: Unset GTK_IM_MODULE or set GTK_IM_MODULE=ibus if flicking is experienced.
log4j:WARN No appenders could be found for logger (org.eclipse.jgit.internal.storage.file.FileSnapshot).
log4j:WARN Please initialize the log4j system properly.
To deal with the GTK...
warning, I googled a bit.
I found here that "Gnome made ibus the default input method" (even if the answer is from 2016, figure below suggests it still applies).
But
$ env | grep -i gtk
GTK_IM_MODULE=xim
GTK_MODULES=gail:atk-bridge
So I wonder where is GTK_IM_MODULE
set.
What I tried (with no luck):
$ grep -i gtk ~/.bashrc
$ grep -i gtk ~/.profile
$ grep -i gtk /etc/profile
$ grep -i -nH gtk /etc/profile.d/*
$ grep -i gtk ~/.xprofile
$ grep -i gtk ~/.xinputrc
$ gsettings get org.gnome.desktop.interface gtk-im-module
'gtk-im-context-simple'
(note that as per dconf-editor
, the default value is ''
).
I will next try the suggestion in the warning, Unset GTK_IM_MODULE or set GTK_IM_MODULE=ibus
, but I still have the question:
Where are GTK_IM_MODULE
and GTK_MODULES
set?
When launching im-config
I see this
EDIT:
Perhaps ~/.xinputrc
is responsible. Its contents:
# im-config(8) generated on Tue, 03 Nov 2020 10:36:11 -0300
run_im xim
# im-config signature: 1f92fadecc95eaeaf5534ec0902b5a9b -
If this is the cause, why would .xinputrc
contain that?
EDIT #2:
I have removed .xinputrc
, logged out and in again.
Still
$ env | grep -i gtk
GTK_IM_MODULE=xim
GTK_MODULES=gail:atk-bridge
So it seems .xinputrc
was not the culprit.
EDIT #3:
I executed
$ im-config -n ibus
$ im-config -m
default
ibus
ibus
ibus
So I made sure ibus
was current (in the second line of the output, I had xim
before).
I logged out and in again.
Still
$ env | grep -i gtk
GTK_IM_MODULE=xim
GTK_MODULES=gail:atk-bridge
$ cat .xinputrc
# im-config(8) generated on Thu, 04 Mar 2021 23:34:26 -0300
run_im ibus
# im-config signature: 3d5777226bbd6243ce412ee4470b8020 -
Plus, launching eclipse still gives the same warning (expected, since the environment variables have the same values). And the ensuing flicker is still present.
As requested in comments
$ env | grep -E '_IM|XMOD'
GTK_IM_MODULE=xim
QT4_IM_MODULE=xim
XMODIFIERS=@im=none
CLUTTER_IM_MODULE=xim
QT_IM_MODULE=ibus
So it seems .xinputrc
was not the culprit.
EDIT #4:
After a reboot
$ im-config -m
default
ibus
ibus
ibus
$ env | grep -E '_IM|XMOD'
XMODIFIERS=@im=ibus
QT_IM_MODULE=ibus
$ env | grep -i gtk
GTK_MODULES=gail:atk-bridge
$ grep -i gtk ~/.profile
$ grep -i gtk /etc/environment
$ grep -i gtk /etc/environment.d/*
/etc/environment.d/90atk-adaptor.conf:GTK_MODULES=${GTK_MODULES:+$GTK_MODULES:}gail:atk-bridge
Plus, eclipse does not show the warning (as expected), and the flicker is gone.
whether GTK_IM_MODULE
was also set in /etc/environment.d/90atk-adaptor.conf
, I cannot tell (I would need to try a few things to ascertain that).
Even if not needed:
- The question about what set
GTK_IM_MODULE
persists. - I will try removing
.xinputrc
, rebooting, and checking again.
Yes, that is most likely the cause.
As regards your question why
~/.xinputrc
would contain that, it's a long story. In short it's about various attempts historically to achieve a sensible default configuration. I assume that you installed Ubuntu some years ago, and later upgraded to 20.04.My advice: Just delete
~/.xinputrc
and reboot. It won't return unless you actively change the input method configuration via e.g. Language Support.I confirm that in yet another system with the same issue, executing
and rebooting solved the problem.