I've added a simple sequence, but it won't work. How can I find out if the OS (Ubuntu 12.10 with Unity) is actually loading the file?

  • I found this - no, that's not a regular script so those methods don't work, obviously. Well, then I don't know. But check out the link; perhaps you could pick something up. Dec 28, 2012 at 16:04

1 Answer 1


The compose definitions ($XCOMPOSE, ~/.XCompose or a file under /usr/share/X11/locale) are loaded by each client application, not by the X server. So make sure that the application you're testing with is loading ~/.XCompose. You can see what files it's reading with strace:

$ strace -e open,openat xterm |& grep Compose
open("/home/gilles/.XCompose", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/X11/locale/en_US.UTF-8/Compose", O_RDONLY) = 5
$ touch .XCompose
$ strace -e open,openat xterm |& grep Compose
open("/home/gilles/.XCompose", O_RDONLY) = 5

Most applications only load the file when they start, so you'll have to restart the application if you change your compose definitions.

If the application is not loading these files, it's likely that they're not using the 'X input method' (xim). You can force GTK or QT applications to use xim:

$ GTK_IM_MODULE=xim QT_IM_MODULE=xim strace -e open,openat xterm |& grep Compose

If this fixes the problem, then you should consider setting the environment variables globally, or use alias as a workaround on a per-app basis.

  • Note: I needed to use strace -e openat (or just omit the -e) to debug a particular application today.
    – Dan Getz
    May 1, 2020 at 1:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .