Hello everyone,
I need assistance in configuring a policy that will apply only one time for each new computer following its enrollment, specifically for machines located at a certain site. The policy's aim is to modify the keyboard layout setting.
As it stands, the factory setting for the laptop keyboards is Arabic, and I need to update this to Arabic—PC layout, owing to the fact that most new employees are familiar with the PC keyboard layout. This policy should only affect new installations and not disrupt existing setups. Additionally, I want to ensure that employees retain the option to switch back to the default MacOS keyboard layout if they choose to do so later.
I've investigated the following plist file for keyboard configuration:
/Library/Preferences/com.apple.HIToolbox.plist
However, updating the keyboard layout through system settings does not seem to result in changes to this file.
To modify the file, I've drafted a short bash script:
#!/bin/bash
USERNAME="$3"
#Actual path
PATH_HIT=~/Library/Preferences/com.apple.HIToolbox.plist
#Contents of plist file ReachAgentConfig.plist
cat > $PATH_HIT << 'ENDSCRIPT'
I am seeking guidance on whether this approach will achieve the desired outcome, and I'm open to any suggestions for improvement or alternative methods.