Setting Regions

BOBW
Contributor II

HI All,

Having some issues with our new lab images where the default region is set to Australia - root, this will stop Applications such as word from opening......

When you change the region from this to Australia then word opens fine.

I have tried this https://jamfnation.jamfsoftware.com/discussion.html?id=12955 setting the region but it fails station update_region not found.

Any other ideas? Im not even sure where the region code comes from with the "Australia - root"

thanks

1 ACCEPTED SOLUTION

Simmo
Contributor II
Contributor II

Curious how you managed to get it set to Australia in the first place.
I use the script mentioned in the link in your post. Are you sure you've set it up correctly?

The parts that you need to have in your script for it to work are:

PLBUDDY=/usr/libexec/PlistBuddy
REGION="en_US"

update_region() {
  ${PLBUDDY} -c "Delete :AppleLocale" "${1}" &>/dev/null
  ${PLBUDDY} -c "Add :AppleLocale string ${REGION}" "${1}" &>/dev/null
  ${PLBUDDY} -c "Delete :Country" "${1}" &>/dev/null
  ${PLBUDDY} -c "Add :Country string ${REGION:3:2}" "${1}" &>/dev/null
}

update_region "/Library/Preferences/.GlobalPreferences.plist" "${REGION}"

for HOME in /Users/*
  do
    if [ -d "${HOME}"/Library/Preferences ]
    then
      cd "${HOME}"/Library/Preferences
      GLOBALPREFERENCES_FILES=`find . -name ".GlobalPreferences.*plist"`
      for GLOBALPREFERENCES_FILE in ${GLOBALPREFERENCES_FILES}
      do
        update_region "${GLOBALPREFERENCES_FILE}" "${REGION}"
      done
    fi
done

View solution in original post

2 REPLIES 2

Simmo
Contributor II
Contributor II

Curious how you managed to get it set to Australia in the first place.
I use the script mentioned in the link in your post. Are you sure you've set it up correctly?

The parts that you need to have in your script for it to work are:

PLBUDDY=/usr/libexec/PlistBuddy
REGION="en_US"

update_region() {
  ${PLBUDDY} -c "Delete :AppleLocale" "${1}" &>/dev/null
  ${PLBUDDY} -c "Add :AppleLocale string ${REGION}" "${1}" &>/dev/null
  ${PLBUDDY} -c "Delete :Country" "${1}" &>/dev/null
  ${PLBUDDY} -c "Add :Country string ${REGION:3:2}" "${1}" &>/dev/null
}

update_region "/Library/Preferences/.GlobalPreferences.plist" "${REGION}"

for HOME in /Users/*
  do
    if [ -d "${HOME}"/Library/Preferences ]
    then
      cd "${HOME}"/Library/Preferences
      GLOBALPREFERENCES_FILES=`find . -name ".GlobalPreferences.*plist"`
      for GLOBALPREFERENCES_FILE in ${GLOBALPREFERENCES_FILES}
      do
        update_region "${GLOBALPREFERENCES_FILE}" "${REGION}"
      done
    fi
done

BOBW
Contributor II

cheers, thanks.....

missed the ${PLBUDDY} parts....

I should read a little more of the script and not just start deleting chunks