Unable to set Pale Moon Portable Home / New Tab URLs via INI file

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!
lameboyadvance

Unable to set Pale Moon Portable Home / New Tab URLs via INI file

Unread post by lameboyadvance » 2021-01-04, 03:20

I am trying to set custom homepage and new/blank tab URLs via Palemoon-Portable.ini.
According to this thread I should be able to set browser.newtab.url via the ini file, but so far placing entries such as browser.newtab.url=$Home$\blanktab.htm or browser.startup.homepage=$Home$\homepage.htm under 'User preferences' or 'Global preferences' in Palemoon-Portable.ini doesn't seem to effect the settings in about:config. I can set those manually once the browser has loaded fine but I am trying to set them at runtime.

Is there something I am missing? Is it actually possible to set them at runtime? Other config entries in the ini file seem to take effect.
Last edited by lameboyadvance on 2021-01-04, 12:15, edited 1 time in total.

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

Re: Unable to set Pale Moon Portable Home / New Tab URLs via INI file

Unread post by Moonchild » 2021-01-04, 10:22

Just set them though preferences like normal. it will be stored in your portable browser profile and be used. Also whatever is set there will override ini defaults by design.
"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

lameboyadvance

Re: Unable to set Pale Moon Portable Home / New Tab URLs via INI file

Unread post by lameboyadvance » 2021-01-04, 12:14

Its a portable install and it occasionally changes folder locations, which is why I'm trying to set things via Palemoon-Portable.ini upon launch.
INI settings such as browser.cache.disk.parent_directory=%MOZ_PROFILE_PATH%|\\" and browser.download.lastDir=$Download$|\\" seem to change fine, but adding the lines I included previously don't . Am I able to set other config variables via the INI file, or am I only able to change only those already included in it?

New Tobin Paradigm

Re: Unable to set Pale Moon Portable Home / New Tab URLs via INI file

Unread post by New Tobin Paradigm » 2021-01-04, 15:36

So you don't understand what portable means. K.

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

Re: Unable to set Pale Moon Portable Home / New Tab URLs via INI file

Unread post by Moonchild » 2021-01-04, 16:00

New Tobin Paradigm wrote:
2021-01-04, 15:36
So you don't understand what portable means. K.
no, I think the situation is as follows:

OP uses a portable install which is moved around as a portable, but wants to use local html files in the portable folder that move along with the browser as home/newtab pages.
Unfortunately there's no easy way to do this with a changing path because the preferences expect valid URLs, not file system paths.
The ini just places the preferences in the respective palemoon.js/user.js files and doesn't do anything else with it itself. They are simply considered invalid by the browser core and rejected.
"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

New Tobin Paradigm

Re: Unable to set Pale Moon Portable Home / New Tab URLs via INI file

Unread post by New Tobin Paradigm » 2021-01-04, 16:08

Create a flat extension and either use a content or resource chrome registration then dump your files and adjust urls in the pages and set your homepage to it.

Sorted.

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

Re: Unable to set Pale Moon Portable Home / New Tab URLs via INI file

Unread post by Moonchild » 2021-01-04, 16:35

By the way, them not showing up in about:config at all to begin with is probably because you didn't quote them (end the ini entry with |\\")
In that case it will just place an unquoted string in the pref() call which is invalid.
"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

lameboyadvance

Re: Unable to set Pale Moon Portable Home / New Tab URLs via INI file

Unread post by lameboyadvance » 2021-01-04, 16:37

Moonchild wrote:
2021-01-04, 16:00
New Tobin Paradigm wrote:
2021-01-04, 15:36
So you don't understand what portable means. K.
no, I think the situation is as follows:

OP uses a portable install which is moved around as a portable, but wants to use local html files in the portable folder that move along with the browser as home/newtab pages.
Unfortunately there's no easy way to do this with a changing path because the preferences expect valid URLs, not file system paths.
The ini just places the preferences in the respective palemoon.js/user.js files and doesn't do anything else with it itself. They are simply considered invalid by the browser core and rejected.
Yes this is what I was trying to accomplish. Place html files into the portable folder and have their locations inserted into the browser config upon each load.

How is it the config settings in the ini file such as browser.shell.checkDefaultBrowser=false and browser.taskbar.lists.enabled=false work then? If they get loaded into the .js files and are successfully inserted into the browser config, why don't the other settings I'm trying to change do the same?

EDIT:
Moonchild wrote:
2021-01-04, 16:35
By the way, them not showing up in about:config at all to begin with is probably because you didn't quote them (end the ini entry with |\\")
In that case it will just place an unquoted string in the pref() call which is invalid.
This is probably what I was missing. I didn't know that was meant to be 'quotes'.


EDIT #2:
I've managed to change the new tab page successfully by placing browser.newtab.url=$Home$\newtabpage.htm|\\" under the user.js WriteToPref section, but doing the same for browser.startup.homepage doesn't seem to be working under the user.js or the palemoon.js sections. Looking at the browser.startup.homepage=http://start.palemoon.org under the browserconfig.properties section it seems that one is loaded upon first install, but isn't used after that. What file should I be writing to in order to set the homepage config?


EDIT #3:
After trying to edit .js files manually as a test, I was actually able to get it to set the homepage through user.js just like the new tab page. I'm not sure what I did wrong the first time but now adding browser.startup.homepage=$Home$\homepage.htm|\\" below my previous newtab entry successfully points Pale Moon to the files located in my <portable>/User directory.


Thanks for the help. Now I can work on getting all the addons I want for Pale Moon...

Locked