and Microsoft's Linux Integration Services installed
installed on a Microsoft hyper-v.
Microsoft Windows Server 2016 Standard (10.0.14393 Build 14393)
In that Centos VM I've configured two keybards, a us and a second one with gr (greek).
I connect to the Centos VM using the hyper-v "Connect" tool
and I'm able to toggle between us and gr just fine.
Obviously the hyper-v "Connect" tool neither demands
nor uses xrdp, to my knowledge.
When I connect using Microsoft RDP client, toggling between us and gr
just updates the indication in the upper right corner of the screen.
The actual keyboard remains "us". Both in gedit and terminal windows.
I found a lot of discussion regarding this problem and some suggestions too.
Here is a few of them
They all propose to generate a keyboard map ini file,
(while not using an rdp connection)
name it properly (for gr it's km-00000408.ini)
place it to the /etc/xrdp directory
and restart the xrdp service.
I followed those instructions and created a map file, but nothing happened.
I tried "updating" the /etc/xrdp/xrdp_keyboard.ini and added a
rdp_layout_gr=0x00000408 (I tried rdp_layout_el=0x00000408 too)
to [default_rdp_layouts] section
and a corresponding entry
rdp_layout_gr=gr (I tried all combinations too)
to [default_layouts_map] section.
Again nothing happened.
So, I downloaded xrdp source code from github and started searching.
Here are some of my findings.
If I'm not mistaken X11 names the greek keyboard layout as gr.
The xrdp source code follows another naming scheme and names it as el.
There is a relevant entry in
\instfiles\keymap-names.txt
and a comment above the rdpLoadLayout() in
\xorg\X11R7.6\rdp\rdpinput.c
So I'am a little bit confused as to what should be the proper entry in the xrdp_keyboard.ini
rdp_layout_gr or
rdp_layout_el
Furthermore the xrdp_wm_create() found in
\xrdp-0.9.4\xrdp\xrdp_wm.c
is the only place where get_keymaps() found in
\xrdp-0.9.4\xrdp\lang.c
is called.
I'm not sure what the xrdp_wm_create() does,
it looks like it prepares a xrdp_wm struct
which in turn contains a keymap field of type xrdp_keymap.
That xrdp_keymap struct contains a number of arrays
each one of those arrays has 256 elements,
and if I'm not mistaken, then the whole xrdp_keymap struct
corresponds to a km-XXXXXX.ini file
which is loaded by that get_keymaps() into such a xrdp_keymap struct.
It seems that, even if the km-XXXXXX.ini exists, the get_keymaps() condition
if (g_memcmp(lkeymap, keymap, sizeof(struct xrdp_keymap)) != 0)
always fails, hence the
"[WARN ] local keymap file for 0x00000409 found and doesn't match built in keymap, using local keymap file"
message in the xrdp.log.
The above makes me think that the
xrdp-genkeymap
terminal call does NOT create a proper km-XXXXXX.ini file
able to satisfy that condition in the get_keymaps() function.
Anyway, my problem remains:
Is there a way to connect from MS Windows RDP
to my Centos VM and have a keyboard
that toggles between "us" and "gr"?
I have a Centos7 VM
installed on a Microsoft hyper-v.
In that Centos VM I've configured two keybards, a us and a second one with gr (greek).
I connect to the Centos VM using the hyper-v "Connect" tool and I'm able to toggle between us and gr just fine. Obviously the hyper-v "Connect" tool neither demands nor uses xrdp, to my knowledge.
When I connect using Microsoft RDP client, toggling between us and gr just updates the indication in the upper right corner of the screen. The actual keyboard remains "us". Both in gedit and terminal windows.
I found a lot of discussion regarding this problem and some suggestions too. Here is a few of them
They all propose to generate a keyboard map ini file, (while not using an rdp connection) name it properly (for gr it's km-00000408.ini) place it to the /etc/xrdp directory and restart the xrdp service.
I followed those instructions and created a map file, but nothing happened.
I tried "updating" the /etc/xrdp/xrdp_keyboard.ini and added a
to [default_rdp_layouts] section and a corresponding entry
to [default_layouts_map] section.
Again nothing happened.
So, I downloaded xrdp source code from github and started searching. Here are some of my findings.
If I'm not mistaken X11 names the greek keyboard layout as gr.
The xrdp source code follows another naming scheme and names it as el. There is a relevant entry in
and a comment above the rdpLoadLayout() in
So I'am a little bit confused as to what should be the proper entry in the xrdp_keyboard.ini
Furthermore the xrdp_wm_create() found in
is the only place where get_keymaps() found in
is called.
I'm not sure what the xrdp_wm_create() does, it looks like it prepares a xrdp_wm struct which in turn contains a keymap field of type xrdp_keymap.
That xrdp_keymap struct contains a number of arrays each one of those arrays has 256 elements, and if I'm not mistaken, then the whole xrdp_keymap struct corresponds to a km-XXXXXX.ini file which is loaded by that get_keymaps() into such a xrdp_keymap struct.
It seems that, even if the km-XXXXXX.ini exists, the get_keymaps() condition
always fails, hence the
message in the xrdp.log.
The above makes me think that the
terminal call does NOT create a proper km-XXXXXX.ini file able to satisfy that condition in the get_keymaps() function.
Anyway, my problem remains: Is there a way to connect from MS Windows RDP to my Centos VM and have a keyboard that toggles between "us" and "gr"?
best regards Theo