How to set global/system Firefox prefs for new users?
John Hupp
edubuntu at prpcompany.com
Mon Jan 12 18:38:39 UTC 2015
On 1/12/2015 10:45 AM, Matt Johnson wrote:
>
>> ________________________________
>> From: John Hupp <edubuntu at prpcompany.com>
>> To: edubuntu-users at lists.ubuntu.com
>> Sent: Monday, 12 January 2015, 15:19
>> Subject: How to set global/system Firefox prefs for new users?
>>
>>
>> For Firefox in newly added user profiles, I have a few modest
>> preconfiguration goals: 1) Customize the toolbar to add Print, History,
>> and Tab Groups. 2) Set new tabs to display a blank page.
>>
>> I would think that #1 might be accomplished either by setting
>> pref("browser.uiCustomization.state", "{long string copied from my
>> user profile pref}");
>>
>> or else by copying my initial user's xulstore.json to
>> /usr/lib/firefox/browser/defaults/profile or
>> /usr/lib/firefox/defaults/profile. (Or by doing setting the pref AND
>> copying xulstore.json.)
>>
>> But to zero in on setting the prefs: I failed first with what I took to
>> be the standard Firefox methods.
>>
>> Then I found
>> https://help.ubuntu.com/community/UbuntuLTSP/FirefoxOptimize, and though
>> it was written for *buntu 12.04, I'm assuming that it's probably still
>> valid for 14.04. (I'm running Lubuntu 14.04.1 32-bit.) And it
>> indicates that global/system prefs should be placed in
>> /etc/xul-ext/ubufox.js. But my prefs seem to be either ignored or
>> subsequently overridden/overwritten.
>>
>> (And yes, xul-ext-ubufox is indeed installed.)
>>
>> How do you successfully do these things in 14.04?
>>
>
> John,
>
> I hope this isn't just noise but it of use. Below are my notes but
> they do apply 12.04 I'm afraid. Also, it's not for ltsp-pnp, it's for
> old-style ltsp with a chroot (which is why there are additional notes
> about copyiong the files to the chroot at the end).
>
> --
> Matt
>
> ============================
> Firefox config (including setting homepage and proxy)
>
> Configure proxy
> sudo nano /etc/firefox/syspref.js
> lockPref("network.proxy.http","address.of.proxy");
> lockPref("network.proxy.http_port",80);
> lockPref("network.proxy.ssl","address.of.proxy");
> lockPref("network.proxy.ssl_port",80);
> lockPref("network.proxy.type",1);
> lockPref("network.proxy.share_proxy_settings", true)
>
> Configure homepage
> sudo nano /etc/xul-ext/ubufox.js
> Uncomment homepage line...
> pref("browser.startup.homepage",
> "file:/usr/share/doc/xul-ext-ubufox/example-homepage.properties");
>
> sudo nano /usr/share/doc/xul-ext-ubufox/example-homepage.properties
> Change to:
> browser.startup.homepage=http://www.ourhomepage.com
>
> Copy all three files to chroot and rebuild image
> sudo cp /etc/firefox/syspref.js /opt/ltsp/i386/etc/firefox/syspref.js
> sudo cp /etc/xul-ext/ubufox.js /opt/ltsp/i386/etc/xul-ext/ubufox.js
> sudo cp /usr/share/doc/xul-ext-ubufox/example-homepage.properties
> /opt/ltsp/i386/usr/share/doc/xul-ext-ubufox/example-homepage.properties
>
> Reimage and restart services
> sudo ltsp-update-image; sudo ltsp-update-sshkeys; sudo service
> nbd-server restart; sudo service tftpd-hpa restart; sudo service
> isc-dhcp-server restart
It's interesting that your recipe uses a standard Firefox configuration
location for the network proxy stuff and only uses the ubufox provision
for homepage. This bolsters a thought that it is only selected prefs
that ubufox aims to govern (whatever exactly those are) which must be
configured via ubufox.js.
Looking at the installed files for the xul-ext-ubufox package, I find 3
.js files at /usr/share/xul-ext/ubufox/defaults/preferences:
ubufox.js
ubuntu-mods.js
000system.js (but that is just a symlink to /etc/xul-ext/ubufox.js)
And I don't see any prefs in any of those files that would seem to bear
adversely on what I want to do.
Following your recipe I tried putting my prefs in
/etc/firefox/syspref.js, but they too were either ignored or overridden.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/edubuntu-users/attachments/20150112/ccfb0105/attachment.html>
More information about the edubuntu-users
mailing list