24

Fedora 20, xorg 1.14.4-11.

I run with a lot of terminal windows open, and I make heavy use of the compose/multi-key mechanism. One of the most frustrating things is that after altering my ~/.Xcompose file, I need to start new terminal windows in order to see the changes.

Is there any way to get X clients to reload ~/.Xcompose rather than just the once when they start? Particularly terminal apps and XChat?

Thanks!

Chris Snow
  • 23,813
  • 35
  • 144
  • 309
RoUS
  • 1,888
  • 2
  • 14
  • 29

3 Answers3

17

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.

n. m. could be an AI
  • 112,515
  • 14
  • 128
  • 243
6

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.

soplatnik
  • 61
  • 1
  • 1
4

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

Joseph
  • 293
  • 4
  • 12
  • That is very interesting. So switching the keyboard layout triggers an event that causes *all* [compliant] applications to do the reload? Possibly part of the X framework, not necessarily noticed by the application? What method do you use to switch layouts? Thanks! – RoUS Aug 25 '21 at 16:24