How to make Compose work in GTK and Qt apps?

Found a solution which works for GTK apps (but not Qt). One needs to set

XMODIFIERS="@im=none"

to let X11 handle dead keys. Thanks to @PabloSaratxaga for his answer.


I had a similar problem in openSUSE. ~/.XCompose would be ignored by GTK+ applications, so my own Compose sequences did not work in Firefox, Gimp, and others.

I found out that gtk-query-immodules-2.0 listed a few input methods, but not xim; so, irrespective of the GTK_IM_MODULE variable, xim was unavailable. Installing the packages gtk2-immodule-xim (and friends) solved the problem.

Maybe this remark proves useful for people suffering from the same curse.