OS: Kubuntu 18.04 or Ubuntu 18.04

According to an answer in vi.stackexchange.com and this GitHub page including

<Multi_key> <i> <b> : "NL65AEGO0721647952"

in ~/.XCompose should generate NL65AEGO0721647952. But I can't get that to work. Nothing happens in plain text editors in Ubuntu or in Kubuntu.

I checked /usr/share/X11/locale/en_US.UTF-8/Compose to see if <Multi_key> <i> <b> was used for anything else but it isn't.

My ~/.XCompose

include "%L"

<Multi_key> <i> <b> : "NL65AEGO0721647952"

I have CapsLock as my Compose Key and can type other stuff like ©, ™, ®, µ, etc.

Edit: Even

# Make compose key work for GTK, Qt
export GTK_IM_MODULE=xim
export QT_IM_MODULE=xim

doesn't help.

  • A comment says it doesn't work for KDE.
    – muru
    Dec 11, 2018 at 4:25
  • But I can't get it to work in Ubuntu as well.
    – DK Bose
    Dec 11, 2018 at 4:27
  • @muru And the comment you linked is from someone who's been battling, for years, to get KDE/qt to use Ctrl+Shift+u followed by Unicode the way gtk uses it. I don't think it's related to using the Compose key, which, by and large, works in KDE.
    – DK Bose
    Dec 11, 2018 at 4:32
  • 2
    I see. Anyway, if I run gedit in the terminal, with <Multi_key> <a> <b> : "askj" foobar in my .XCompose, I get this error: (gedit:4944): Gtk-WARNING **: 13:45:20.035: GTK+ supports to output one char only: "askj" foobar: <Multi_key> <a> <b> : "askj" foobar .... Looks like it no longer works with GTK.
    – muru
    Dec 11, 2018 at 4:47
  • @muru, right now I'm back on Kubuntu but I have leafpad (gtk2) and mousepad (gtk3) text editors installed. Both work with the snippet only if launched via the terminal and not when launched by keyboard shortcuts! Geany, also gtk3, produces a message similar to what you see.
    – DK Bose
    Dec 11, 2018 at 5:03

1 Answer 1


There is a bug report 1845332 about this at launchpad.
Could you please mark it also affects you?

Upd: There is a response for this bug report.

How to make Compose key combination generate strings (Ubuntu 18.04):

  • Open Settings → Region & Language → Manage installed languages → (Language tab)
  • Switch Keyboard input method system to XIM.
  • Close.
  • Reload.

It supposed to work also for distributions based on Ubuntu.

If XIM is working better, why it is not default?

(see answer for original bug report)

For keyboard input Ubuntu can use XIM (X Input Method) or IBus (Intelligent Input Bus) or none.

XIM is very old, it was designed for X (X Window System). If/when Ubuntu switches from X to Wayland it will be most likely dropped.

The default keyboard input method now (18.04) is IBus, because Ubuntu uses GNOME for GUI and GNOME relies on IBus to a large extent.
When IBus is selected for keyboard input method, GTK (not IBus) deals with Compose key combinations. GTK is not able to handle multi character strings. So it is not an IBus bug, it is GTK feature. No fix is expected here.

From the other side, XIM can make problems too, and most likely they will not be repaired either.

So far XIM works for me. I wonder what will happen with this issue if XIM will pass away.

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.