defaultPref does't work when set homepage. [Linux.]

User Help for Mozilla Firefox
Post Reply
handsome_feng
Posts: 2
Joined: March 12th, 2018, 1:44 am

defaultPref does't work when set homepage. [Linux.]

Post by handsome_feng »

Hi,
I'm a member of ubuntu kylin(One of the ubuntu flavors), and I need to set the default homepage of firefox,
I followed the steps in https://developer.mozilla.org/en-US/Fir ... _before_60 , but it didn't work.

Here is my all-ubuntukylin.js which locate in /usr/lib/firefox/browser/defaults/preferences:
// Any comment. You must start the file with a single-line comment!
pref("general.config.filename", "mozilla.cfg");
pref("general.config.obscure_value", 0);

My mozilla.cfg which locate in /usr/lib/firefox:
// Any comment. You must start the file with a comment!
defaultPref("browser.startup.homepage","data:text/plain,browser.startup.homepage=http://ubuntukylin.com");

But if I change the 'defaultPref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=http://ubuntukylin.com"); '
to 'pref("browser.startup.homepage", "http://ubuntukylin.com");' , It works! (In addition, I switch to a new user to check whether the settings work, is this the right way?)

But we should allow user to change the homepage, so we can't use pref. Does anyone know what is the problem?

The firefox version is:
firefox 57.0.1+build2-0ubuntu1

My system:
Ubuntu Kylin 18.04 (base on ubuntu 18.04)

Thanks in advance!
Last edited by LIMPET235 on March 12th, 2018, 2:31 am, edited 1 time in total.
Reason: Added [Linux] to the title.
handsome_feng
Posts: 2
Joined: March 12th, 2018, 1:44 am

Re: defaultPref does't work when set homepage. [Linux.]

Post by handsome_feng »

I finally found that if I mv /usr/lib/firefox/distribution/distribution.in to anothor name, then the defaultPref works.

Thanks anyway! :)
Post Reply