Bug 981490

Summary: Cannot set system-wide default home page
Product: [Fedora] Fedora Reporter: David Woodhouse <dwmw2>
Component: firefoxAssignee: Jan Horak <jhorak>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: gecko-bugs-nobody, jhorak
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-31 14:49:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Woodhouse 2013-07-04 23:34:45 UTC
To configure firefox automatically for all users, I provide a file  /usr/lib64/firefox/browser/defaults/preferences/all-example.js with the following contents:

pref("network.automatic-ntlm-auth.trusted-uris", "example.com");
pref("browser.startup.homepage", "http://intranet.example.com/");
pref("network.negotiate-auth.trusted-uris", "example.com");


The authentication bit works fine, but browser.start.homepage doesn't. It makes the browser start up *without* loading a home page. And if I hit the 'home' button it still takes me to the Fedora start page. Am I doing it wrong?

Comment 1 Jan Horak 2013-07-31 14:49:03 UTC
Thanks for bug report, see:
https://bugzilla.mozilla.org/show_bug.cgi?id=900008
for fix.

Comment 2 David Woodhouse 2013-08-01 11:06:50 UTC
That works; thanks. Now... in Fedora, where do I *put* it?

I was lazy to start with. *Please* tell me I don't really have to do it this way...

for DIR in /usr/lib64/firefox/browser/defaults/preferences \
           /usr/lib64/firefox/defaults/preferences \
           /usr/lib/firefox/browser/defaults/preferences \
           /usr/lib/firefox/defaults/preferences ; do 
    if [ -d $DIR ]; then
	if cat > $DIR/all-example.js <<EOF
pref("network.automatic-ntlm-auth.trusted-uris", "example.com");
pref("network.negotiate-auth.delegation-uris", "example.com");
pref("network.negotiate-auth.trusted-uris", "example.com");
pref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=http://circuit.example.com/");
EOF ...

Comment 3 Jan Horak 2013-08-01 11:14:49 UTC
In case of x86_64 system:
- /usr/lib64/firefox/browser/defaults/preferences
In case of i386 system:
- /usr/lib/firefox/browser/defaults/preferences

Comment 4 David Woodhouse 2013-08-01 12:25:23 UTC
We already moved that once, didn't we? From F18 to F19 or something? I wasn't *completely* on crack when I came up with the other two paths in comment 2?

Please could we move it *again*, to somewhere non-arch-specific?

It's OK to have an arch-specific directory *too*, of course. But we should be able to put a file in /usr/share or /etc instead of %_libdir.

Please don't make me build an arch-specific package for a text file which is identical!

Comment 5 Jan Horak 2013-08-05 13:03:36 UTC
You're right. Actually mozilla moved firefox/defaults/preferences to firefox/browser/defaults/preferences in some recent Firefox. Avoiding multilib settings actually makes sense to me. We could put system settings to /etc/... and make documentation of this somewhere. Since this isn't related to default homepage we could probably make another bug.

Comment 6 David Woodhouse 2013-08-15 19:46:42 UTC
Should I file another bug for that? Here? In mozilla bugzilla?