Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently installed LXDE in Ubuntu 11.10, so that I can choose it at the login screen, but I've since noticed that there's no compose key (since I enabled it in Gnome Shell and Unity) so I was wondering how to enable a compose key?

Thanks for any help :)

share|improve this question
up vote 8 down vote accepted

setxkbmap -option "compose:caps" for CapsLock

setxkbmap -option "compose:ralt" for right alt =)

share|improve this answer
Hi, I did that for the right alt, but then I did it for the right ctrl instead, is there anyway to get rid of the one for the right alt, as now I can't use the Euro sign, as Alt gr doesn't work anymore, thanks :) – Jack Fifield Nov 5 '11 at 16:15
This messes up other keys on my machine. – l0b0 Apr 12 '12 at 15:00
This doesn't work for my with Lubuntu in a Virtualbox. Instead altgr opens up the context menu. Any further suggestions? How do I tell if the setting was correctly applied? How can I tell LXDE to unbind the menu behavior from AltGr? – HansHarhoff Jan 27 '14 at 12:49

To set the compose key

sudo leafpad /etc/default/keyboard

edit XKBOPTIONS to like this


To get a list of available keys:

grep compose /usr/share/X11/xkb/rules/xorg.lst

Reboot for the change to be applied or

setxkbmap -option "compose:Shift+AltGr"

To check if the option was set correctly

setxkbmap -print -verbose 10


press Shift then AltGr and release then click on "o c" to obtain ©.

Additional reading

share|improve this answer

You can check if the keyscan code on your keyboard same as default setting. Did you check if you can do the compose by selecting predefined keyboard with Compose key?

share|improve this answer

Your Answer


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.