Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboard layout changes on client connection loss #3348

Open
Chesters-CZ opened this issue Dec 18, 2024 · 4 comments
Open

Keyboard layout changes on client connection loss #3348

Chesters-CZ opened this issue Dec 18, 2024 · 4 comments
Labels

Comments

@Chesters-CZ
Copy link

xrdp version

0.9.21.1

Detailed xrdp version, build options

root@CHESTERS-SERVER:/home/chesters# sudo xrdp --version
xrdp 0.9.21.1
  A Remote Desktop Protocol Server.
  Copyright (C) 2004-2020 Jay Sorg, Neutrino Labs, and all contributors.
  See https://github.com/neutrinolabs/xrdp for more information.

  Configure options:
      --enable-ipv6
      --enable-jpeg
      --enable-fuse
      --enable-rfxcodec
      --enable-opus
      --enable-painter
      --enable-vsock
      --build=x86_64-linux-gnu
      --prefix=/usr
      --includedir=${prefix}/include
      --mandir=${prefix}/share/man
      --infodir=${prefix}/share/info
      --sysconfdir=/etc
      --localstatedir=/var
      --disable-silent-rules
      --libdir=${prefix}/lib/x86_64-linux-gnu
      --libexecdir=${prefix}/lib/x86_64-linux-gnu
      --disable-maintainer-mode
      --disable-dependency-tracking
      --with-socketdir=/run/xrdp/sockdir
      build_alias=x86_64-linux-gnu
      CFLAGS=-g -O2 -ffile-prefix-map=/build/xrdp-QTF2mN/xrdp-0.9.21.1=. -fstack-protector-strong -Wformat -Werror=format-security 
      LDFLAGS=-Wl,-z,relro -Wl,-z,now -Wl,--as-needed
      CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2 
      PKG_CONFIG_PATH=/build/xrdp-QTF2mN/xrdp-0.9.21.1/pkgconfig

  Compiled with OpenSSL 3.0.14 4 Jun 2024
root@CHESTERS-SERVER:/home/chesters# 

Operating system & version

Debian GNU/Linux 12 (bookworm)

Installation method

dnf / apt / zypper / pkg / etc

Which backend do you use?

?

What desktop environment do you use?

GNOME

Environment xrdp running on

Dell PowerEdge R510 server with MGA G200eW WPCM450 GPU

What's your client?

Remote Desktop Connection (C:\WINDOWS\system32\mstsc.exe) running on a Windows 11 machine

Area(s) with issue?

Keyboard / Mouse

Steps to reproduce

  1. Connect via Remote Desktop Connection:
    image
  2. Disconnect client from network
  3. Reconnect client to network
  4. Connect via Remote Desktop Connection again

✔️ Expected Behavior

Keyboard layout after step 1 should be the same as after step 4 (for me, Czech QWERTZ)

❌ Actual Behavior

The layout after step 1 is correct - Czech QWERTZ
The layout after step 4 is different - English QWERTY or some kind of cyrillic layout

Anything else?

Keyboard layout gets fixed after logging out and logging back in. The keyboard layout in the Gnome settings stays unchanged:
image

xrdp-sesman.log
xrdp.log
xorg.conf.txt
Github does not accept the .conf filetype, so I appended .txt.

@matt335672
Copy link
Member

This seems to be down to the Czech keyboard layout not being supported.

The keyboard identifier for the Czech keyboard (from here) is 00000405. This can be seen from the xrdp.log log file which shows a fallback to the US keyboard:-

20241217-19:25:04] [INFO ] xrdp_load_keyboard_layout: Keyboard information sent by the RDP client, keyboard_type:[0x07], keyboard_subtype:[0x00], keylayout:[0x00000405]
. . .
[20241217-19:25:05] [WARN ] Cannot find keymap file /etc/xrdp/km-00000405.ini
[20241217-19:25:05] [WARN ] Cannot find keymap file /etc/xrdp/km-00000405.ini
[20241217-19:25:05] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini

We're no longer supporting xrdp v0.9.x apart from security fixes. However, I can put a patch together for you for v0.10.x, which would probably work for v0.9.x. Would you be interested in trying that?

@Chesters-CZ
Copy link
Author

Sure, @matt335672, I'd be happy to ^^

@matt335672
Copy link
Member

Thanks.

I'm looking at the Windows layout for the Czech keyboard (code 0405) here:-

https://www.kbdlayout.info/kbdcz

The GNOME layout from a screenshot is here:-

image

These look different to me (but I'm not a Czech speaker). Is this what you'd expect in moving from Windows to GNOME, or am I missing something?

@Chesters-CZ
Copy link
Author

Yes, the Windows and Linux keyboard layouts are different. I don't know why that is, but it seems to be a Linux-wide difference not exclusive to GNOME. The Linux variant of the Czech layout is the same on Arch with Plasma and Debian without a GUI, too.

It's most likely just a difference for the sake of there being a difference. It doesn't really matter in day-to-day typing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants