Tag Archives: Firefox

Fix for Firefox’s Profile Manager Error

There is a bug in Firefox (as near as I can tell) and it has been present for many versions (more than a dozen at least). It only effects users in a particular configuration on Macs, so it is not very likely to get any love any time soon. (I filed a bug report here ages ago.)

In short, Firefox is able to create it’s Profiles folder under /path/to/home/[username]/Library/Application Support/Firefox/ and it is able to create the associated profiles.ini file next to it.  However, Firefox is not able to add the information pointing the profiles.ini folder at the newly created profile folder.

If you try to launch Firefox you will only get the Profile Manager and it will not be able to see any profiles, nor will it be able to create one.  Instead it throws an error:

Profile Manager Error
Profile Manager Error

Anyway, perhaps one day Mozilla will fix it.  In the meantime I need to be able to fix this for users.  I know I can add a known-good profile and profiles.ini pair, so I figured I could just build my own profiles.ini file based on what I saw in the Profiles folder.  That worked so I just needed to create a way to use that information.

We use the Casper Suite to manage the Macs in our environment, so I was bent on doing something through Casper.  Additionally I wanted to user Casper’s Self Service application so I could just point a user to a single button to fix the problem.

Here is the script I added for users to evoke through Self Service.

#! /usr/bin/env bash 
# Fix Firefox profile manager error on machines with re-directed home directories. 
# by JamesIsIn 
# Do something nice today. 
# https://github.com/jamesisin/slop-bucket/blob/master/popit/ConfRm_Replace_Firefox_profiles_ini.sh

#Get current logged-in username. 
username=$( stat -f %Su /dev/console ) 

# Get first profile name in user's Library folder. 
profile="$( basename /home/"${username}"/Library/Application\ Support/Firefox/Profiles/* | head -1 )" 

# Empty and populate user's Firefox profiles file. 
printf "[General]\nStartWithLastProfile=1\n\n[Profile0]\nName=Default User\nIsRelative=1\n" 1>/home/"${username}"/Library/Application\ Support/Firefox/profiles.ini 
printf "Path=Profiles/""${profile}" 1>>/home/"${username}"/Library/Application\ Support/Firefox/profiles.ini 

exit 0 

First I get the username of whomever happens to be logged in at the time Self Service is run on that machine and save that in a variable (called username).

Then I get the name of the first profile located in the user’s Firefox folder (under the user’s Library folder).  It doesn’t matter which one I use, I just arbitrarily chose the first one.  This way if there is only one I’ll be ok too.  I store that in a separate variable (called profile).

Finally I use those two variables to construct the appropriate profiles.ini file (using printf and standard output redirection).

Hope that helps you.


AVG Outfoxed Firefox

I had been using AVG for some time, but I have been moving over to Avast! for several reasons.  AVG isn’t horrible.  It’s just that I think Avast! is currently doing a better job.  All of this aside I want to report a problem that came up recently in case this is useful to anyone still using AVG.

I was helping a user with a Vista machine which was running AVG for viral protection.  The user was not able to download or save files.  That’s not exactly true.  If I saved a Web page, the main file would not save though the folder with the associated images, js files, and so forth would be saved.  But the usual method of downloading an installer and saving that file to the desktop was a complete no-go.

Both Opera and Internet Explorer were able to save files as expected.  And yet Firefox failed silently.

In short, Firefox behaved as though it was downloading the file correctly.  But then the file wasn’t getting to the save location.

I disabled all plugins; I removed all toolbars; and I followed some interesting Mozilla hacks (here and here).  All to no avail.

Since Firefox acted as though it was performing the download and save correctly I thought it must be either the firewall or the virus protection.  Kill each and see which succeeds.

Needless to say, I found myself wanting to remove AVG.  So I gutted AVG using Revo Uninstaller and all was well.

I loaded Avast! onto his machine and now he’s as happy as a monk in October.