The officially official Devuan Forum!

You are not logged in.

#1 2022-11-23 11:56:07

delgado
Member
Registered: 2022-07-14
Posts: 38  

[SOLVED] How to set keyboard layout in a remote X session?

Hi,

when I'm at home, having a wire guard vpn connection to the company, via remote-desktop to xrdp (virtual session, not screen mirror): The keyboard layout switches to 'en_US'.

The reason is unknown, this does not happen when the connection comes form a local machine. Anyway.

I used to have a German keyboard, anything else is English / en_GB.
To switch back to the layout:

$ setxkbmap -layout "de" -nodeadkeys   # same with or without 'nodeadkeys'

This works not 100%. The [Altgr] key stays dead, which means none of {[]}\| .

What am I missing? Or
How to get the [Altgr] key working?

Thanks and regards.

Online

#2 2023-01-06 12:14:08

delgado
Member
Registered: 2022-07-14
Posts: 38  

Re: [SOLVED] How to set keyboard layout in a remote X session?

Update:
The original post was not very precise: xrdp is the problem.
And I found a somewhat dirty hack to fix the keyboard layout.

The loaded keymap is:

sudo cat /var/log/xrdp.log | grep km-000 | tail -1
[20230106-12:31:06] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini

Which is "us". "de" is "km-00000407.ini".
Backup and copy:

sudo gzip /etc/xrdp/km-00000409.ini
sudo cp /etc/xrdp/km-00000407.ini /etc/xrdp/km-00000409.ini

After logging in, it is still a "us" keymap, but switching to "de" now works

setxkbmap de

Would prefer a cleaner solution, but at least it works by now.

Edit: Will mark it as solved. And look for another remote X session solution.

Last edited by delgado (2023-01-06 12:25:09)

Online

Board footer