How to reload .XCompose without a reboot?

When I edit my ~/.XCompose file, I need to reboot Ubuntu 16.04 for the changes to take effect. Is there a way to tell Ubuntu to reload the definitions in the file without doing a full reboot?


Solution 1:

Restart the input method program you are running. For a brute force approach, if your OS comes with pidof, you can use the following command:

pidof <INPUTMETHOD> | xargs kill -9; <INPUTMETHOD>

(Just replace with the actual command for your input method program.)

Your input method may include a command to restart it. In my case, it's fcitx, which offers this command:

fcitx -r

All changes are instantly activated. However, some applications may be need to be restarted.

As ARX mentions in comments, ibus has its own command to restart as well:

ibus restart