Settings in localstore.rdf and places.sqlite ignored?

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
willz

Settings in localstore.rdf and places.sqlite ignored?

Unread post by willz » 2012-05-03, 15:56

I'm having a problem transferring settings between profiles. It seems that Pale Moon doesn't honor some of the settings in files
localstore.rdf and places.sqlite the first time it is run with a new profile. The following procedure replicates the problem:

Launch Pale Moon with an existing profile and reconfigure the navigation toolbar so that the Stop and Reload buttons are separate.
Using Profile Manager, create a new profile; DON'T launch Pale Moon.
Copy file localstore.rdf from the old profile to the new profile.
Launch Pale Moon with the new profile and observe that the Stop and Reload buttons in the navigation toolbar are in their default, combined configuration.
Close Pale Moon and copy file localstore.rdf from the old profile to the new profile AGAIN.
Relaunch Pale Moon with the new profile and observe that the Stop and Reload buttons in the navigation toolbar are separate.
The same thing happens with bookmarks menu tweaks and file places.sqlite (I'm referring to tweaks to the menu itself, not the bookmarks).

Running Pale Moon the first time with a new profile over-writes some of the custom settings in files localstore.rdf and places.sqlite,
requiring that the files be copied a second time. Then everything works as expected.
I stumbled across this while trying to pre-install Pale Moon v11.0 and my custom settings on several systems running Windows XP.

Does anyone know a work-around?

P.S. Another oddity: Deleting prefs.js resets the navigation toolbar to its Firefox - NOT Pale Moon - defaults. Toolbar settings are supposedly stored in file localstore.rdf, so why does deleting prefs.js affect them?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35640
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Settings in localstore.rdf and places.sqlite ignored?

Unread post by Moonchild » 2012-05-03, 17:28

willz wrote:Running Pale Moon the first time with a new profile over-writes some of the custom settings in files localstore.rdf and places.sqlite,
requiring that the files be copied a second time. Then everything works as expected.
I stumbled across this while trying to pre-install Pale Moon v11.0 and my custom settings on several systems running Windows XP.
This is expected behavior. Copying files to an un-initialized profile doesn't guarantee that they will be honored, because if Pale Moon doesn't find at least the base set of files (proper and complete profile) it will go through initializing the profile from defaults, and may also re-initialize the localstore.rdf and parts of places.sqlite.
Does anyone know a work-around?
Create a profile, start the browser, set up the profile and customizations as desired and close down the browser. Copy all files of the resulting profile file to the pre-install profile locations.
P.S. Another oddity: Deleting prefs.js resets the navigation toolbar to its Firefox - NOT Pale Moon - defaults. Toolbar settings are supposedly stored in file localstore.rdf, so why does deleting prefs.js affect them?
EDIT: Let me look into this... you are talking about the prefs.js in the profile folder, right? And is it just the tabs on top (which is branding-pref controlled in v12) or actually the entire layout? (Which shouldn't happen since it is hard-coded to the Pale Moon layout in the browser XUL, so it can't know any other default unless you have imported firefox settings from somewhere)
EDIT2: you're not using Sync, either, by any chance? ;-)
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

willz

Re: Settings in localstore.rdf and places.sqlite ignored?

Unread post by willz » 2012-05-03, 18:53

Thanks very much for your prompt reply.

I tried copying all files from the existing profile to the new profile and everything seems to be working as expected. What I don't understand is why some files (e.g. localstore.rdf and places.sqlite) were being re-initialized, but others (e.g. mimeTypes.rdf) weren't. Whatever.

Regarding prefs.js: I was referring to prefs.js in the profiles folder. I routinely delete prefs.js during testing; it's the only way I know of to restore the browser preferences to their defaults. If there's a preferred way, please share.

The tweak I was referring to was the one cited in my example: the discreet Stop and Reload buttons. I made a number of minor tweaks to the toolbars; only this one was affected by deleting prefs.js. I thought it curious that rather than reverting to the Pale Moon default placement, the recombined buttons reverted to the default Firefox placement. The only way to restore the default Pale Moon placement is to delete localstore.rdf. And I haven't touched Sync.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35640
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Settings in localstore.rdf and places.sqlite ignored?

Unread post by Moonchild » 2012-05-03, 20:27

The way the reload and stop buttons are set up, the only way to actually have them separate is to have an item in-between or to swap stop and reload positions. If they are kept in the order they are in without anything in-between they are set to combine. Since prefs.js also holds internal flags for whether a profile has been migrated or not, among other system variables, deleting it may cause a call to the internal migration routine for old profiles (which can result in changing some minor layout items)

Deleting prefs,js to restore browser default settings is not recommended (neither is deleting other files from the profile manually - it can lead to unpredictable results).
The preferred way is starting the browser with SHIFT depressed, this calls up a handy safe mode/reset dialog box. In it you have the option to reset preferences to pale Moon defaults. It also allows you to reset toolbars and controls to default layout and settings.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

willz

Re: Settings in localstore.rdf and places.sqlite ignored?

Unread post by willz » 2012-05-03, 21:01

Thanks for the explanation, and the tip on the safe mode/reset dialog box.

I have another question: Is there a way to apply user preferences other than via user.js? Settings in user.js are applied every time the browser is launched, over-riding settings which may have been changed via the UI. Is there a way to apply user preferences just once, the first time the browser is launched? That doesn't require editing prefs.js or firefox-branding.js?

Also, does Pale Moon support any command line parameters (other than "-profilemanager")?

Thanks much.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35640
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Settings in localstore.rdf and places.sqlite ignored?

Unread post by Moonchild » 2012-05-03, 22:19

You can put user_pref entries in the prefs.js that is located in {appdir}\defaults\profile - this file is only used when a new profile is initialized.
This will make it "as-if" the user has already made user preference entries.

Command-line parameters: http://kb.mozillazine.org/Command_line_arguments
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite