As you probably will have a hard time finding all the letters for
`setxkbmap us' when you're just learning Dvorak, it may help
to put a couple of aliases in your .${SHELL}rc file:
alias aoeu='if [ $DISPLAY ]; then setxkbmap us; else loadkeys us; fi'
alias asdf='if [ $DISPLAY ]; then setxkbmap dvorak; else loadkeys dvorak; fi'
That way, you can switch back and forth just by hitting the first four keys on the home row.8
It's also easy to put the two layouts as menu items in X. In FVWM, it
looks like this:
+ "dvorak" Exec exec setxkbmap dvorak &
+ "qwerty" Exec exec setxkbmap us &
This should immediately apply to everything. The only holdover I've ever seen is gaim, which likes to be restarted before taking the changes into effect. Hm, gtk ... ?