Create a file /usr/lib/librewolf/defaults/pref/autoconfig.js with the following content:
pref("general.config.filename", "librewolf.cfg");
pref("general.config.obscure_value", 0);
pref("general.config.sandbox_enabled", false);
Add to the top of /usr/lib/librewolf/librewolf.cfg, this:
null;
const base_page = "file:///home/New_tab/index.html";
//
try {
const ctx = {};
ChromeUtils.defineESModuleGetters(ctx, {
AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs"
});
ctx.AboutNewTab.newTabURL = base_page;
} catch (e) {
ChromeUtils.reportError(e);
}
lockPref("browser.startup.homepage", base_page);
lockPref("browser.startup.page", 3);
lockPref("browser.startup.homepage_override.mstone", "ignore");
lockPref("browser.newtabpage.activity-stream.aboutHome.enabled", false);
/** ------------------------------
* My settings. Changes base page.
* ------------------------------- */
Replace file:///home/New_tab/index.html with the path to your file. Check the files permissions (should be 644):
stat --format='%a %n' /usr/lib/librewolf/defaults/pref/autoconfig.js
stat --format='%a %n' /usr/lib/librewolf/librewolf.cfg
Restart LibreWolf and enjoy!
Source: https://github.com/AnDsergey13/New_tab