Hey Guys
Wrote this to fix a problem for us where we have rolled out Firefox, Want to update it, Dont want to annoy students by having that first run screen after reboot. All i do is just roll out the new .App as a dmg and run this after kind of like a FET FUT
Thought i might share as i took some code from here to help and im open to feedback as well, (the grep .DS_Store is only there as someone built it into our og package..... someone might find it usefu
Cheers
Tim
#!/bin/sh
# Define FireFox Version
version=`defaults read /Applications/Firefox.app/Contents/Info.plist CFBundleShortVersionString`
echo "Firefox is Version $version"
# Loop through each user to set homepage prefs
for user in $(ls /Users | grep -v Shared | grep -v ".localized"); do
# Define Firefox Profile directory to reference
firefoxProfilesDir="/Users/$user/Library/Application Support/Firefox/Profiles"
# Since there may be multiple profile dirs, loop through each
for firefoxProfile in $(ls "$firefoxProfilesDir"); do
sed -i -e 's/user_pref("browser.startup.homepage_override.mstone", "$version")/user_pref("browser.startup.homepage_override.mstone", "ignore")/g' "$firefoxProfilesDir"/"$firefoxProfile"/prefs.js
echo "Disabled FireFox Update Homepage for $user."
done
done
# Define Firefox Default Profile directory to reference
defaultProfile="/System/Library/User Template/English.lproj/Library/Application Support/Firefox/Profiles"
# Since there may be multiple profile dirs, loop through each
for dir in `ls -A "$defaultProfile"| grep -v .DS_Store`; do
sed -i -e 's/user_pref("browser.startup.homepage_override.mstone", "$version")/user_pref("browser.startup.homepage_override.mstone", "ignore")/g' "$defaultProfile"/"$dir"/prefs.js
echo "Disabled FireFox Update Homepage for Default Profile"
done