Default browser

In short, I currently have an app which I need to log into, presuming it’s possible. No, I actually need it, or I can’t go by public transportation, due to the current situation.
It requires a browser to login, and it default to the buildin browser. This however does nort work for this purpose, for whatever reason, so I need, at least for the moment, to change the default browser to another.

After 5+ years, naturally this is possible, but I can’t figure it out.
Please enlighten me.

1 Like

I only tested this with native browsers and flatpak, not android. So for e. g. firefox you need to try it out.

Look for the .desktop file of your preferred browser in /usr/share/applications and copy it to ~/.local/share/applications/open-url.desktop. Look into this new file for the Exec tag. Make sure that this exec ends with an %U otherwise the browser will not open the url.

To let the original browser the standard browser again, remove open-url.desktop again. You may have two icons for your new default browser now. Ah, if you have some well-known browser installed via flatpak: This desktop file is also in ~/.local/share/applications`

I explicitly write ~/ instead of /home/nemo as your home directory because the user may change with SailfishOS 3.4.

3 Likes

I will have to try it once I get home. for now I’ve found alternative means. Still, I will most likely need this in the future, so thanks.

What is the best place to see upcoming changes like this to Sailfish? Is there something like a Github repository or similar site that shows the development progress of Sailfish?

The user change was mentioned here:

https://together.jolla.com/question/228946/sailfish-os-340-around-the-corner-user-name-change-nemo-defaultuser/

1 Like

Great news! What native browsers have you tested? How do I get a native browser running on SFOS?

Okay, so I finally got around to trying this out, but frankly, it doesn’t work, and the only editor I can find in the terminal is vi, which doesn’t help matters.
At any rate, there is one potential mistake I might have made, as it’s not exacly clear where that %U is suposed to be. I’ve tried putting it at the end of the exec “line”, with and without space in between. Without space it works, but doesn’t open the link, and with space it doesn’t work. I’ve even tried ’ %U’ as per some ancient forum post, and in between ‘line sections’, etc.

Please enlighten me as to how it’s supposed to be done, so I can know if it can work. If not, I probably have little choice but to back to android, because certain essential apps require another browser than the one we’ve got to log in, as it doesn’t work otherwise, because reasons.

I might also consider alternative browsers, but again, I need to know how to make it default.

Best regards.

Take a look at webcat or sailfisbbrowser desktop file

[nemo@Sailfish ~]$ cat /usr/share/applications/harbour-webcat.desktop[Desktop Entry]Type=ApplicationX-Nemo-Application-Type=silica-qt5Name=WebcatIcon=harbour-webcat
Exec=harbour-webcat %U
X-Desktop-File-Install-Version=0.23

[nemo@Sailfish ~]$ cat /usr/share/applications/sailfishbrowser.desktop
[Desktop Entry]Type=ApplicationName=Web BrowserX-MeeGo-Logical-Id=sailfish-browser-ap-nameX-MeeGo-Translation-Catalog=sailfish-browserIcon=icon-launcher-browser
Exec=invoker -s --type=browser -G /usr/bin/sailfish-browser %U
Comment=Sailfish UI application

This %U is to open the browser from CLI with the desired http address as parameter.

So when I’ve got something like:
Exec=apkd-launcher com.android-bla-bla.apk con.android.blabla.somethingorrather.Main
The %U goes where?
I’m sorry if I’m being dim, but are there any non android browser?
edit:
Just tried web pirate. That didn’t work either, for the purposes of login in, but otherwise the default browser thingymagic works fine.

The open source part is publicly available at https://git.sailfishs.org. You can easily follow the activity with this link:

The multi-user change has been visible for months already, with a lot of patches fixing stuff in package recipes, or removing here and there hard coded path in scripts…

1 Like

Hi, I’ve installed Firefox (nicer scrolling) and Vivaldi on 4.4.0.68 and the native browser.
If I click a link in an email, I have to choose always one of the three. I’d like to have the sailfish-brower as the “default” browser. What do I have to do?
Here my output of the terminal, considering the hint of peterleinchen:

[defaultuser@Xperia10III ~]$ cat /usr/share/applications/sailfish-browser.desktop 
[Desktop Entry]
Type=Application
Name=Web Browser
X-MeeGo-Logical-Id=sailfish-browser-ap-name
X-MeeGo-Translation-Catalog=sailfish-browser
Icon=icon-launcher-browser
Exec=/usr/bin/invoker --type=browser,silica-qt5 -A -- /usr/bin/sailfish-browser %U
Comment=Sailfish UI application
MimeType=text/html;application/xhtml+xml;application/xml;text/xml;x-scheme-handler/http;x-scheme-handler/https;
X-Maemo-Service=org.sailfishos.browser.ui
X-Maemo-Object-Path=/ui
X-Maemo-Method=org.sailfishos.browser.ui.openUrl

[X-Sailjail]
Permissions=WebView;Audio;Camera;Location;Internet;UserDirs;RemovableMedia;MediaIndexing
OrganizationName=org.sailfishos
ApplicationName=browser

have you tried mimer-aarch64 | OpenRepos.net — Community Repository System ?

I installed mimer-aarch64, changed the default app for Browser - but I still have to choose between 3 apps.

Does someone has another hint?

Hello,

I had just the same issue in using Firefox app as default browser. For me it was neccecary that another android app opens Firefox with a link. I created following file: ~/.local/share/applications/open-url.desktop

[Desktop Entry]
Exec=apkd-launcher org.mozilla.firefox.apk %U org.mozilla.firefox/org.mozilla.firefox.App
Icon=/home/defaultuser/.local/share/apkd-bridge/launcherIcon/apkd_launcher_org_mozilla_firefox-org_mozilla_firefox_App.png
Name=Firefox
Type=Application
Version=1.0
X-Nemo-Application-Type=no-invoker
X-apkd-apkfile=/home/.android/data/app/org.mozilla.firefox.apk
X-apkd-className=org.mozilla.firefox.App
X-apkd-packageName=org.mozilla.firefox
X-apkd-packageVersion=111.1.1

Hope this helps people who have similar issues.

2 Likes