Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
    
I don't know that file or your context, but if it is a fairly regular script, you could just echo "File loaded", or, if not possible, touch (in effect, create) a file that you later check up on -- if there, the script was run. –  Emanuel Berg Dec 28 '12 at 2:44
    
That did nothing. Is there a generic X11 log file I could look at? –  Tim Dec 28 '12 at 7:07
    
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

1 Answer 1

up vote 5 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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