-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 set only to "us" after reconnect session instead "us,ru" #337
Comments
Addition to the previous text: i use X11rdp backend. |
have you tried compiling from git ? |
Yes. I compiled it from master branch |
Two thing, do you reproduce the issue with xorgxrdp? run xrdp-sesman in foreground Like this. This is x11rdp case.
|
I reproduce the issue. After reconnect it is only EN layout and I cannot change it. Log in console:
Temprorary i FIX layot with modify file xrdp\xorgxrdp\xrdpkeyb\rdpKeyboard.c and rebuild it:
After this change keyboard layout work perfectly. I try it on Xubuntu 14.04 and Ubuntu 15.10. As I understand it , the problem is that the client come empty adjustment and as a result apply the settings that have been set by default : ie only EN layout . |
I think so, too.
Your log says client has the US layout. Russian should be 0x00000419. Judging from your log, second or later connections are correct and first connection is somehow going wrong. It shouldn't be "us,ru". When client give xrdp server 0x00000409 layout, server keylayout always should be "us". Again, let's see which keylayout is given from the client. Now you don't have to run xrdp-sesman in foreground. Just do I think you should specify keyboard layout in client. This is a FreeRDP example. |
Additionally, if you want to use "us,ru" layout even if "0x00000409" is given from the client, you don't need to fix the source code. Editing config files is enough. Edit xrdp_keyboard.ini like this. This will override "us" by "us,ru".
If you want to use "us,ru" instead of "ru" in case you specify Russian in client, like this.
|
metalefty, |
I tried again using change xrdp_keyboard.ini - no result. As before, only the English keyboard layout. |
Hmm, xrdp_keyboard.ini works for me. I tried to disconnect & reconnect 3 different client keyboard types (us -> jp -> ru). Server session type is xorgxrdp. xrdp= cdb967c, xorgxrdp=a0add6c. By the way, what about #issuecomment-193607180? |
Thanks a lot for your instructions!
|
How to add option "grp:alt_shift_toggle,grp_led:scroll" in xrdp_keyboard.ini? |
on CentOS 7.4 problem persists |
Please add keyboard layout switch on login screen |
Hi, I al so facing this same problem. On first login the keyboard is OK (which in my case, is Spanish Latin, or es-ar). On reconnect to existing session, then the keyboards is US. Any ideas of how to fix this? The only way that works is to close the session. PD: in my case, I am accessing from Windows 10 to Ubuntu 18.04. Thanks in advance. |
Simple solution
and reconnect |
Same applies for es layout? |
I had a similar problem: Ubuntu server running xrdp and Win10 client with japaneese layout. Every time I reconnected to a session, only japaneese layout was available. |
In my case The normal reconnects (i.e. initiated via closing the RDP client (default mstsc.exe) or ending the seance on the remote machine), that happened before the error occurs, works fine and I always get my "us,ru" layout, although I didn't touch the The situation is normalized after I reboot my remote Ubuntu machine. My `/etc/xrdp/xrdp_keyboard.ini` for the reference;
; RDP Keyboard <-> X11 Keyboard layout map
;
; How this file works:
; 1. load the file and scan each section to find matching "keyboard_type"
; and "keyboard_subtype" based on the values received from the client.
; If not found, then jump to default section.
; 2. in the selected section, look for "rdp_layouts" and "layouts_map".
; Based on the "keylayout" value from the client, find the right x11
; layout value.
; 3. model/variant are inferred based on the "keyboard_type" and
; "keyboard_subtype", but they can be overridden.
;
;
; RDP Keyboard Type (http://msdn.microsoft.com/en-us/library/cc240563.aspx)
;
; 0 is not a valid value
;
; 1 - IBM PC/XT or compatible (83-key) keyboard
; 2 - Olivetti "ICO" (102-key) keyboard
; 3 - IBM PC/AT (84-key) or similar keyboard
; 4 - IBM enhanced (101- or 102-key) keyboard
; 5 - Nokia 1050 and similar keyboards
; 6 - Nokia 9140 and similar keyboards
; 7 - Japanese keyboard
;
; RDP Keyboard Subtype is vendor dependent. XRDP defines as follows:
;
; 0 is not a valid value
;
; 1 - Standard
; 2 - FreeRDP JP keyboard
; 3 - Macintosh
; ... - < any vendor dependent subtype >
;
; The list can be augmented.
;
; default
[default]
; keyboard_type and keyboard_subtype is not read for default section. It
; is only a placeholder to keep consistency. Default model/variant are
; platform dependent, and could be overridden if needed.
keyboard_type=0
keyboard_subtype=0
; user could override variant and model, but generally they should be inferred
; automatically based on keyboard type and subtype
;variant=
;model=
; A list of supported RDP keyboard layouts
rdp_layouts=default_rdp_layouts
; The map from RDP keyboard layout to X11 keyboard layout
layouts_map=default_layouts_map
[default_rdp_layouts]
rdp_layout_us=0x00000409
rdp_layout_us_dvorak=0x00010409
rdp_layout_dk=0x00000406
rdp_layout_de=0x00000407
rdp_layout_es=0x0000040A
rdp_layout_fi=0x0000040B
rdp_layout_fr=0x0000040C
rdp_layout_it=0x00000410
rdp_layout_jp=0x00000411
rdp_layout_jp=0xe0010411
rdp_layout_jp=0xe0200411
rdp_layout_jp=0xe0210411
rdp_layout_kr=0x00000412
rdp_layout_pl=0x00000415
rdp_layout_br=0x00000416
rdp_layout_ru=0x00000419
rdp_layout_se=0x0000041D
rdp_layout_ch=0x00000807
rdp_layout_ch_fr=0x0000100C
rdp_layout_gb=0x00000809
rdp_layout_latam=0x0000080A
rdp_layout_be=0x00000813
rdp_layout_pt=0x00000816
; <rdp layout name> = <X11 keyboard layout value>
[default_layouts_map]
rdp_layout_us=us
rdp_layout_us_dvorak=dvorak
rdp_layout_dk=dk
rdp_layout_de=de
rdp_layout_es=es
rdp_layout_fi=fi
rdp_layout_fr=fr
rdp_layout_it=it
rdp_layout_jp=jp
rdp_layout_kr=kr
rdp_layout_pl=pl
rdp_layout_br=br(abnt2)
rdp_layout_ru=ru
rdp_layout_se=se
rdp_layout_ch=ch
rdp_layout_ch_fr=ch(fr)
rdp_layout_gb=gb
rdp_layout_latam=latam
rdp_layout_be=be
rdp_layout_pt=pt
; if two sections have the same keyboard_type and keyboard_subtype, then
; the latter could override the former.
[rdp_keyboard_mac]
keyboard_type=4
keyboard_subtype=3
rdp_layouts=default_rdp_layouts
layouts_map=rdp_layouts_map_mac
[rdp_keyboard_jp]
keyboard_type=7
keyboard_subtype=2
model=pc105
rdp_layouts=default_rdp_layouts
layouts_map=default_layouts_map
[rdp_layouts_map_mac]
rdp_layout_us=us
rdp_layout_us_dvorak=dvorak
rdp_layout_dk=dk
rdp_layout_de=de
rdp_layout_es=es
rdp_layout_fi=fi
rdp_layout_fr=fr
rdp_layout_it=it
rdp_layout_jp=jp
rdp_layout_kr=kr
rdp_layout_pl=pl
rdp_layout_br=br(abnt2)
rdp_layout_ru=ru
rdp_layout_se=se
rdp_layout_ch=ch
rdp_layout_ch_fr=ch(fr)
rdp_layout_gb=gb
rdp_layout_latam=latam
rdp_layout_be=be
rdp_layout_pt=pt Is there any details that I can see in the xrdp logs? For example, what layout values client was send ( xrdp --version
|
Privet! What I need to have eg (setxkbmap -print -verbose 10): What I had just after reconnect: What i have after i changed +rdp_layout_us=us,ru How to add shortcut to switch layouts? Thnx |
I encountered exactly the same issue on ubuntu 22 & xrdp 0.9.17 I solved it by this https://c-nergy.be/blog/?p=17223 (my thanx go out to this guy)
Some details: After first & second connect ...
After solving, restarting server, it shows this at second connect:
Before applying the solution, here is the xrdp.log after server restart, disconnect & reconnect.
|
This is a very strange issue, to solve which you have to resort to various hacks, although in the 21st century such things should, in my opinion, work out of the box. For those who, like me, will face this problem, the solution is simple, but not obvious. Just making some adjustments to file $ sudoedit /etc/xrdp/xrdp_keyboard.ini [default_rdp_layouts]
rdp_layout_none=0x00000000
rdp_layout_us=0x00000409
rdp_layout_us_pd=0xa0000409
rdp_layout_ru=0x00000419
[default_layouts_map]
rdp_layout_none=us,ru
rdp_layout_us=us,ru
rdp_layout_us_pd=us,ru
rdp_layout_ru=us,ru
[rdp_keyboard_ru]
keyboard_type=4
keyboard_subtype=1
options=grp:ctrl_shift_toggle
rdp_layouts=default_rdp_layouts
layouts_map=default_layouts_map After these corrections, switching layouts will work even at the first connection, even at next ones. The key difference from the previous tips is setting layout: For me, the main oddity is that even if you do not make any changes in the wakko@acmenet:~$ setxkbmap -print
xkb_keymap {
xkb_keycodes { include "xfree86+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete+ledscroll(group_lock)" };
xkb_symbols { include "pc+us+ru:2+group(ctrl_shift_toggle)" };
xkb_geometry { include "pc(pc104)" };
}; But with any next connections, the second keyboard layout disappears. wakko@acmenet:~$ setxkbmap -print
xkb_keymap {
xkb_keycodes { include "xfree86+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete+ledscroll(group_lock)" };
xkb_symbols { include "pc+us+group(ctrl_shift_toggle)" };
xkb_geometry { include "pc(pc104)" };
}; Although the layout switching indicator is visible in the tray, and it even switches by |
@VVakko Thanks a lot for posting this workaround! Helped me on Ubuntu 20.04 with xrdp 0.9.12. |
@VVakko спасибо, помогло! :) |
Молодец, @VVakko, оно работает! |
Thank you! It's worked for me. I changed property Versions:
|
I have a workaround for Ubuntu 22.04 and possibly anyone using Gnome Desktop. I created this script:
and made it executable to any user, then I added it to This gets you user settings regarding keyboard layouts, parses them and executes the setxkbmap command with the corresponding arguments. EDIT: To be fair, I did not write the parsing part of the script, Copilot did. |
I'd appreciate comments on #3322 from anyone monitoring this, if they think it's relevant. |
@VVakko, thanks, it works! Can you please explain, what
|
Hello!
I test installation xrdp 0.9.0 last version on ubuntu 12.04 32bit (also i test xrdp 0.8.0)
Client is Windows 8.
I use "us,ru" keyboard layout on both computer.
When i connect first time to server with xrdp keyboard layout works perfect.
I check it command setxkbmap
But when i disconnect from session and connect to a server again i cannot change layout - it only "us".
I check it command setxkbmap:
How can i fix this?
PS. I specially test my old production server on ubuntu 12.04 32bit with version xrdp 0.6.0 - it work correctly.
The text was updated successfully, but these errors were encountered: