27

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?

Alexis Wilke
  • 2,787
ARX
  • 697

2 Answers2

14

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 need to be restarted.

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

ibus restart

To find out which input method you are using, run the following:

im-config

It will open a window with a list of steps it takes to determine your input method. You can also use the -m command line option to print the method in your console (without the details about each step...)

Alexis Wilke
  • 2,787
0

I'm on ubuntu 22.10, and my problem is that: I'm including files from ~/.XCompose, and if the modifications are inside the included files but not directly to ~/.XCompose, then apps won't pick up the updates. So I have to do a dummy editing directly inside ~/.XCompose, and restart apps.

To sum up:

  1. Check that your updates are directly inside ~/.XCompose (not one of your included files). Or you need to do a dummy editing like me (retouching ~/.XCompose might also work).
  2. Restart application.

If above not work, you might as well try these:

  • restart input engine.
  • restart X.
  • relogin.
Alexis Wilke
  • 2,787
unifreak
  • 101