I'm using ibus to give me XCompose in Gnome (because the built-in compose set is too limited). This works for everything except one app.

From some investigation, it appears that this app gets launched via DBUS when launched from either Gnome Shell or Synapse. When run from the command-line as the path to the binary then ibus works. This appears to be because DBUS cleans the environment variables, which means that it doesn't pass GTK_IM_MODULE through. Oddly, though, /proc/[pid]/environ does include QT_IM_MODULE.

I've tried adding "export GTK_IM_MODULE=ibus" to various files (.profile, .sessionrc, .xim.template, .gnomerc, .bashrc) but it doesn't have any effect.

How can I get DBUS to export GTK_IM_MODULE so that any DBUS-launched apps have my correct input method to allow XCompose?