neutrinolabs / xrdp

xrdp: an open source RDP server
http://www.xrdp.org/
Apache License 2.0
5.8k stars 1.73k forks source link

Toggle keyboard between us and gr (greek) not working #897

Open tbebekis opened 7 years ago

tbebekis commented 7 years ago

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

kosmasm commented 4 years ago

I have exactly the same problem! Anyone found a solution or a workaround?

matt335672 commented 2 days ago

I'd appreciate comments on #3322 from anyone monitoring this, if they think it's relevant. I can see it may not be an exact match.