Droo-Labs

the perspicacious ramblings of droo

Resolving the infamous rdesktop error: failed to open keymap en-us

So, a simple post for today! I’ve been using rdesktop-vrdp a lot lately and I’ve been very displeased because the arrow keys, as well as del/ins/home/end/pgup/pgdown don’t work. Of course, I’ve been too busy to even bother looking into it until today, although I wish I would’ve sooner. A simple little

strace rdesktop-vrdp hostname 2> output.txt

showed the following:

open("/home/user/.rdesktop/keymaps/en-us", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/VirtualBox/rdesktop-vrdp-keymaps/en-us", O_RDONLY) = -1 ENOENT (No such file or directory)
open("keymaps/en-us", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/user/.rdesktop/keymaps/en", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/VirtualBox/rdesktop-vrdp-keymaps/en", O_RDONLY) = -1 ENOENT (No such file or directory)
open("keymaps/en", O_RDONLY) = -1 ENOENT (No such file or directory)

The keymaps are all stored in /usr/share/virtualbox/rdesktop-vrdp-keymaps/ though, which this doesn’t seem to be looking in. Why? Not sure for now, but I’ll probably look into the why a little later. My quick solution was this:

mkdir -p ~/.rdesktop/keymaps/
ln -s /usr/share/virtualbox/rdesktop-vrdp-keymaps ~/.rdesktop/keymaps

And that’s all there is to it!

4 thoughts on “Resolving the infamous rdesktop error: failed to open keymap en-us

  • Graham Pooler says:

    Many thanks for this.

    A simpler solution is:
    mkdir -p ~/.rdesktop
    ln -s /usr/share/virtualbox/rdesktop-vrdp-keymaps ~/.rdesktop/keymaps

    Uses less space and has the advantages that any map updates will be automatically available.

    • Drew Dahl says:

      You are correct! I think I was feeling a bit lazy the day I wrote this, although that’s hardly an excuse for such a silly oversight. Thanks for the correction, Graham!

  • anv says:

    Better solution:

    mkdir -p ~/.rdesktop/
    ln -s /usr/share/virtualbox/rdesktop-vrdp-keymaps ~/.rdesktop/keymaps

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>