answered
2013-12-30 00:21:23 +0200
Nux 8262 ●77 ●91 ●96
You can kind of hack into this if you have Developer mode on:
- Go to:
/usr/share/applications
. - Open files:
sailfish-browser.desktop
(*) and your-favorite-browser.desktop
. - Copy "MimeType" property from "sailfish-browser.desktop" to "your-favorite-browser.desktop".
- Remove (or add hash) before "MimeType" property in "sailfish-browser.desktop".
- Save :-).
- Run this command:
update-desktop-database
(must be run as root!).
Done. The file /usr/share/applications/mimeinfo.cache should be updated after that.
(*) In more recent Jolla version you need to edit open-url.desktop
instead of sailfish-browser.desktop
.
For browsers working on Android you need to enable adb. Then your exec should contain something like: Exec=/opt/alien/system/bin/adb -e shell am start -a android.intent.action.VIEW -n package.name.of.you.favorite.android.browser/.BrowserActivity -d ' %U'
. Note that the space before "%U" is crucial!
Example http handler file for Dolphin (create it in "/usr/share/applications/dolphin-open-handler.desktop"):
[Desktop Entry]
Exec=/opt/alien/system/bin/adb -e shell am start -a android.intent.action.VIEW -n mobi.mgeek.TunnyBrowser/.BrowserActivity -d ' %U'
Name=Dolphin HTTP handler (opener)
Type=Application
MimeType=text/html;x-maemo-urischeme/http;x-maemo-urischeme/https;
X-Nemo-Application-Type=no-invoker
X-Nemo-Single-Instance=no
X-apkd-apkfile=/data/app/mobi.mgeek.tunnybrowser.apk
NoDisplay=true
Oh and, to edit files in /usr/share/applications
you either need to do it as root or use something like chmod a+w /usr/share/applications/*
Warning! A typo in a command that is run in terminal might brick your device. Use with care (when possible use copy&paste to e.g. PuTTy)!
Edit: Firefox example:
[Desktop Entry]
Exec=/opt/alien/system/bin/adb -e shell am start -a android.intent.action.VIEW -n org.mozilla.firefox/.App -d ' %U'
Name=Firefox HTTP handler (opener)
Type=Application
MimeType=text/html;x-maemo-urischeme/http;x-maemo-urischeme/https;
X-Nemo-Application-Type=no-invoker
X-Nemo-Single-Instance=no
X-apkd-apkfile=/data/app/org.mozilla.firefox.apk
NoDisplay=true