In Gnome I often enter sudo password when Russian language is being selected. It's so annoying to wait for password verification fail, to switch to English and retype the password!
Is there a way to force English in password input dialog? Especially on logon screen.
Using gsettings
It works well with Gnome/Unity Indicator/Layout switch on Ubuntu 13.10 or later.
Run
gsettings list-recursively org.gnome.desktop.input-sources
to check your active layouts and input systems.Problems:
In lock dialog case, it is unable to restore last used keyboard. So after unlock always
en
For sudo (Alias)
Append this line
For lock dialog (Proxy)
Put this in:
Fix a link:
Old answer using setxkbmap
Use it, only if your layouts is set with
setxkbmap
command.Complete steps are mentioned above. I kept only different steps. I am using us,ara (English, Arabic), run
setxkbmap -query
to check yours.Problems:
setxkbmap change layout at X level, which does override effective Unity/Gnome layout. Indicator keep showing last layout. Also it breaks some layout switching keyboard shortcuts. To avoid that add your shortcuts options to
setxkbmap
command. Example:setxkbmap us,ara -option grp:rshift_toggle -option grp:rctrl_switch
.In lock dialog case, it is unable to restore last used keyboard.
For sudo
Append this line
For lock dialog
Put this in: