Re: Firefox 10 system wide preferences

2012-03-30 Thread Jon Peatfield

On Thu, 29 Mar 2012, Jaroslaw Polok wrote:


On 03/29/2012 03:51 PM, Jaroslaw Polok wrote:

Hello


I'm not looking for theoretical replies, but rather someone who is _actually_
doing it and has it working.  There must be someone out there who's got this
worked out on SL/CentOS/TUV.


We do.


And we do, though I've not yet pushed ff10 to most of our machines yet 
since we are still testing things...



with Firefox 10/Thunderbird 10 is is enough to drop files in
preferences directories (without altering original ones): these
are processed in sort order on startup.

/usr/lib64/firefox/defaults/preferences/somefile.js
(/usr/lib64/thunderbird/defaults/pref/somefile.js)

(of course change lib64 to lib on 32bit platform)

Now, unfortunately it does not work for browser startup page,
apparently because of:

https://bugzilla.redhat.com/show_bug.cgi?id=461880

...

For the default startup homepage we make a slightly convoluted set of 
changes which does the 'right thing' for us.  Some of this may be possible 
to avoid but I know that doing all of this with ff10 on sl5 and sl6 works 
for us.


...
moz_inst="/usr/lib/firefox" (or lib64 for 64-bit version)

drop a .cfg file into $mos_inst/ we usually call ours damtp.cfg, this can 
set various defaults (or lock things) but not the browser startup homepage 
etc...


create a file $mos_inst/browserconfig.properties with content like:

--cut-here--
browser.startup.homepage=http://whatever.com
--cut-here--

create a file in $mos_inst/defaults/preferences/all-damtp.js (or your 
favourite name starting with a low letter!) with contents like:


// Dont edit this - it is machine generated by...
// Set the config file to load
pref("general.config.obscure_value", 0); // for MCD .cfg files
pref("general.config.filename", "damtp.cfg"); // or whatever you used
// Section for ffox-10
// This used to be in firefox.js but no more, so set here! 2012-03-12 JSP
pref("browser.startup.homepage", "resource:/browserconfig.properties");
//
// These urls are indicate a browser-change/welcome (for a new profile)
pref("startup.homepage_override_url", "$UPDURL");
pref("startup.homepage_welcome_url", "$UPDURL");
// end of section for ffox-10

All this is much like we had to do for ff3.6.x but the extra bit which 
*seems* to be needed for ff10 is to *ADD* browserconfig.properties into 
the existing omni.ja file ie something like:


 cd $moz_inst
 omni='omni.ja'
 cp -p $omni $omni.SL_Orig
 zip -r $omni browserconfig.properties

In fact we found that we needed to add a few other things into omni.ja, 
since the versions we drop into $mos_inst/ are ignored, so in fact we do 
(this is in simple perl but hopefully easy enough to read):


...
my $omni='omni.ja';
my $brs='browserconfig.properties';

my $files="$brs defaults/profile/mimeTypes.rdf 
defaults/profile/bookmarks.html";
if (-f $omni) {
dprin(4, "$omni present checking for $brs");
my $out=qx(unzip -l $omni $brs 2>/dev/null);
if ($out =~ /$brs/) { # already present, so update
dprin(4, "Freshening $files in $omni");
system("zip -f $omni $files >/dev/null 2>&1");
} else { # no present so back up omni first...
dprin(4, "Back up $omni and add $files");
system("cp -p $omni $omni.SL_Orig");
system("zip -r $omni $files >/dev/null 2>&1");
}
} else {
dprin(0, "No $omni found - is this really firefox 10+ ?");
}
...

Some bits like defaults/profile/bootmarks.html *are* read from the 
$most_inst/ tree when a new profile is created but but if there is an 
empty profile (which is how I do most of my testing) it uses the one from 
omni.ja so I'd prefer to have them set to have the same content or I get 
confused later...


Here is another fun piece which you may or may not care about which hacks 
the .cfg file to avoid a problem with ff10 printing stuff which runs into 
the unprintable parts of the page (headers/footers usually):


...
my $damtpout="damtp.cfg";
...
# and hack stuff on the end to cope with the print-margins...
if ($ffoxtype == 100) {
open (IN, "lpstat -v|");
open (OUT, ">>$damtpout");
print OUT "// Hacks based on what we used to have in firefox 3.6.x\n";
while () {
if (/^device for (\w+):/) {
my $pr=$1;
print OUT 

Re: Firefox 10 system wide preferences

On 03/29/2012 03:51 PM, Jaroslaw Polok wrote:
> Hello
> 
>> I'm not looking for theoretical replies, but rather someone who is _actually_
>> doing it and has it working.  There must be someone out there who's got this
>> worked out on SL/CentOS/TUV.
> 
> We do.
> 
> with Firefox 10/Thunderbird 10 is is enough to drop files in
> preferences directories (without altering original ones): these
> are processed in sort order on startup.
> 
> /usr/lib64/firefox/defaults/preferences/somefile.js
> (/usr/lib64/thunderbird/defaults/pref/somefile.js)
> 
> (of course change lib64 to lib on 32bit platform)
> 
> Now, unfortunately it does not work for browser startup page,
> apparently because of:
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=461880
> 
> (yes I know it is an old bug for FF 3.0 , but looking at
> spec file for FF 10 a workaround for this bug is still applied ,
> which may not be necessary anymore)

Sorry, writing faster than processing info ;-): a different workaround but still
causing same problem is in place instead.

> 
> The workaround used prevents browser home page customization from js 
> preferences:
> to get rid of it you would need to rebuild firefox disabling/changing it in 
> spec
> file or repack all/some  /usr/lib64/firefox/langpacks/langpack-*.xpi files
> changing content of chrome/*/locale/branding/browserconfig.properties
> 

Jarek
__
---
_ Jaroslaw_Polok __ CERN - IT/OIS/ODS _
_ http://home.cern.ch/~jpolok ___ tel_+41_22_767_1834 _
_ +41_76_487_9487 _


Re: Firefox 10 system wide preferences

Hello

> I'm not looking for theoretical replies, but rather someone who is _actually_
> doing it and has it working.  There must be someone out there who's got this
> worked out on SL/CentOS/TUV.

We do.

with Firefox 10/Thunderbird 10 is is enough to drop files in
preferences directories (without altering original ones): these
are processed in sort order on startup.

/usr/lib64/firefox/defaults/preferences/somefile.js
(/usr/lib64/thunderbird/defaults/pref/somefile.js)

(of course change lib64 to lib on 32bit platform)

Now, unfortunately it does not work for browser startup page,
apparently because of:

https://bugzilla.redhat.com/show_bug.cgi?id=461880

(yes I know it is an old bug for FF 3.0 , but looking at
spec file for FF 10 a workaround for this bug is still applied ,
which may not be necessary anymore)

The workaround used prevents browser home page customization from js 
preferences:
to get rid of it you would need to rebuild firefox disabling/changing it in spec
file or repack all/some  /usr/lib64/firefox/langpacks/langpack-*.xpi files
changing content of chrome/*/locale/branding/browserconfig.properties

Cheers

Jarek



__
---
_ Jaroslaw_Polok __ CERN - IT/OIS/ODS _
_ http://home.cern.ch/~jpolok ___ tel_+41_22_767_1834 _
_ +41_76_487_9487 _


Re: Firefox 10 system wide preferences

On Thu, 2012-03-29 at 08:11 -0500, Mark Stodola wrote:
> On 03/28/2012 04:58 PM, Kinzel, David wrote:
> >> -Original Message-
> >> From: owner-scientific-linux-us...@listserv.fnal.gov
> >> [mailto:owner-scientific-linux-us...@listserv.fnal.gov] On
> >> Behalf Of Mark Stodola
> >> Sent: Wednesday, March 28, 2012 3:30 PM
> >> To: SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV
> >> Subject: Firefox 10 system wide preferences
> >>
> >> I've never attempted to set system wide/global preferences for
> >> Firefox,
> >> but am now looking into how to do it.  Google has not been
> >> very kind in
> >> shedding light on the subject as all of the solutions site different
> >> file locations and names.
> >>
> >> I'm just looking to set the default homepage for now.  Is anyone
> >> successfully doing this?  Has it changed from Firefox 3.0,
> >> 3.6, and the
> >> current packaged 10?
> >>
> >> A working example and file path would be much appreciated.
> >
> > Hi Mark:
> >
> > I believe you should be able to update the global prefs.js in something like
> >
> > /usr/lib64/firefox-3.6/defaults/profile/prefs.js
> >
> > Eg something like
> >
> > user_pref("browser.startup.homepage", "http://google.com";)
> >
> > Anything in firefox "about:config" should be able to be set like that 
> > globally.
> 
> I'm actually trying on FF 10 on a 32bit install.
> I've been trying various filenames with those contents (also pref(), 
> lock_pref() and lockPref()) in:
> /usr/lib/firefox/
> /usr/lib/firefox/defaults/
> /usr/lib/firefox/defaults/preferences/ (this is where channel-prefs.js 
> exists)
> I even created /etc/firefox (and a few subdirectories based on a google 
> search.
> I'm stuck with the "file:///usr/share/doc/HTML/index.html", even after 
> clearing out ~/.mozilla.
> 
> I'm not looking for theoretical replies, but rather someone who is 
> _actually_ doing it and has it working.  There must be someone out there 
> who's got this worked out on SL/CentOS/TUV.

I haven't got it working yet but I'm also looking for the answer.
It definitely has changed in Firefox 10 though - I did have it
working in 3.6.

I've tried creating prefs.js in /usr/lib/firefox/defaults/preferences
with the contents:

pref("browser.startup.homepage", "http://www.google.co.uk/";);

If I then try to start up firefox I get a blank page so it has
made some difference; about:config also shows the change has been
made so I'm not sure why I get that blank page. The filename does
not even have to be prefs.js - any file gets read I think.

Have you searched for the current
"file:///usr/share/doc/HTML/index.html"? The only places that this
is referenced are in all the various langpack files
in /usr/lib/firefox/langpacks but these are all zipped directories.
I can't believe that it's necessary to change these - there must
be a different way.


-- 
Mark Whidby
Infrastructure Coordinator (Unix)
Physics/Chemistry/EAES/Mathematics Team
IT Services, Faculty of Engineering and Physical Sciences


Re: Firefox 10 system wide preferences


On 03/29/2012 08:32 AM, Natxo Asenjo wrote:


On Thu, Mar 29, 2012 at 3:11 PM, Mark Stodola mailto:stod...@pelletron.com>> wrote:

On 03/28/2012 04:58 PM, Kinzel, David wrote:Anything in firefox
"about:config" should be able to be set like that globally.

I'm actually trying on FF 10 on a 32bit install.
I've been trying various filenames with those contents (also pref(),
lock_pref() and lockPref()) in:
/usr/lib/firefox/
/usr/lib/firefox/defaults/
/usr/lib/firefox/defaults/__preferences/ (this is where
channel-prefs.js exists)
I even created /etc/firefox (and a few subdirectories based on a
google search.
I'm stuck with the "file:///usr/share/doc/HTML/__index.html", even
after clearing out ~/.mozilla.

I'm not looking for theoretical replies, but rather someone who is
_actually_ doing it and has it working.  There must be someone out
there who's got this worked out on SL/CentOS/TUV.


I have tested this on a 6.2 sl amd64 with firefox from the mozilla ftp
site and it works:

http://kb.mozillazine.org/Locking_preferences

In the past I have locked down firefox on different OS (win/lin/mac)
using the instructions there and works. It is not the most elegant
solution ever, but it is doable.

--
groet,
natxo


AHA!  I'd looked at that page previously, but not close enough.
For anyone else interested, the above link contains the file contents.
For FF 10 packaged by SL, the following is true:
The files need to start with // on the first line, contents of this line 
are ignored.  All real content should start on line 2.


Contents of /usr/lib/firefox/defaults/preferences/local-settings.js:
//
pref("general.config.obscure_value", 0");
pref("general.config.filename", "mozilla.cfg");

Contents of /usr/lib/firefox/mozilla.cfg:
//
lockPref("browser.startup.homepage", "http://url/";);


This is a rather strange way of Mozilla to go about it, but it does work.

Thanks to everyone who replied.

-Mark
--
Mr. Mark V. Stodola
Digital Systems Engineer

National Electrostatics Corp.
P.O. Box 620310
Middleton, WI 53562-0310 USA
Phone: (608) 831-7600
Fax: (608) 831-9591


Re: Firefox 10 system wide preferences

hi,

I also used stuff in here:

http://www.it-sudparis.eu/s2ia/user/procacci/netscape/en/mozilla-autoconfig-en.html

-- 
natxo


Re: Firefox 10 system wide preferences

On Thu, Mar 29, 2012 at 3:11 PM, Mark Stodola  wrote:

> On 03/28/2012 04:58 PM, Kinzel, David wrote:Anything in firefox
> "about:config" should be able to be set like that globally.
>
> I'm actually trying on FF 10 on a 32bit install.
> I've been trying various filenames with those contents (also pref(),
> lock_pref() and lockPref()) in:
> /usr/lib/firefox/
> /usr/lib/firefox/defaults/
> /usr/lib/firefox/defaults/**preferences/ (this is where channel-prefs.js
> exists)
> I even created /etc/firefox (and a few subdirectories based on a google
> search.
> I'm stuck with the "file:///usr/share/doc/HTML/**index.html", even after
> clearing out ~/.mozilla.
>
> I'm not looking for theoretical replies, but rather someone who is
> _actually_ doing it and has it working.  There must be someone out there
> who's got this worked out on SL/CentOS/TUV.
>

I have tested this on a 6.2 sl amd64 with firefox from the mozilla ftp site
and it works:

http://kb.mozillazine.org/Locking_preferences

In the past I have locked down firefox on different OS (win/lin/mac) using
the instructions there and works. It is not the most elegant solution ever,
but it is doable.

-- 
groet,
natxo


Re: Firefox 10 system wide preferences


On 03/28/2012 04:58 PM, Kinzel, David wrote:

-Original Message-
From: owner-scientific-linux-us...@listserv.fnal.gov
[mailto:owner-scientific-linux-us...@listserv.fnal.gov] On
Behalf Of Mark Stodola
Sent: Wednesday, March 28, 2012 3:30 PM
To: SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV
Subject: Firefox 10 system wide preferences

I've never attempted to set system wide/global preferences for
Firefox,
but am now looking into how to do it.  Google has not been
very kind in
shedding light on the subject as all of the solutions site different
file locations and names.

I'm just looking to set the default homepage for now.  Is anyone
successfully doing this?  Has it changed from Firefox 3.0,
3.6, and the
current packaged 10?

A working example and file path would be much appreciated.


Hi Mark:

I believe you should be able to update the global prefs.js in something like

/usr/lib64/firefox-3.6/defaults/profile/prefs.js

Eg something like

user_pref("browser.startup.homepage", "http://google.com";)

Anything in firefox "about:config" should be able to be set like that globally.


I'm actually trying on FF 10 on a 32bit install.
I've been trying various filenames with those contents (also pref(), 
lock_pref() and lockPref()) in:

/usr/lib/firefox/
/usr/lib/firefox/defaults/
/usr/lib/firefox/defaults/preferences/ (this is where channel-prefs.js 
exists)
I even created /etc/firefox (and a few subdirectories based on a google 
search.
I'm stuck with the "file:///usr/share/doc/HTML/index.html", even after 
clearing out ~/.mozilla.


I'm not looking for theoretical replies, but rather someone who is 
_actually_ doing it and has it working.  There must be someone out there 
who's got this worked out on SL/CentOS/TUV.







Cheers,
Mark
--
Mr. Mark V. Stodola
Digital Systems Engineer

National Electrostatics Corp.
P.O. Box 620310
Middleton, WI 53562-0310 USA
Phone: (608) 831-7600
Fax: (608) 831-9591




This email communication and any files transmitted with it may contain
confidential and or proprietary information and is provided for the use of the
intended recipient only. Any review, retransmission or dissemination of this
information by anyone other than the intended recipient is prohibited. If you
receive this email in error, please contact the sender and delete this
communication and any copies immediately. Thank you.

http://www.encana.com



--
Mr. Mark V. Stodola
Digital Systems Engineer

National Electrostatics Corp.
P.O. Box 620310
Middleton, WI 53562-0310 USA
Phone: (608) 831-7600
Fax: (608) 831-9591


Re: Firefox 10 system wide preferences


On 03/28/2012 04:44 PM, g wrote:


On 03/28/2012 09:29 PM, Mark Stodola wrote:
<>


I'm just looking to set the default homepage for now.  Is anyone
successfully doing this?  Has it changed from Firefox 3.0, 3.6, and the
current packaged 10?

-=-

menu bar;

   Edit>  Preferences>  General

   Startup


That is for a single user, not system wide.





A working example and file path would be much appreciated.

-=-

your choice.




--
Mr. Mark V. Stodola
Digital Systems Engineer

National Electrostatics Corp.
P.O. Box 620310
Middleton, WI 53562-0310 USA
Phone: (608) 831-7600
Fax: (608) 831-9591


RE: Firefox 10 system wide preferences

>-Original Message-
>From: owner-scientific-linux-us...@listserv.fnal.gov 
>[mailto:owner-scientific-linux-us...@listserv.fnal.gov] On 
>Behalf Of Mark Stodola
>Sent: Wednesday, March 28, 2012 3:30 PM
>To: SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV
>Subject: Firefox 10 system wide preferences
>
>I've never attempted to set system wide/global preferences for 
>Firefox, 
>but am now looking into how to do it.  Google has not been 
>very kind in 
>shedding light on the subject as all of the solutions site different 
>file locations and names.
>
>I'm just looking to set the default homepage for now.  Is anyone 
>successfully doing this?  Has it changed from Firefox 3.0, 
>3.6, and the 
>current packaged 10?
>
>A working example and file path would be much appreciated.

Hi Mark:

I believe you should be able to update the global prefs.js in something like

/usr/lib64/firefox-3.6/defaults/profile/prefs.js

Eg something like

user_pref("browser.startup.homepage", "http://google.com";)

Anything in firefox "about:config" should be able to be set like that globally.

>
>Cheers,
>Mark
>-- 
>Mr. Mark V. Stodola
>Digital Systems Engineer
>
>National Electrostatics Corp.
>P.O. Box 620310
>Middleton, WI 53562-0310 USA
>Phone: (608) 831-7600
>Fax: (608) 831-9591
>


This email communication and any files transmitted with it may contain
confidential and or proprietary information and is provided for the use of the
intended recipient only. Any review, retransmission or dissemination of this
information by anyone other than the intended recipient is prohibited. If you
receive this email in error, please contact the sender and delete this
communication and any copies immediately. Thank you.

http://www.encana.com


Re: Firefox 10 system wide preferences


On 03/28/2012 09:29 PM, Mark Stodola wrote:
<>

> I'm just looking to set the default homepage for now.  Is anyone 
> successfully doing this?  Has it changed from Firefox 3.0, 3.6, and the 
> current packaged 10?
-=-

menu bar;

  Edit > Preferences > General

  Startup


> A working example and file path would be much appreciated.
-=-

your choice.

-- 

peace out.

tc.hago,

g
.

*please reply "plain text" only. "html text" are deleted*


in a free world without fences, who needs gates.
**
help microsoft stamp out piracy - give linux to a friend today.
**
to mess up a linux box, you need to work at it.
to mess up an ms windows box, you just need to *look* at it.
**
The installation instructions stated to install Windows 2000 or better.
So I installed Linux.
**
learn linux:
'Rute User's Tutorial and Exposition' http://rute.2038bug.com/index.html
'The Linux Documentation Project' http://www.tldp.org/
'LDP HOWTO-index' http://www.tldp.org/HOWTO/HOWTO-INDEX/index.html
'HowtoForge' http://howtoforge.com/




signature.asc
Description: OpenPGP digital signature


Firefox 10 system wide preferences

I've never attempted to set system wide/global preferences for Firefox, 
but am now looking into how to do it.  Google has not been very kind in 
shedding light on the subject as all of the solutions site different 
file locations and names.


I'm just looking to set the default homepage for now.  Is anyone 
successfully doing this?  Has it changed from Firefox 3.0, 3.6, and the 
current packaged 10?


A working example and file path would be much appreciated.

Cheers,
Mark
--
Mr. Mark V. Stodola
Digital Systems Engineer

National Electrostatics Corp.
P.O. Box 620310
Middleton, WI 53562-0310 USA
Phone: (608) 831-7600
Fax: (608) 831-9591