answered
2014-09-15 12:49:20 +0200
To change the home page for the web browser, ssh into your phone. (you could use the terminal too)
Then type devel-su
and press enter to get root (password will be needed).
Now type vim /usr/share/jolla-settings/pages/browser/browser.qml
and press enter.
Find the line that says 'title: qsTrId("settings_browser-ph-browser")'
Go down one line
Press 'o'
Copy and paste this:
TextField {
id: homePage
width: parent.width
//: Label for home page text field
//% "Home Page"
label: qsTrId("settings_browser-la-home_page")
text: homePageConfig.value
placeholderText: homePageConfig.defaultValue
inputMethodHints: Qt.ImhNoPredictiveText | Qt.ImhNoAutoUppercase | Qt.ImhUrlCharactersOnly
onTextChanged: homePageConfig.value = text || placeholderText
EnterKey.iconSource: "image://theme/icon-m-enter-close"
EnterKey.onClicked: focus = false
}
Now press 'esc'.
Then go to the very bottom of the file
Press 'shift+o'
Copy and paste this:
ConfigurationValue {
id: homePageConfig
property bool edited
key: "/apps/sailfish-browser/settings/home_page"
defaultValue: "http://jolla.com/"
// Set homePage TextField when text field first time edited
onValueChanged: {
if (!edited) {
homePage.text = value
edited = true
}
}
}
Now press 'esc' and type w
then press enter.
Next go to the Settings app on the phone. Tap 'Apps' and then tap 'Browser' and change the homepage. Now close all tabs in the browser and open it again. It should load the homepage you just set. If it does not go back to you terminal and press 'u' until you are at the oldest change. Then press 'esc' and type x
and press enter. That way there are no changes made to the file.
Thanks to siteshwar for his commit on github for the code. https://github.com/sailfishos/sailfish-browser/commit/1c99ee31007f88ceccd7827674a69854517fba0a
I have not tried it yet, because I use ssh, but when you access the storage per usb, you get access to your home directory where the .mozilla folder is. You can edit the "pref.js" file in the 'mozembed' folder and look for the startpage settings. You can compare those with you own firefox settings.
Edit: I have not found any startup settings in my pref.js file. Maybe you have to add them to overwrite the default ones.
Should be:
But I have not tried it.
PyroDevil ( 2014-01-22 00:42:26 +0200 )editBeing able to have the browser start with an empty tab, would also save some power and network traffic.
Since in most cases starting the browser means needlessly loading jolla.com or whichever site you happened to have open when you closed the browser.
cb400f ( 2014-02-02 12:49:04 +0200 )editI'd like to see an about:home page similar to Firefox, a static page loaded locally with a search bar.
Tested the browser.startup.homepage setting, it doesnt work. Theres something else going on, jolla.com still opens even though I have a different page set.
vasavr ( 2014-02-12 09:49:31 +0200 )editIs it hard-coded in the browser?
IZ1IVA ( 2014-02-12 18:39:07 +0200 )editJudging from the fact browser.startup.homepage does nothing, yes.
vasavr ( 2014-02-12 21:01:50 +0200 )edit