Disable First run Firefox Page after update

tijones
New Contributor II

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
8 REPLIES 8

tijones
New Contributor II

It actually does not work can anyone take a look over This?

tkimpton
Valued Contributor II

create this file

/Applications/Firefox.app/Contents/MacOS/override.ini

with this in its contents

[XRE]
EnableProfileMigrator=false

jarednichols
Honored Contributor

^This.

You may also want to have a look at CCKWizard (https://addons.mozilla.org/en-us/firefox/addon/cck/) for customizing your Firefox experience. You can do all sorts of things like setting the default home page, install certificates into the security store etc etc.

asditsupport
New Contributor III

Since I copy only the .app, my issue is slightly different, an after update web page pops up (Hooray! Your Firefox is up to date) along with my set homepage on the second tab. Any way of not letting the first tab pop up after the update? Some changes to be done in about:config?!

tkimpton
Valued Contributor II

No

Delete the updater app within the Firefox bundle when you push it it. When you know there is a newer Firefox, you have to package it up with an override.ini

I have already spend a very very very long time researching, global addons ( now broken by Mozilla) and configs, setting it in Firefox cck etc over a number of years.

Trust me, that is the only reliable way until Mozilla get their fingers out and give us better support in the Enterprise!

Reno
New Contributor III

Hello Tim,

I'm having issues getting the override.ini file to suppress the first run window. I've tried to create an override.ini file from scratch with just the indicated two lines and by copying the applications.ini file to override.ini and changing EnableProfileMigrator to false afterwards. In either case, I'm still seeing the import wizard window. I'm testing against Firefox 23.0.1.

Here's the code snippet I'm using to create the override.ini file:

#!/bin/bash
applicationIni="/Applications/Firefox.app/Contents/MacOS/application.ini"
overrideIni="/Applications/Firefox.app/Contents/MacOS/override.ini"
/bin/cp $applicationIni $overrideIni
sed -i -e 's/EnableProfileMigrator=1/EnableProfileMigrator=false/g' "$overrideIni"

I've also tried using 0 instead of false in the sed statement to no effect. Any thoughts you or anyone else may have would be greatly appreciated.

Thanks

-Brad

tkimpton
Valued Contributor II

Hi Brad

I'm using Firefox ESR 17.0.8 I couldnt handle the constant tweaking and changes all the time.

One thing to look at is Mike Kaplys site. He makes the CCK wizard and has helped me out lots of times.

Have a look here because from Firefox 21 onwards the override.ini must be in a different certain place for it to work

http://mike.kaply.com/2013/05/13/more-major-changes-coming-in-firefox-21/

Reno
New Contributor III

Hi Tim,

Thanks for the quick response. I'll take a look at Mike's site.

Cheers

-Brad