1

Running RDP on my Win10 box against my Raspbian distro on an R4 with xrdp.

My keyboard layout was not corresponding to my Norwegian keyboard.

I followed the advice in Save setxkbmap settings? to get the keyboard (Norwegian).

setxkbmap no in a terminal fixes it. I also followed the advice and added that to ~/profile.

Problem is my keyboard layout seems to be reset when the connection is broken (for what ever reason, network glitch, rebooting router after fiddling with some settings etc) or simply being inactive for a while even without the connection being broken.

Any takers?

Quick question. What's the difference between setxkbmap no and setxkbmap -layout no? Both seems to do the trick but both suffers from the same lack of permanency.

Stephen Kitt
  • 434,908

1 Answers1

0

Since you are using xrdp you need to generate a mapping for the RDP protocol.

First you need to set the proper keyboard layout with setxbkmap as you mentioned. Then you can use the xrdp-genkeymap to extract the mapping used by X. You need to find the code for your keyboard layout. You can find it in this list. Here is an example with my French keyboard:

cd /etc/xrdp/ # goes into the right directory
sudo xrdp-genkeymap km-040C.ini

And finally, after restarting the service with sudo service xrdp restart your problem should be fixed.

Please note that you may have to install the xrdp-genkeymap command using your favorite package manager. The km-040C.ini file may already be in the /etc/xrdp/ directory, however I am not sure for the Norwegian alternative.

Related