Wrong keyboard layout in RDP session over Debian GNU/Linux

I’ve started using XRDP so that my girlfriend can connect her Windows netbook to my Debian GNU/Linux box and do her work. It works pretty well, no 3D acceleration, no remote sound, but everything else is fine. I just had to fix the keyboard layout since we use the Spanish one and XRDP insisted that we should use the U.S. one.

I found this post explaining what I need to do. Basically, XRDP needs a keyboard layout map and Debian doesn’t provide one. Fortunately, creating one is easy with the following command:

# xrdp-genkeymap /etc/xrdp/km-040a.ini

The 040a code can be looked up in this page,  it’s the hexadecimal code preceding every layout name. This has to be done in a local session since it just takes the currently active layout in your X session and writes to a file.

If you’re forced to do it through RDP you have to set the right layout before writing it to the file. Try the following command adjusting parameters to your keyboard layout:

# setxkbmap -layout 'es,es' -model pc105

Next, run xrdp-genkeymap.

Done, restart XRDP.

Advertisements

One comment

  1. I have the same issue… but worst… all runs on a Tablet… it has Android (i think is 4.0 or 4.1, not sure,), i put a kit to have loop mounted a arm Linux system (stored in a 2GiB file loop monted) … all (Android & Linux) runs on the same Tablet… sorry but i am not a GuRu on that… i use third party tools to prepare and install such “rare” Linux over Android.

    What i do to access graphical desktop of such Linux on the Tablet:
    I use an Android Terminal emulator app to run commands on Android, i type one command to start on such Linux system a X server (i think it is for that… it mounts a loop device, etc.. ), then i close such terminal emulator (no needed) and run other Android app (graphical one) to connect to such Linux (it uses RDP), after some seconds it shows me the Linux desktop and let me work, open LibreOffice write, etc…

    To stop it i do this:
    Tell linux desktop to logout… after press logout… screen freezes, then on Android app i choose disconnect, then i close such RDP android app and open a android terminal emulator and type a command to stop Linux and unmount loop mounted file, the i close such terminal emulator

    The problem is with keyboard… on the Linux system… i can not type any key with accent, n with tilde, etc… the keyboard seems to only accept keys as if it where English… not Spanish… if i type on an Android File editor, save it, go to Linux and open that file, the characters are shown correctly, also more i an Copy&Paste them… what i con not do is to type them directly.

    In Android i use “Hacker’s keyboard” a good one for Android, also the standar keyboard that comes with Android and also a lot more… i set the one i want when i want… i had tried with all… same problem on all of them.

    From Android Terminal Emulator i can connect to an android shell, and can type correctly… i enter a command and get to a root shell of that Linux (that was the way i install LibreOffice, etc on it, doing apt-get install …) and i also can type such characters (if i do not remember bad)… it is only when RDP to graphical desktop when fails.

    On such linux root sheel if i type command setxkbmap … an error is shown telling something is missing (not remember now what exactly the error was)…

    Is out there any Tutorial for really noobs? i mean… i use Android DebianKit app to install a Linux on the Android Tablet that runs over Android (as an Android proccess), it does not do chroot so from Linux i have full read/write access to Android / … more Linux / is the Android / … i know it is a high risk but do not know anything better that works on such Tablet… the Android has no ability to loop mount anything… but that app does it.. other apps i had tried fail telling mount error (Android mount command does not understand loop, but Android kernel has loop support), it is a chinesse tablet… you know!!!

    Apps i use on Android (if i do not remember bad):
    DebianKit – to create a 2Gib file and install on it a very basic Linux system (i think Ubuntu Precise with LXDE desktop)
    Terminal – to access android console
    RemoteRDP – to login to such linux and see linux desktop

    What must i install to be able to put the correct keyboard layout on such Linux… and how to know which one is the correct one?

    I do not remember to see /etc/xrdp/ folder on such Linux…but i will check for it when i will have again the tablet on my hands.

    I had also tried to use GNome and/or KDE as desktop… but any attempt to install them (apt-get install … or with synaptic) makes Linux to shutdown abnormally… it seems only to work with LXDE… and i also had problems with DebianKit… while installing i must do some extra work since installation fails in middle of the proccess…

    I mean… when installing LXDE … apt-get install … lxde … android (not remember the exact pakage) it unmount the loop mount and do not end normally…. it is supposed to work ok and not unmount, but fails … like if on a normal PC you take out the power cord in middle of install … after that i must run some commands… to partially fix what i can… then i can continue with next step… if i re-try same step the same problem persist… so i am afraid something important can be missed… since one step of Linux install do not work…

    But at least i got Linux running with LXDE and LibreOffice runs on it… the only problem i have is with keyboard… it seems to be in english, i want it in Spanich layout…

    Since i saw RDP can have problems with keyboard layouts… maybe what i extra do on Linux install (to fix(workaround the non working install step) is not a great problem… maybe it is RDP is using english layout…

    But i am a totally noob on that… i had never before use RPD… most near i had use is a Windows to Windows VNC… i also have never used SSH for more than remote terminal access to a Linux from a Linux… i am totally lost on this things…

    Is there any package i can install with apt-get that fix keyboard layout? or at least let me run setxkbmap without telling there are not installed some parts needed for setxkbmap to run?

    where can i look for?

    Thanks in advance… hope someday i could fix it.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s