You are not logged in.

#1 2014-10-18 18:38:20

jmert
Member
Registered: 2013-07-07
Posts: 2

Gnome 3.14 breaks xim input method/module

For a long time, I've been able to override GTK's apparently hard-coded compose key sequences by placing the following in my ~/.xinitrc file:

    export GTK_IM_MODULE=xim
    export QT_IM_MODULE=xim

    xmodmap -e 'keycode 105 = Multi_key'

I like this because I have a highly customized ~/.XCompose file with a bunch of shortcuts for Greek characters and math operators that I use in my writing. With the update to Gnome 3.14, though, this no longer works. Running xev and watching the output, the key maps still work on a pure X application. Furthermore, it looks like Gnome is still loading the xim input module:

    $ strace -f gedit 2>&1 | grep -i xim
    [pid 10686] stat("/usr/lib/gtk-3.0/3.0.0/immodules/im-xim.so", {st_mode=S_IFREG|0755, st_size=31608, ...}) = 0
    [pid 10686] open("/usr/lib/gtk-3.0/3.0.0/immodules/im-xim.so", O_RDONLY|O_CLOEXEC) = 15
    [pid 10686] writev(9, [{"\20\0\6\0\r\0 \2_XIM_PROTOCOLB\17\0", 24}, {NULL, 0}, {"", 0}], 3) = 24
    [pid 10686] writev(9, [{"\20\0\6\0\r\0 \2_XIM_XCONNECTB\17\0", 24}, {NULL, 0}, {"", 0}], 3) = 24
    [pid 10686] writev(9, [{"\20\0\6\0\r\0 \2_XIM_MOREDATAB\17\0", 24}, {NULL, 0}, {"", 0}], 3) = 24
    $

The problem is that it doesn't appear to read any type of XCompose file (either in the system default /usr/share/X11/locale/en_US.UTF-8/Compose or in my home directory):

    $ strace -f gedit 2>&1 | grep -i compose
    $

For comparison, both xev and a KDE application do:

    $ strace -f xev 2>&1 | grep -i compose
    open("/home/user/.XCompose", O_RDONLY) = 4
    stat("/home/user/.XCompose", {st_mode=S_IFREG|0644, st_size=9953, ...}) = 0
    stat("/var/cache/libx11/compose/", 0x7fff7b18ab70) = -1 ENOENT (No such file or directory)
    stat("/home/user/.XCompose", {st_mode=S_IFREG|0644, st_size=9953, ...}) = 0
    stat("/home/user/.compose-cache/", 0x7fff7b18ab70) = -1 ENOENT (No such file or directory)
    open("/home/user/.XCompose", O_RDONLY) = 4
    read(4, "####\n# To get XCompose working i"..., 4096) = 4096
    open("/usr/share/X11/locale/compose.dir", O_RDONLY) = 5
    access("/usr/share/X11/locale/en_US.UTF-8/Compose", R_OK) = 0
    open("/usr/share/X11/locale/en_US.UTF-8/Compose", O_RDONLY) = 5
    $
    $ strace -f kmymoney 2>&1 | grep -i compose
    [pid 10753] open("/usr/share/X11/locale/compose.dir", O_RDONLY) = 9
    [pid 10753] access("/usr/share/X11/locale/en_US.UTF-8/Compose", R_OK) = 0
    [pid 10753] open("/usr/share/X11/locale/en_US.UTF-8/Compose", O_RDONLY) = 9
    [pid 10753] open("/home/user/.XCompose", O_RDONLY) = 9
    [pid 10753] stat("/home/user/.XCompose", {st_mode=S_IFREG|0644, st_size=9953, ...}) = 0
    [pid 10753] stat("/var/cache/libx11/compose/", 0x7fffa78970d0) = -1 ENOENT (No such file or directory)
    [pid 10753] stat("/home/user/.XCompose", {st_mode=S_IFREG|0644, st_size=9953, ...}) = 0
    [pid 10753] stat("/home/user/.compose-cache/", 0x7fffa78970d0) = -1 ENOENT (No such file or directory)
    [pid 10753] open("/home/user/.XCompose", O_RDONLY) = 9
    [pid 10753] read(9, "####\n# To get XCompose working i"..., 4096) = 4096
    [pid 10753] open("/usr/share/X11/locale/compose.dir", O_RDONLY) = 10
    [pid 10753] access("/usr/share/X11/locale/en_US.UTF-8/Compose", R_OK) = 0
    [pid 10753] open("/usr/share/X11/locale/en_US.UTF-8/Compose", O_RDONLY) = 10
    $

Trying to search for this issue has led me nowhere since most topics seem to cover getting IBus to work. As far as I've ever been able to figure out, though, IBus is not a sufficient replacement for what I'm using compose sequences for.

Anyone have any insights or fixes?

Offline

#2 2015-02-20 19:07:40

jmert
Member
Registered: 2013-07-07
Posts: 2

Re: Gnome 3.14 breaks xim input method/module

I eventually figured out the problem. It appears that I must have allowed the ibus package to install itself at some point. This causes problems because, as you can find in /usr/lib/gnome-settings-daemon/gnome-settings-daemon-localeexec:

if [ -x /usr/bin/ibus-daemon ]; then
  export QT_IM_MODULE=ibus
  export XMODIFIERS=@im=ibus
fi

By simply removing the ibus package, Gnome no longer ignores my settings, and my XCompose file works as expected.

Offline

Board footer

Powered by FluxBB