First, my ultimate goal is the same as in this question. I am a Dvorak user, but I want QWERTY, not Dvorak, to be the default keyboard layout in a guest session. If you know a direct answer to that instead of to the question below, that will also be appreciated.
I can change the keyboard layout to QWERTY with
setxkbmap -layout us.
Some googling tells me that if I create a shell script
/etc/guest-session/prefs.sh, it will be run when the guest session starts.
So I created a
prefs.sh file containing just that command:
setxkbmap -layout us
What I expected to happen was to be able to run a guest session and automatically have the keyboard layout set to QWERTY. What actually happened was that when I tried running a guest session, it simply failed and brought me back to the login screen.
I must be misunderstanding something, but I don't know what. Any ideas?
If relevant: I'm using Ubuntu 12.04.