18

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. – Emanuel Berg Dec 28 '12 at 16:04
15

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 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 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 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.