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 am connecting to a new install of Ubuntu 12.04 via remote desktop (after installing xrdp). Everything seems to work fine except that the keyboard mapping is for US rather than UK.

I have looked at the keyboard layout settings and it shows 'us' being available but no other languages. If I try to add another layout there seems none available.

Logging in on the machine itself shows English (UK) as the locale and if I try to add a new language it shows them all being available.

I have tried both ubuntu-2d and gnome-classic.

Can anyone shed some light on this?

share|improve this question

I have exactly the same problem when connecting to a remote instance on AWS. It seems to be related to xrdp. See for instance this thread, which describes a detailed work-around.

EDIT: Took me a while to get back to this, but since there has been no further activity in this thread, I finally got around to add details as suggested (demanded?) in the comments.

These are the steps I had to do to fix the keyboard layout in xrdp in Ubuntu 12.04. The original link was a big help, but a bit out-dated. I also found useful information with the rdesktop project, for finding country codes: here and here.

  1. Open console and set xkb map to correct model & layout.

    setxkbmap -model pc105 -layout no

    Replace model and layout language code to whatever is the correct one for you. I just ran setxkbmap -print on the client PC (which incidently also runs Ubuntu 12.04) to get an idea about these values. Note that setxkbmap needs to have a display to run. You can either run the console through a RDP session or perhaps even login through ssh with X display redirection, like this ssh -X <server>.

  2. Generate XRDP keymap file:

    xrdp-genkeymap km-0414.ini
    sudo mv km-0414.ini /etc/xrdp
    sudo chown root:root /etc/xrdp/km-0414.ini

    Replace the country code 0414 with the correct code for your country. See the rdesktop doc to find the correct code for you.

  3. Restart the xrdp service:

    sudo service xrdp restart
share|improve this answer
Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Eliah Kagan Jan 4 '13 at 2:41
Useful indications. I have precisely the same problem: Ubuntu 12.04.4 properly configured with fr-CA keyboard, but when I xrdp from Windows, I'm stuck with an en-US keyboard. And since setxkbmap yields "XKB extension not present", it can't be fixed from there. I ended up using xrdp-genkeymap to generate km-0c0c.ini, and then I renamed km-0409.ini (the en-US keyboard) to km-0409.ini.true as a backup and copied km-0c0c.ini to km-0409.ini. My xrdp session still thinks it's running en-US, but I fooled it into running fr-CA. This will do until a proper solution becomes known. – Urhixidur Feb 26 '14 at 20:47

I had the same problem, and in my case, just running:


without any option, fixed the issue

share|improve this answer

I have found that the XRDP keyboard layout problem is unsolvable the "easy" way, as things sometimes can be in Linux.

Fortunately, there is a workaround, as there is often in Linux.

Here is a guide I wrote:

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.