I'm running ubuntu 16.04 LTS, and have used the "Keyboard" application to set my "Compose" key, but every time I do the key retains its old function. I've tried this with "Caps Lock", "Right Ctrl", and "Menu", and have logged out and back in between making the change with no effect.

The change is saved in the "Keyboard" application the next time I log in, and I can also check it in gsettings:

$ /usr/bin/gsettings get org.gnome.desktop.input-sources xkb-options

I have to specify the path for gsettings because when I don't I get the following message:

$ gsettings get org.gnome.desktop.input-sources xkb-options
GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.
@as []

I think this has something to do with the gsettings in my Anaconda installation in light of https://askubuntu.com/a/943739/457920.

The keyboard layout I am using is "English (international AltGr dead keys)", and the "AltGr" key in that layout works fine for me. The "Compose" key still fails to work when I switch to the more basic "English (US)" keyboard layout.

Has anyone else experienced this problem or know of places to look for the source? I've found the question Compose key not working on Ubuntu 16.04, but the behavior there doesn't match my situation (the question poster had "Compose" working in some, but not all, applications, whereas my "Compose" key doesn't work in any application I've tried, mostly Firefox and Terminal).

Edit: One additional point about my setup that may be relevant is that I run both Unity and xmonad as my window managers. xmonad uses the "Super" key for special things, so I suppose there's a possibility that it is messing with the keyboard layout in a conflicting way. The problems I describe with the "Compose" key are present both when using Unity and when using xmonad.

Edit 2: Upon request, I tried setting the "Compose" key in a guest session, and everything worked fine there, so that seems to be a clue.

  • Can you please enter a guest session, enable a compose key there, and let us know whether it works in the guest session. Feb 6, 2018 at 2:56
  • The compose key works when I enable it in a guest session. Presumably that suggests something about where I should be looking to fix the problem for my user account? Feb 6, 2018 at 17:06
  • Sort of. It tells us that the problem lies somewhere in your home directory. ;) It's a subtle issue; this bug report includes some reported workarounds which have solved it for some people. Feb 6, 2018 at 18:07
  • I'll look through that bug report to see if anything helps. I'm concerned that the bug report doesn't describe what I'm experiencing, though, since my AltGr dead keys work fine, and my problem with the compose key is not limited to the terminal. Feb 6, 2018 at 19:23

3 Answers 3


I've had the same issue in xmonad - while the compose key was working fine in "Gnome Flashback (Metacity)", it had no effect when I used it in "Gnome Flashback (Xmonad)".

I tried all kinds of solutions, including setting the compose key in gsettings (As described in the question) and trying different options in im-config and others in the related bug report.

What finally worked for me was a simple:

setxkbmap -option "compose:lwin"

(I'm using the left Windows-key as compose key, replace with "compose:menu" to fully answer the question)

To make this permanent on Ubuntu 16.04 for your user, add the command to ~/.xsessionrc:

echo '/usr/bin/setxkbmap -option "compose:lwin"' >> ~/.xsessionrc

The answer by Benke helped me, finally.

Ubuntu 18.04 with lightdm here. My case was caused by switching from gdm3 to lightdm for display.

Add: my substitute for key "lwin" is "rctrl" (right control)


I did

dconf write /org/gnome/desktop/input-sources/xkb-options "['compose:lwin-altgr']"

and then the combination WinAltGr did not work.

Turns out one needs to do AltGrWin instead... order matters

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.