Difference between revisions of "Universal Firefox on a USB Key"

From CDOT Wiki
Jump to: navigation, search
(0.1)
(Version 0.1)
Line 20: Line 20:
 
.\Firefoxes\Profiles
 
.\Firefoxes\Profiles
  
 +
Each OS will have their own binary/script that will read the single common profile folder.
  
For 0.1 we started by installing Firefox 2 on a USB Key. For proof of concept we confirmed that the program is running from the Key by adding an alert to one of the buttons on the browser. The alert triggered during testing, confirming to us that it is in fact running from the key and not from the local machine. We further confirmed this by running Firefox from the key on a Windows XP image that only had the default installation and no Firefox previously installed.
 
  
Profile
+
For 0.1 we decided to start the project on the Windows platform. We installed Firefox 2 on a USB Key and comfirmed program is running from the Key by adding an alert box to one of the buttons on the browser. We further confirmed that Firefox is running from the key by testing it on a Windows XP image that only had the default installation and no Firefox previously installed. At this point the Firefox program would create a default profile on the local machine hard drive.
 +
 
 +
We wanted to alter this behavior so that Firefox would read the common profile on the USB Key. We researched for ways to redirect where Firefox was looking for its profiles. We realized that Firefox looked up Profiles.ini in the Windows Application Data folder for the location of each profile. We later discovered that there is a program switch to tell firefox where to get its profile. We initially hard coded the directory and profile used by the command line switch.
 +
 
 +
<insert code here>
 +
 
 +
Using an absolute path name we managed to have Firefox read the profile from the USB Key.  because the drive letter for the USB Firefox would change on different machines.
 +
 
 +
bash
  
 
== Project Leader(s) ==
 
== Project Leader(s) ==

Revision as of 15:42, 26 February 2008

Universal Firefox on a USB Key

Project Description

Create a portable USB installation of Firefox that will work on all of Windows, Linux, and Mac. Currently there are binaries for doing this with Windows/Linux. You'll need to get binaries for the app on each platform, figure out how to share a common profile, and get it all on a single USB key.

Resources: sxip/dick, http://developer.mozilla.org/en/docs/Chrome_Registration#platform_.28Platform-specific_packages.29, http://developer.mozilla.org/en/docs/Bundles#Platform-specific_Subdirectories, http://ted.mielczarek.org/code/mozilla/crashme.xpi

Version 0.1

We have approached the project from a packaging perspective as such we have been working on a proof of concept script to manage Firefox's directory structure.

We have decided to write a script that allows firefox to read the profile from a directory on the stick instead the default folder on Windows, which is the Application Data\Mozilla folder. We decided to create our Univerisal Firefox with the following file structure:


. (root of the usb key) .\Firefoxes\ .\Firefoxes\XP .\Firefoxes\Linux .\Firefoxes\Mac .\Firefoxes\Profiles

Each OS will have their own binary/script that will read the single common profile folder.


For 0.1 we decided to start the project on the Windows platform. We installed Firefox 2 on a USB Key and comfirmed program is running from the Key by adding an alert box to one of the buttons on the browser. We further confirmed that Firefox is running from the key by testing it on a Windows XP image that only had the default installation and no Firefox previously installed. At this point the Firefox program would create a default profile on the local machine hard drive.

We wanted to alter this behavior so that Firefox would read the common profile on the USB Key. We researched for ways to redirect where Firefox was looking for its profiles. We realized that Firefox looked up Profiles.ini in the Windows Application Data folder for the location of each profile. We later discovered that there is a program switch to tell firefox where to get its profile. We initially hard coded the directory and profile used by the command line switch.

<insert code here>

Using an absolute path name we managed to have Firefox read the profile from the USB Key. because the drive letter for the USB Firefox would change on different machines.

bash

Project Leader(s)

Project Contributor(s)

Project Details

Useful Development Links

http://pastebin.mozilla.org/ - a way to collaborate on debugging code snippets, put code of compile results in the box, post it, then share the link for others on IRC to see.

WTF is that? List
http://wiki.mozilla.org/Breakpad
http://en.wikipedia.org/wiki/XPInstall
http://en.wikipedia.org/wiki/Gecko_(layout_engine)

Related Bugzilla Reports
1. Bug 302087 Inadequate warning before Profile Manager deletes non-Mozilla files
2. Bug 381365 � No default bookmarks for profiles with a non-relative profile location
3. Bug 249150 (lostbookmarks) � Bookmarks file is overwritten (deleted) randomly in Firefox versions without places (edit)
4. Bug 264209 � Installer should provide options if an old profile is found -ehc
5. Bug 230032 � Profile completely overwritten including passwords and bookmarks

Misc Stuff and Things
http://mxr.mozilla.org/seamonkey/source/browser/app/mozilla.in
http://lxr.mozilla.org/mozilla1.8.0/source/toolkit/profile/src/nsToolkitProfileService.cpp#774
http://mxr.mozilla.org/firefox/source/build/
\-- http://mxr.mozilla.org/firefox/source/build/unix/run-mozilla.sh
http://lxr.mozilla.org/mozilla1.8.0/source/profile/resources/content/profileManager.js#50
http://lxr.mozilla.org/mozilla1.8.0/source/profile/resources/jar.mn#12
CREATE PROFILE default directory - see gDefaultProfileParent parmameter link below!
http://lxr.mozilla.org/mozilla1.8.0/source/toolkit/profile/content/createProfileWizard.js
http://lxr.mozilla.org/mozilla1.8.0/source/profile/src/nsProfile.cpp#777


http://mxr.mozilla.org/firefox/source/xpcom/io/nsAppFileLocationProvider.cpp#322 (App Data)
https://bugzilla.mozilla.org/show_bug.cgi?id=211628

Project News

Feb 14, 2008: Firefox is running from the USB key and reading the profile onboard.

Jan 31, 2008: Chris introduced us to Dick Hardt - Founder & CEO of Sxip