macOS forgets login screen keyboard setting, falls back to US English [duplicate]
I'm from Belgium, and on my own user account, the input source is set to a Belgian (actually French) keyboard. The input sources menu is enabled in the menu bar, so I can switch it to the Belgian keyboard before entering my password, but how can I permanently change the input source used for login? I'm the system admin, and I know how to get root access if necessary.
It worked perfectly in Mountain Lion.
Solution 1:
I always got the french layout instead of canadian french at logon screen.
Here's the solution that worked for me:
-
I found that Logon keyboard layout (i.e. french) correspond to:
defaults read /Library/Preferences/com.apple.HIToolbox.plist
-
The desired keyboard layout (i.e. canadian french) is saved here:
defaults read ~/Library/Preferences/com.apple.HIToolbox.plist
(Notice the ~
!)
- To resolve this I changed the logon keyboard to the desired one by overwriting the .plist file (after ensuring that the source plist doesn't contain any occurrence of the unwanted layout):
- View the file with:
plutil -convert json ~/Library/Preferences/com.apple.HIToolbox.plist; \
vi ~/Library/Preferences/com.apple.HIToolbox.plist; \
plutil -convert binary1 ~/Library/Preferences/com.apple.HIToolbox.plist
and ensure that there is no occurrence of the unwanted layout (even in the History).
sudo cp ~/Library/Preferences/com.apple.HIToolbox.plist /Library/Preferences/
sudo chmod 644 /Library/Preferences/com.apple.HIToolbox.plist
Log off and it's OK. :)
Solution 2:
Set it up how you want it in your account and then copy your user com.apple.HIToolbox.plist onto the system one, then reboot.
Run this in Terminal:
sudo cp ~/Library/Preferences/com.apple.HIToolbox.plist /Library/Preferences/
…then restart your computer without going to the login screen (choose restart from the Apple menu without logging out first)
Solution 3:
You can change the input source by showing the Input menu in the login window, then selecting your alternative keyboard layout, then logging in to the root account.
-
Open System Preferences → Users & Groups.
-
Unlock the preference pane and select Login Options.
-
Select Show Input menu in login window.
-
Immediately log in to the root account.
The root account should maintain the same selection as the login window. If not, change the input source to match that of the login window, then log out. Both the login window and root account should have the same input source for it to stay permanent.