xrdp - how to change keyboard layout

I'd like to contribute here, since there seems to be little instructions.

Find the language / keyboard input you need from here

So for example fr-be French (Belgium) is 080C.

Then run these commands to generate the keyboard mapping for your chosen input.

xrdp-genkeymap km-080C.ini

To copy it in the xrdp folder

sudo mv km-080C.ini /etc/xrdp

Remember that you must change the permissions of the file, so that it can be used

sudo chown root:root /etc/xrdp/km-080C.ini

Restart the service and it should work

sudo service xrdp restart

for me it was enough to run next command, in order to set the right keyboard map in X

setxkbmap be

where you must replace the "be" with your land code. You can see the current value with

setxkbmap -query

if you have installed xrdp, you should have te xrdp-genkeymap installed on your system. the utility will be located under /etc/xrdp folder

To change keyboard layout, you need indeed to issue the xrdp-genkeymap command. The command has to be run locally on the ubuntu machine and not from the xrdp session.
issue the following command to use us layout keyboard during your xrdp session sudo xrdp-genkeymap /etc/xrdp/km-0409.ini

If you need other language layout, you have to find the correct km-xxx.ini file

Hope this help Till next time see ya


Try to locally run this code not from xrdp session :

xrdp-genkeymap /etc/xrdp/km-0409.ini

Restart xrdp and try .