Fedora Linux Support Community & Resources Center
Old 13th June 2011, 04:20 PM
GandalfGraa Offline
Registered User
Join Date: Apr 2010
Location: Oslo, Norway
Posts: 27
Question Xrdp and keyboard mapping (again)

Xrdp is just what I need for my Fedora 15 machine. However, there is this keyboard problem again. I am accessing the Linux machine from a Windows 7 computer with the exotic Norwegian keyboard layout. There is no keymap file provided, and the documentation on how to make one working is rudimentary. The provided maps are merely a long listing of characters without indication whether they are scan-codes or something else and what the numerical values are.

Can anyone help with some guidance on how to set up the right keymap file?

Thanks a million for any hints!

--- G
Reply With Quote
Old 17th June 2011, 06:55 AM
GandalfGraa Offline
Registered User
Join Date: Apr 2010
Location: Oslo, Norway
Posts: 27
Cool Almost there - but something does not work

After looking into this and trying to assemble information from several sources it starts to make sense. Here is what almost works for me.
  1. Setting right keyboard in X This is done with "setxkbmap <language code>" where language is a two letter code. In my case "setxkbmap no" works. A good guide to setxkbmap can be found at http://tldp.org/HOWTO/Intkeyb/x53.html
  2. Convert the X keyboard mapping to the Xrdp keymap format. This is done with the command "xrdp-genkeymap ~/km-0414.ini" The code 0414 is the code for Norway.,you have to replace this with yours. The complete list of country codes can be found at http://rdesktop.svn.sourceforge.net/...87&view=markup
  3. Enable the KM file. Log in as root and move the produced file with "mv ~/km-0409.ini /etc/xrdp/" and then set root as the owner of this file with "chown root:root /etc/xrdp/km-0409.ini"
  4. Stop the Xrdp server. First find the server processes with "ps -A | grep xrdp" and then "kill nnnn" where nnnn is the process id. Both the xrdp and the xrdp-sesman process should be killed.
  5. Restart the Xrdp process. This is done with the command "/etc/init.d/xrdp start" still as root.

HURRAY! Almost there

After this most of the keyboard is working except for the important AT sign (I can not write it), and some of the other AltGr symbols important for programming like braces and brackets.

The current X key map can be dumped with "xmodmap -pk > mykeys.txt" and mykeys can be opened with a text editor. The columns are
  1. Key
  2. Key without any qualifier
  3. Shift + Key
  4. AltGr + Key
  5. Shift + AltGr + Key
The X key map symbols are given in hex while the Xrdp key map file uses the same symbols but converted to decimal values. Normally the same symbol is given before and after the comma, like for the A-key (number 38)
I have no idea what the colon means, and I have not understood why some keys have different values before and after the colon, but 97 = 0x61, which is just what we find in the X key map file "mykeys.txt".

The Xrdp keymap file has several sections that are obvious for the alternative alternation keys. For instance this say that for the number two key 11:

and 64 = 0x40 which is exactly the AT sign precisely where it should be on a Norwegian keyboard. However, it does not work! It seem that the altgr section is ignored for some reason, and AltGr+2 gives q. So close but not yet....

Any ideas anyone?

Thanks a million!

---------- Post added 17th June 2011 at 07:55 AM ---------- Previous post was 16th June 2011 at 09:48 PM ----------

The missing AltGr characters can be defined with the xmodmap command. The general syntax for my @ key at AltGr+2 was

xmodmap -e "keysym 2 = 2 quotedbl at quotedbl at"

Note that all five columns of the previously generated "mykeys.txt" are defined (with the equal sign between the first and the other four). As you can see [@] this works for all the missing AltGr combinations. The names of the symbols, like "quotedbl" for the double string quotes used around the keysym string, can best be found in the the previously generated "mykeys.text" file.

It is impractical to give the above xmodmap for the 8 AltGr+key combinations on the Norwegian keyboard missing. The solution is to create an "~/.Xmodmap" file containing only the command strings of the above commands. Mine looks like this:

keysym e = e E EuroSign e EuroSign
keysym 0 = 0 equal braceright equal braceright
keysym 2 = 2 quotedbl at quotedbl at
keysym 3 = 3 numbersign sterling numbersign sterling
keysym 4 = 4 currency dollar currency dollar
keysym 7 = 7 slash braceleft slash braceleft
keysym 8 = 8 parenleft bracketleft parenleft bracketleft
keysym 9 = 9 parenright bracketright parenright bracketright


This file is read every time KDE starts and combined the Xrdp keymap file and this defines all keys on my keyboard. A similar combo solution might also work for your language?

Good luck!

--- G

Last edited by GandalfGraa; 17th June 2011 at 07:24 AM.
Reply With Quote
Old 11th March 2014, 04:45 PM
kharvster Offline
Registered User
Join Date: Mar 2014
Location: Montreal QC
Posts: 1
Re: Xrdp and keyboard mapping (again)


I have found that the XRDP keyboard layout problem is unsolvable the "easy" way, as things sometimes can be in Linux.

Fortunately, there is a workaround, as there is often in Linux.

Here is a guide I wrote:


Last edited by kharvster; 11th March 2014 at 05:02 PM.
Reply With Quote

keyboard layout, keymap, xrdp

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
XRDP Polish keyboard mapping masterpascaler Servers & Networking 2 26th October 2012 10:38 AM
keyboard mapping gfenton Using Fedora 1 5th March 2011 09:53 PM
Keyboard mapping eliashickman Using Fedora 3 8th September 2009 03:17 PM
Keyboard mapping P.o.D Using Fedora 4 4th September 2009 11:13 PM
Keyboard mapping plrsmith Hardware & Laptops 0 12th June 2009 10:26 AM

Current GMT-time: 09:10 (Tuesday, 26-09-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat