This article is for anyone who is using the Dvorak keyboard layout on Linux, and having problems getting the same to work when connecting to a Windows machine using rdesktop.

Problems

First, keymaps are just that - AFAIK they just define a translation from the codes sent from the keyboard ("keycodes", e.g. "41" for the key marked "F" on a QWERTY keyboard) to a symbolic name ("keysym", e.g. "0x66" with US English and "0x75" with Dvorak keymap when pressing the key marked "F" on a QWERTY keyboard). The problem in connection with rdesktop seems to be that there is a double translation going on when both Windows and Linux are set to use Dvorak - "asdf" on QWERTY should become "aoeu" when using Dvorak, but instead you get "ar.g" in Windows. Argh indeed.

Second, there is no built in Dvorak support in rdesktop. I googled a bit, but couldn't find any straight answers for why that is the case. Maybe the "market" is just too small, or everyone else figured out the solution with a lot less trouble than I had.

Solution

The only configuration I could get to work is the following:

  • Linux set up to use Dvorak
  • rdesktop set up to use US English ( -k en-us)
  • Windows set up to use US English

Beware though: Even though you're using the setup above, your keyboard map will be messed up if the Windows desktop locks, i.e., if you during a session arrive at the login prompt. You should therefore turn off the screen saver, and use the Linux screen lock instead.