I have tried to set up my Compose key in Lubuntu 20.04LTS and am having no luck.

I've gotten to where I see

org.gnome.desktop.input-sources xkb-options ['compose:ralt']

But am unable to get any combinations to work. Nothing happens. For example, if I want to make a "ñ" character, I press the "Alt Right" key (then unpress it). Then I press Shift and ` to get the tilde (and unpress). Then "n" for the n. And it simply shows me "~n" as if I'd typed those two characters in the first place.

Am I doing something wrong in the key presses? Do I need to hold Alt-Rt down for instance and see a prompt the way the Cntl-Shift-U underlines the "u" and signals it's waiting for a Unicode?

Or do I hold down the Alt-Rt key the whole time I'm pressing? If so, this seems very awkward for typing.

Really confused and frustrated with the difficulty of getting these simple accented characters to appear.

2 Answers 2


Well, in further sleuthing, I found that in Lubuntu, apparently, the gnome-tweaks settings don't have any effect. I used

setxkbmap -query

And it showed nothing for the compose variable.

So I then typed

setxkbmap -option "compose:ralt"

And lo and behold, it now works as it is supposed to. I have a feeling that I'll need to figure out how to make this setting sticky so I don't have to run it each time I log in, but at least it's working. What a relief!

  • It looks like you found the gsettings command for Ubuntu somewhere, while it apparently does not apply in the LXQt environment. I suspect that there is a GUI option for defining a compose key persistently. Optionally you may want to figure out the gsettings command which applies to LXQt. Oct 28, 2022 at 13:50
  • I have no real idea what a "Compose" key is, thus didn't provide reponse; Lubuntu uses LXQt & and the Qt5 stack below that; GNOME uses GTK3 so expecting gnome changes/tweaks to take effect when it's not being used was hopeful (some will as some tweaks will impacts parts that are common in both so maybe that's what you were hoping). I'll provide a manual link manual.lubuntu.me/lts/F/keyboard_shortcuts.html (Note: Since release of 22.10; the LTS manual is now 22.04, so 20.04's manual was dropped this month). More detail exists on Lubuntu's phab too
    – guiverc
    Oct 28, 2022 at 21:53
  • If you want something to autostart when you login to LXQt; refer manual.lubuntu.me/lts/3/3.2/3.2.13/session_settings.html (Note: that's the 22.04 manual as of a little over a week ago, we only have the 20.04 manual now in unpublished form) though you could run the command in other ways too. Well done for working it out though, and thanks for sharing your result(s).
    – guiverc
    Oct 28, 2022 at 21:54

Probably you use a keyboard layout which enables Right Alt as the third level modifier. In that case, in order to use that particular key as compose key, you can run this command:

gsettings set org.gnome.desktop.input-sources xkb-options "['compose:ralt', 'lv3:ralt_alt']"

OTOH, in that case — to access 3rd and 4th level symbols — you need to pick some other key as the third level modifier.

A simpler solution is to choose some other key but Right Alt as the compose key.

  • Thank you, I appreciate the suggestion. I have tried with several different keys. Scroll-lock, the right-windows key, and the right-alt. None work, and yes, that could mean that they're ALL 3rd modifiers, perhaps? But seems unlikely. Oct 28, 2022 at 2:12

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.