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!
‹ Running Scripts Using NetworkManager Triple Head with nVidia Optimus on Fedora 21 (includes Docking udev Rules for Systemd) ›
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.
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!
Better solution:
mkdir -p ~/.rdesktop/
ln -s /usr/share/virtualbox/rdesktop-vrdp-keymaps ~/.rdesktop/keymaps
Graham Pooler beat you to it.