Question: How to set default homepage for all firefox users?

Posted by dmonty on Tue 3 Oct 2006 at 09:06

We are distributing Debian and Mozill Firefox on all the machines in our school, but are having problems setting up the browser homepage automatically.

Without changing the .desktop file launch script, how do I change the default homepage for all users in the school? (If we just change the launch script then the "Home" button would still be broken.)

On a fresh user install the browser starts up with a blank white page.

about:config shows:
browser.startup.homepage  resource:/browserconfig.properties

If I type in this url resource:/browserconfig.properties I get a "File Not Found" error.

Some schools may want their browsers setup so that the students are not able to change their default start page, whilst others might want to allow that.

So I have two questions:

  • How do I globally change the default homepage for all users?
  • How can I lock the homepage setting so that it can not be changed?

A possible answer to the first question is to create the file /usr/lib/firefox/browserconfig.properties with the following contents:

browser.startup.homepage=http://mysite.com/
browser.startup.homepage_reset=http://mysite.com/

But that still allows the users to change their homepage.

 

 


Posted by Anonymous (88.64.xx.xx) on Tue 3 Oct 2006 at 10:59
You can try to take write access away on the file. I don't know how Firefox will react on that but it is worth a try.

[ Parent | Reply to this comment ]

Posted by Anonymous (88.64.xx.xx) on Tue 3 Oct 2006 at 11:01
take away of course

[ Parent | Reply to this comment ]

Posted by Anonymous (217.22.xx.xx) on Tue 3 Oct 2006 at 11:55
I saw a similar thing posted in a Sun blog a couple of days ago. You may get some mileage looking there and asking for exact details about how it was done.

http://blogs.sun.com/davetong/entry/day_0_the_calm_before

[ Parent | Reply to this comment ]

Posted by n1mh (195.55.xx.xx) on Tue 3 Oct 2006 at 12:21
hi!
I've reached it in three steps:
  1. edit /etc/mozilla-firefox/pref/firefox.js file
  2. modify browser startup register:
    pref("browser.startup.homepage", "http://myfavoritepage.org");
  3. if you have users who has executed firefox, you must delete pref's file:
    find /home/ -name prefs.js -exec rm -f {} \;
Next time they run firefox, the homepage will be set, I hope :P.
cheers!
n1mh
--
n1mh dot org slash weblog

[ Parent | Reply to this comment ]

Posted by angrykeyboarder (68.226.xx.xx) on Tue 3 Oct 2006 at 14:49
The file to edit is actually /etc/firefox/profile/prefs.js

Scott
www.angrykeyboarder.com
© 2006 angrykeyboarder™ & Elmer Fudd. All Wights Wesewved

[ Parent | Reply to this comment ]

Posted by simonw (212.24.xx.xx) on Tue 3 Oct 2006 at 14:59
[ View Weblogs ]
Urm, it is probably /etc/mozilla-firefox in Sarge, and /etc/firefox in testing, since that is what the respective packages are called.

It may well be /etc/iceweasel in Etch when it is released but that is another battle entirely.

I would have expected new desktop deployments to be working with testing, but at this point there is probably no "immediate win" situation. Sarge is rather dated as a desktop (although use of backports might help).

[ Parent | Reply to this comment ]

Posted by e5z8652 (209.193.xx.xx) on Tue 3 Oct 2006 at 15:25
[ View Weblogs ]
Edit this file (for Etch):

/usr/lib/firefox/firefox.cfg

to set user's homepage to something reasonable add this line:

defaultPref("browser.startup.homepage", "http://www.debian-administration.org/");

Or, to lock them out of changing their homepage, add this line:

lockPref("browser.startup.homepage", "http://www.debian-administration.org/");


I'm sure IceWeasel will have similar.

[ Parent | Reply to this comment ]

Posted by e5z8652 (209.193.xx.xx) on Tue 3 Oct 2006 at 16:17
[ View Weblogs ]
reply to myself-

the /usr/lib/firefox/* files may be overwritten on a package upgrade.

Or at least that's what /etc/firefox/pref/firefox.js says in the comment block.

But when I edited /etc/firefox/pref/firefox.js, none of the changes took effect.

Maybe I had syntax wrong or need to log out/in.

Anyway, to protect your changes perhaps best to use a symlink for /usr/lib/firefox/firefox.cfg (i.e. put the real file in /etc/firefox)

[ Parent | Reply to this comment ]

Posted by dmonty (142.32.xx.xx) on Wed 4 Oct 2006 at 16:23
To find the pref directory I use:
locate defaults/pref

Any files that I think may be overwritten by an upgrade, I just create a cron job to ensure my changes stick.

[ Parent | Reply to this comment ]

Posted by lykwydchykyn (66.236.xx.xx) on Fri 6 Oct 2006 at 17:50
[ View Weblogs ]
Not sure if this helps, but I set up some firefox kiosks for our library, and took something of a brute-force approach to locking down the desktop. I documented it here:

http://www.alandmoore.com/geekpage/index.php?content=38

Might give you some ideas, anyway.

[ Parent | Reply to this comment ]

Posted by Anonymous (203.129.xx.xx) on Tue 12 Dec 2006 at 09:25
How to set default homepage for all firefox users?

[ Parent | Reply to this comment ]

Posted by Anonymous (213.166.xx.xx) on Fri 2 Mar 2007 at 12:26
did you resolve this problem?

if not check this link out, it might be of some help
http://togami.com/~warren/guides/mozlockdown/

[ Parent | Reply to this comment ]

Posted by Anonymous (74.121.xx.xx) on Mon 13 Aug 2007 at 15:26
If you need kool homepages, go to a site called http://www.eziner.info You can choose from 100's of themes to save as a homepage! I personally went with the Fish Tank... You can also find out how to change it there!

[ Parent | Reply to this comment ]

Posted by Anonymous (149.169.xx.xx) on Thu 4 Nov 2010 at 21:18
You can create a user.js file and put it in the default profiles directory of Mozilla. File is read everytime Mozilla opens.

[ Parent | Reply to this comment ]

Posted by hazar (94.189.xx.xx) on Tue 28 Dec 2010 at 02:35
Go to Mozilla Firefox install directory.
Now locate browserconfig.properties file open it (as a text file) and change Mozilas deault url with your url.

[ Parent | Reply to this comment ]

Sign In

Username:

Password:

[Register|Advanced]

 

Flattr

 

Current Poll

What do you use for configuration management?








( 816 votes ~ 10 comments )