[wpkg-users] firefox upgrading users profiles

Tomasz Chmielewski mangoo at wpkg.org
Fri Jun 8 19:50:40 CEST 2007


Vincent MALIEN schrieb:
>   thanks for this,
> 
> If I understood well,
> %PROGRAMFILES%\Mozilla Firefox\defaults\pref\firefox.js define the table variable 'perf' for global settings,
> %APPDATA%\Mozilla\Firefox\Profiles\*\prefs.js define the table variable 'user_perf' for user settings.
> I tried to put in firefox.js:
> pref("network.proxy.http", "192.168.x.x");
> pref("network.proxy.http_port", 3128);
> pref("network.proxy.no_proxies_on", "localhost, 127.0.0.1, 192.168.x.0/24");
> pref("network.proxy.type", 1);
> 
> lines which were originaly in prefs.js, but firefox didn't take it in account. 
> I think proxy is defined as user setting because it have to be changed by used when the PC is on severals netwoks (e.g. laptop)...
> 
> But it's more a mozilla question than a wpkg one...

Indeed, it's a bit more complex.

I can tell you how to do it if you promise to commit it to the wiki :)

So, first, create a file with your custom preferences, like:


lockPref("network.proxy.backup.ftp", "proxy.server");
lockPref("network.proxy.backup.ftp_port", 3128);
lockPref("network.proxy.backup.gopher", "proxy.server");
lockPref("network.proxy.backup.gopher_port", 3128);
lockPref("network.proxy.backup.socks", "proxy.server");
lockPref("network.proxy.backup.socks_port", 3128);
lockPref("network.proxy.backup.ssl", "proxy.server");
lockPref("network.proxy.backup.ssl_port", 3128);
lockPref("network.proxy.ftp", "proxy.server");
lockPref("network.proxy.ftp_port", 3128);
lockPref("network.proxy.gopher", "proxy.server");
lockPref("network.proxy.gopher_port", 3128);
lockPref("network.proxy.http", "proxy.server");
lockPref("network.proxy.http_port", 3128);

lockPref("network.proxy.no_proxies_on", "192.168.*,localhost,127.0.0.1, 
glpi, glpi.internal.domain");

lockPref("network.proxy.share_proxy_settings", true);
lockPref("network.proxy.socks", "proxy.server");
lockPref("network.proxy.socks_port", 3128);
lockPref("network.proxy.ssl", "proxy.server");
lockPref("network.proxy.ssl_port", 3128);
lockPref("network.proxy.type", 1);


lockPref("network.automatic-ntlm-auth.trusted-uris", "glpi, 
glpi.internal.domain");


Then, you need to convert this file - you can do it on:

http://www.alain.knaff.lu/%7Eaknaff/howto/MozillaCustomization/cgi/byteshf.cgi

At the end of all.js file, add (just take this file from Mozilla Firefox 
dir):

pref("general.config.filename", "mozilla.cfg");


So, a batch for your preferences will look like that:

copy /y %SOFTWARE%\firefox\all.js "C:\Programme\Mozilla Firefox\greprefs\"
copy /y %SOFTWARE%\firefox\mozilla.cfg "C:\Programme\Mozilla Firefox\"
echo


Full details on locking preferences here:

http://kb.mozillazine.org/Locking_preferences


-- 
Tomasz Chmielewski
http://wpkg.org


wpkg-users mailing list
wpkg-users at lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users



More information about the wpkg-users mailing list