Getting X client to reload .Xcompose?

In order to reload `~/.Xcompose´ one needs to close and then re-open the input method:

 XCloseIM (im);
 im = XOpenIM (display, ...);

Normally X11 clients never do that, so there appears to be no way to make existing programs reload the file. You can make it happen in your own programs.


I use multiple keyboard layouts, and I just figured out that switching layouts (at least in GNOME) reloads the XCompose file.


If you are using IBus as your input method, doing

ibus restart

will make any programs that use it (most of them but not xterm for example) reread .XCompose.