How to set global/system Firefox prefs for new users?

Matt Johnson johnsonmlw at yahoo.com
Mon Jan 12 15:47:04 UTC 2015


>________________________________

> 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



More information about the edubuntu-users mailing list