Is there a way to lock Customization changes in Firefox in about:config?

Discussion in 'other software & services' started by lotuseclat79, Dec 11, 2014.

  1. Azure Phoenix

    Azure Phoenix Registered Member

    Joined:
    Nov 22, 2014
    Posts:
    1,556
  2. lotuseclat79

    lotuseclat79 Registered Member

    Joined:
    Jun 16, 2005
    Posts:
    5,390
    What I mean is that when I disable networking in Ubuntu (a simple click on the drop down main menu icon for Networking),
    and then quit, and then restart Firefox - the locked preference for my Cusomizations require me to then use Customize (from the Classic Theme Restorer plugin), in order to get back my customizations. As you said, when offline, it is as if the lock preferences seem to be removed. However, my experience is that this mostly happens and at times seems to be intermittent in happening, i.e. not 100% all the time. Sometimes, when it does not happen, the Customization is slightly off by one icon of the usual 3 to the right of the search window in the upper right-hand corner, the rightmost one being replaced by a bolded >> which when left-clicked shows the remaining add-on extension GS usually displayed with a perfect rendition of the lockPref items specified.

    -- Tom
     
  3. lotuseclat79

    lotuseclat79 Registered Member

    Joined:
    Jun 16, 2005
    Posts:
    5,390
    Well, finally, this AM I had another breakthrough on the issue cited above about the solution. It occurred to me that the only way the the LockPref settings that I made were not taking effect upon launching Firefox was that they were being ignored by another setting that was taking precedence.

    Then, it was a simple matter of bringing up the about:config webpage in Firefox and typing in the word ignore in the search bar of about:config. The culprit was the the item named services.sync.prefs.sync.addons.ignoreUserEnabledChanges was set to true by default. Toggling it to false fixed the problem so that now when I launch Firefox for the first time per day - it launches with the lockPref changes I prefer as a user.

    -- Tom
     
    Last edited: Feb 22, 2015
  4. Compu KTed

    Compu KTed Registered Member

    Joined:
    Dec 18, 2013
    Posts:
    1,411
    @lotuseclat79
    Under Firefox options did you happen to set up Sync beforehand or were all services.sync preferences left on default?
     
  5. lotuseclat79

    lotuseclat79 Registered Member

    Joined:
    Jun 16, 2005
    Posts:
    5,390
    Since I am not familiar with Sync, except I may have read that it may have to do with keeping various devices in sync, of which the only one I have is my desktop, I suppose that would mean that they must have been in the default state, eh?

    -- Tom
     
  6. lotuseclat79

    lotuseclat79 Registered Member

    Joined:
    Jun 16, 2005
    Posts:
    5,390
    Well, it looks like this AM, the Customizations did not kick in again. Perhaps there is yet another Sync related override for user LockPref choices as the most likely culprit, eh?

    -- Tom
     
  7. lotuseclat79

    lotuseclat79 Registered Member

    Joined:
    Jun 16, 2005
    Posts:
    5,390
    Ok, well, it looks like I forgot to include the services.sync.prefs.sync.addons.ignoreUserEnabledChanges in the mozilla.cfg file containing the lockPref statements. Adding it and relaunching Firefox confirms in about:config that it is now locked to false.

    -- Tom
     
  8. Compu KTed

    Compu KTed Registered Member

    Joined:
    Dec 18, 2013
    Posts:
    1,411
    A user could test if lockPref setting remains after browser restart. Start Firefox or Mozilla fork in private browsing mode. Lock that preference in mozilla .cfg file. Go back in browser options to the settings for private browsing and change to "remember history" OK & restart the browser. Browser should retain your private browsing mode
    setting.
    Also can test when browser updates become available to see if preferences you set remain locked.
     
  9. lotuseclat79

    lotuseclat79 Registered Member

    Joined:
    Jun 16, 2005
    Posts:
    5,390
    Hi Compu KTed,

    Thanks for the suggestion. I do not use private browsing mode, but I do understand your method might work. I usually remove most of my history at the end of a daily session, except for a few items I want to keep. I also save my Firefox profile in ~/.mozilla every day at the end of a daily session and restore it first thing the next day.

    As far as browser updates, I update manually which creates a new /user/lib/firefox-<version number> subdirectory with a script that now would include the new changes for lockPref. The lockPref changes are installed with my post USB bootup initialization scripts prior to enabling networking and thus prior to my initial launch of Firefox for the day.

    There remains a particularly annoying problem, however.

    That problem is that when I initially launch Firefox using the icon on the left-hand sidebar in Ubuntu Linux 12.04.5 LTS, the user locked preferences are ignored still after the lockPref changes on first launch. On second launch, the lockPref changes work overall, however, with Firefox 36.0 a slight modification is made in the appearance of add-ons to the right of the Search window in the upper right-hand-side of the default Firefox window - named Start a Conversation for which I have to right-click and select Remove From Toolbar as it is not in my locked preferences.

    It would seem that perhaps there might be a Firefox startup command line flag/switch that might be able to cure this problem - something like

    $ firefox -disable-sync-preferences

    but that is a command line switch for Chromium, and not for Firefox AFAIK.

    Correction: -disable-sync-preferences appears to be an Arch Linux Chromium parameter and may not be supported in other versions of Chromium on other Linux OS platforms.

    If there were such a switch/flag for Firefox, it would be easy enough to create a new launch script for Firefox in its /usr/lib directory and then modify the symbolic link to execute Firefox in /usr/bin to reference the new launch script to cure the problem - if that were proven to be the cause/cure for this problem.

    Perhaps, I should experiment to see if I can launch Firefox with -disable-sync-preferences. My thinking on this is that perhaps Firefox developers may take a lesson from Chromium developers and on occasion do the same.

    -- Tom
     
    Last edited: Mar 2, 2015
  10. Compu KTed

    Compu KTed Registered Member

    Joined:
    Dec 18, 2013
    Posts:
    1,411
    @lotuseclat79
    AFAIK Firefox sync default preferences are in services-sync.js file.
    You would have to extract ( omni.ja) to get to the services-sync.js file to see it.
    Not sure if all the sync prefs are listed there though. If you wanted to lock those prefs then you
    would need to add any of those sync prefs to your mozilla.cfg file.

    You can also use: // unlockPref in mozilla.cfg file to change a previously locked setting.
    (change lockPref to // unlockPref)
     
  11. lotuseclat79

    lotuseclat79 Registered Member

    Joined:
    Jun 16, 2005
    Posts:
    5,390
    I found the following webpage Locking down Firefox 22. If I understand what it is saying, then I would need to unzip the omni.ja compressed file, extract the services-sync.js file, edit it with my changes and compress and rename it to its original name. Hopefully, firefox will not crash as explained in the article.

    What are your thoughts on this scheme?

    I have a couple of scripts at the end of the day to save my Firefox profile which gets reconstituted the next day. I normally do this offline. Perhaps, as such, the offline status of Firefox affects the first launch of Firefox the next day. Every relaunch during the Firefox profile save is done offline, and the lockPref items are not followed. This morning, I saved a new profile online instead of offline. I am planning to test it after following my normal end of day saves today.

    -- Tom
     
  12. Compu KTed

    Compu KTed Registered Member

    Joined:
    Dec 18, 2013
    Posts:
    1,411
    I run Linux and Windows and in Windows I changed the name to omni.zip and extracted the files to a temp
    directory. There are a lot of files in there. Not sure if this would crash Firefox in Linux. It may or may not.
    Haven't tested it in Linux , but I would make a backup copy of the omni.ja file to be safe. Worst case you may
    have to re-install Firefox if it doesn't work properly.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.