Defaults directory doesn't belong in omni.jar

RESOLVED INVALID

Status

()

defect
RESOLVED INVALID
8 years ago
7 years ago

People

(Reporter: ovann86, Unassigned)

Tracking

(Blocks 1 bug)

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: see comment 5 - morphed bug)

Reporter

Description

8 years ago
User-Agent:       Mozilla/5.0 (Windows NT 6.1; rv:2.0) Gecko/20100101 Firefox/4.0
Build Identifier: Mozilla/5.0 (Windows NT 6.1; rv:2.0) Gecko/20100101 Firefox/4.0

In previous versions of Firefox you were able to set the default homepage for all users by saving "pref("browser.startup.homepage", "www.google.com");" into C:\Program Files\Mozilla Firefox\defaults\pref\firefox.js

With Firefox 4 you can still use firefox.js to configure default settings like proxy server, however the default homepage does not save.

More information on the process used can be found here:

http://mockbox.net/configmgr-sccm/174-install-and-configure-firefox-silently.html

Please note - the instructions have EXCLUDED the homepage part of firefox.js as this does not work.

Reproducible: Always

Steps to Reproduce:
** Please note, if your user account has already ran Firefox you may need a new user account or profile to test this process **

1.Download standalone installer for Firefox from http://www.mozilla.com/firefox
2.Install Firefox on a test computer
3.Navigate to C:\Program Files\Mozilla Firefox\defaults\pref\  (If you're using a 64 bit version of Windows:  C:\Program Files (x86)\Mozilla Firefox\defaults\pref\ )
4.Create a new text file called 'firefox.js' and copy in the following information:

pref("browser.shell.checkDefaultBrowser", false);

pref("network.proxy.ftp", "proxy.server.local");
pref("network.proxy.ftp_port", 8080);
pref("network.proxy.gopher", "proxy.server.local");
pref("network.proxy.gopher_port", 8080);
pref("network.proxy.http", "proxy.server.local");
pref("network.proxy.http_port", 8080);
pref("network.proxy.no_proxies_on", "localhost, 127.0.0.1, *.server.local");
pref("network.proxy.type", 1);
pref("network.proxy.share_proxy_settings", true); // use the same proxy settings for all protocols
pref("browser.startup.homepage", "www.google.com.au");

// Whether or not app updates are enabled
pref("app.update.enabled", false);

pref("browser.download.useDownloadDir", true);




Actual Results:  
Open Firefox to confirm that the default settings have worked - all settings EXCLUDING the homepage are working

Expected Results:  
Expected ALL settings to be configured, including the homepage.

** Please note, if your user account has already ran Firefox you may need a new user account or profile to test this process **
I guess this is because the "firefox.js" File is now placed within the "omni.jar" file.

Thus, does it work if you edit the File there and repack it?
Version: unspecified → 4.0 Branch
Reporter

Comment 2

8 years ago
Hi XtC4UaLL.

Thank you for your suggestion.

I have tried using the Java Development Kit to extract the omni.jar file, make the required change to the startup.homepage and repackage the omni.jar file.

However Firefox won't accept the modified file. Each time I open Firefox I get the following error log:


AvailableVirtualMemory: 2048487424
BuildID: 20110413222027
CrashTime: 1305795070
InstallTime: 1305795070
ProductName: Firefox
StartupTime: 1305795070
SystemMemoryUsePercentage: 30
Throttleable: 1
TotalVirtualMemory: 2147352576
URL: 
Vendor: Mozilla
Version: 4.0.1
Winsock_LSP: MSAFD Tcpip [TCP/IP] : 2 : 1 : %SystemRoot%\system32\mswsock.dll 
 MSAFD Tcpip [UDP/IP] : 2 : 2 :  
 MSAFD Tcpip [RAW/IP] : 2 : 3 : %SystemRoot%\system32\mswsock.dll 
 MSAFD Tcpip [TCP/IPv6] : 2 : 1 :  
 MSAFD Tcpip [UDP/IPv6] : 2 : 2 : %SystemRoot%\system32\mswsock.dll 
 MSAFD Tcpip [RAW/IPv6] : 2 : 3 :  
 RSVP TCPv6 Service Provider : 2 : 1 : %SystemRoot%\system32\mswsock.dll 
 RSVP TCP Service Provider : 2 : 1 :  
 RSVP UDPv6 Service Provider : 2 : 2 : %SystemRoot%\system32\mswsock.dll 
 RSVP UDP Service Provider : 2 : 2 :  
 MSAFD NetBIOS [\Device\NetBT_Tcpip_{5EE352D5-87BF-479F-B5F2-20BEBD22EA0D}] SEQPACKET 4 : 2 : 5 : %SystemRoot%\system32\mswsock.dll 
 MSAFD NetBIOS [\Device\NetBT_Tcpip_{5EE352D5-87BF-479F-B5F2-20BEBD22EA0D}] DATAGRAM 4 : 2 : 2 :  
 MSAFD NetBIOS [\Device\NetBT_Tcpip_{496ADD5F-96D0-411F-935F-474FE299953E}] SEQPACKET 1 : 2 : 5 : %SystemRoot%\system32\mswsock.dll 
 MSAFD NetBIOS [\Device\NetBT_Tcpip_{496ADD5F-96D0-411F-935F-474FE299953E}] DATAGRAM 1 : 2 : 2 :  
 MSAFD NetBIOS [\Device\NetBT_Tcpip6_{B11CE64C-A0E9-411C-AE02-A871DC046ED9}] SEQPACKET 6 : 2 : 5 : %SystemRoot%\system32\mswsock.dll 
 MSAFD NetBIOS [\Device\NetBT_Tcpip6_{B11CE64C-A0E9-411C-AE02-A871DC046ED9}] DATAGRAM 6 : 2 : 2 :  
 MSAFD NetBIOS [\Device\NetBT_Tcpip6_{FB4A7B28-1DE7-4E46-85E7-95C38F25F4E3}] SEQPACKET 0 : 2 : 5 : %SystemRoot%\system32\mswsock.dll 
 MSAFD NetBIOS [\Device\NetBT_Tcpip6_{FB4A7B28-1DE7-4E46-85E7-95C38F25F4E3}] DATAGRAM 0 : 2 : 2 :  
 MSAFD NetBIOS [\Device\NetBT_Tcpip6_{5EE352D5-87BF-479F-B5F2-20BEBD22EA0D}] SEQPACKET 5 : 2 : 5 : %SystemRoot%\system32\mswsock.dll 
 MSAFD NetBIOS [\Device\NetBT_Tcpip6_{5EE352D5-87BF-479F-B5F2-20BEBD22EA0D}] DATAGRAM 5 : 2 : 2 :  
 MSAFD NetBIOS [\Device\NetBT_Tcpip6_{F101FC8D-7356-4B38-9705-236378542CA0}] SEQPACKET 3 : 2 : 5 : %SystemRoot%\system32\mswsock.dll 
 MSAFD NetBIOS [\Device\NetBT_Tcpip6_{F101FC8D-7356-4B38-9705-236378542CA0}] DATAGRAM 3 : 2 : 2 :  
 MSAFD NetBIOS [\Device\NetBT_Tcpip6_{496ADD5F-96D0-411F-935F-474FE299953E}] SEQPACKET 2 : 2 : 5 : %SystemRoot%\system32\mswsock.dll 
 MSAFD NetBIOS [\Device\NetBT_Tcpip6_{496ADD5F-96D0-411F-935F-474FE299953E}] DATAGRAM 2 : 2 : 2 : 

This report also contains technical information about the state of the application when it crashed.



I can't help but feel this has been accidently excluded from Firefox 4 and above, as other settings placed into 'C:\Program Files\Mozilla Firefox\defaults\pref\firefox.js' are accepted.

Any further suggestions would be appriciated.
omni.jar has a special format with some zip tables moved for performance reasons, I'd not suggest to repack it. Apart that, you may just make a simple zip and rename it, you lose performance but it's your call.
(In reply to comment #3)
> you may just make a simple zip and rename it

That's what I actually meant by "repack it". Sorry, ovann, for being unclear here.
I'd like to morph this bug if that's ok.

I don't think the defaults directory belongs in omni.jar at all.

It's only used for creating new profiles, and it would be much easier to set profile defaults if it wasn't there.
OS: Windows 7 → All
Hardware: x86 → All
Summary: Unable to set Homepage using firefox.js all.js or user.js → Defaults directory doesn't belong in omni.jar
Whiteboard: see comment 5 - morphed bug
Version: 4.0 Branch → Trunk
Reporter

Comment 6

7 years ago
Feel free to morph, it may give this issue more attention.

A work around has been devised and updated at : http://www.mockbox.net/configmgr-sccm/174-install-and-configure-firefox-silently.html 

So this issue is no longer critical to my business purposes.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Upon further investigation, Firefox still honors the defaults/profile directory if it is present. So you can override any files you want by placing them in that directory.

I'm also not sure your original scenario should have worked correctly.

The homepage doesn't work if it is set as a default preference:

pref("browser.startup.homepage", "www.google.com.au");

Because browser.startup.homepage is a complex preference. So it cannot be set in a default preference file.

See:

http://mike.kaply.com/2012/03/15/customizing-firefox-default-preference-files/

"All you can do with the default preferences file is set the default value of preferences. You cannot lock them and you cannot override user set preferences. (There’s a bug open for locking via a default preferences file.) There are also preferences you can’t set at all via this mechanism, like browser.startup.homepage. This preference is a complex preference[1] and uses a different mechanism. We’ll be talking about other methods can set this preference."

[1] https://developer.mozilla.org/en/Code_snippets:Preferences#Complex_types

So I believe this bug is invalid.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.