WhitewaterFoundry / Fedora-Remix-for-WSL

Fedora Remix for Windows Subsystem for Linux.
Other
696 stars 51 forks source link

With remote session xrdp, any of the altgr character is writable #166

Closed Lanyaid closed 1 year ago

Lanyaid commented 1 year ago

Describe the bug Into a localhost console all seems good. In a terminal in rdp session, any of the altgr characters combination does work but #.

To Reproduce Steps to reproduce the behavior:

  1. Setup a fresh install of fedoraremix.
  2. Install rdp server with fedoraremix procedure (avahi+xrdp) in order to open an x session with a rdpclient in localhost, located in https://www.whitewaterfoundry.com/blog/2022/4/16/announcing-built-in-systemd-support-in-fedora-remix-for-wsl

Expected behavior To be able to write | or @ characters into a terminal in a xrdp session.

Screenshots 1srt screen, in a local console, i have pulsed altgr+º123456 keys to write without any problem charaters : |@#~€¬ 2nd screen into remote session from localhost (same material, same keyboard etc...), same combination of keys gave: <nothing><nothing><strange command result>#<strange command result><unkown carater><unkown carater>

image

image

Additional context Windows language is french. Keyboard is spanish and configured as spanish keyboard in windows. (I'm french but working in spain for the reason why it's configured like that) I tried a lot of things that I found in websites but nothing worked. As I don't know what is the problem, it's not easy to apply a solution.

some more things i can give:

image

image

image

image

image

image

image

image

image

Basic Troubleshooting Checklist

As last test I did, is to change the level 3 key from right alt to right alt as a composed by key (Shift + Right Alt is the composed key) in gnome-tweaks and I am able to write some characters with alt gr pressed (I think something like English keyboard). From left to right, all the numerics keys of the top of the keyboard image

What other troubleshooting have you attempted? With Windows Remote Desktop, I tried to not send the special characters in the tab "local ressources" putting "only in localhost" when special combination of keys are used. I tried to use another Remote Desktop Client (mRemoteNG)

Insert here:

WLinux Version

cat /etc/os-release

NAME="Fedora Remix for WSL"
VERSION="36"
ID=fedoraremixforwsl
ID_LIKE=fedora
VERSION_ID=36
PLATFORM_ID="platform:f36"
PRETTY_NAME="Fedora Remix for WSL"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:fedoraproject:fedora:36"
HOME_URL="https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL"
SUPPORT_URL="https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL"
BUG_REPORT_URL="https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL/issues"
PRIVACY_POLICY_URL="https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL/blob/master/PRIVACY.md"
FEDORA_REMIX_VERSION=36.0.4

Find: Settings->Apps->Apps & features->WLinux->Advanced Options->Version. Insert here:

image

Windows Build

image

Run 'systeminfo | findstr /C:"OS"' in Command Prompt and insert here:

systeminfo | findstr /C:"OS"
Version du BIOS:                                HP Q83 Ver. 01.19.00, 13/01/2022

For help on retrieving: https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#check-your-build-number

crramirez commented 1 year ago

Hello @Lanyaid,

Very good findings and excellent explanation. We will try to reproduce and find a solution.

Regards, Carlos

Lanyaid commented 1 year ago

Thanks :-) as last thing to say, they are a lot of similars things in the web, but nothing very concluant at all. Or nothing that I could understand and say "eureka!" that is that thing or that other wich is missconfigured or giving the problem. googling something like "wsl altgr" gives some more information

Lanyaid commented 1 year ago

Hi there, any update with that? someone else has a similar problem?

crramirez commented 1 year ago

Hello @Lanyaid,

I can reproduce the problem in Fedora Remix, but still, we couldn't find the solution. The good news is that it doesn't happen with Pengwin with XFCE. So, the task may be can be reduced to look for what are the differences.

I'll keep you posted when we find something.

Regards, Carlos

Lanyaid commented 1 year ago

Great news, at least, that you can reproduce it :-). thx a lot for the work, I'm still waiting for more good news, so :-D!!

Just another thing, I did more or less the same procedure with ubuntu, and the problem did not ocurre, I feel that it's a problem with a config in xrdp, the layout of the xrdp keyboard perhaps, I don't know.

Regards Fred

crramirez commented 1 year ago

Hello @Lanyaid

The problem is that Windows sends Ctrl+Alt+Shift through RDP when you press AltGr. I found this page that has a solution that modifies the default mappings for XRDP:

http://c-nergy.be/blog/?p=3858

So, for the Spanish keyboard, you need to replace the content of the file: /etc/xrdp/km-0000040a.ini By: c-nergy.be/downloads/km-040a.ini

Then reconnect the session.

For other languages, the page provides the mappings.

Hope it helps

Lanyaid commented 1 year ago

Hi Carlos,

thx for your work and your answer.

It works like a charm!!! thank you!

I thought it was on the xrdp side that I had the problem, but I couldn’t figure out what exactly... You put your finger exactly on the problem.

Muchas gracias y muy buen trabajo.