I have Default Applications for the Browser set to “Firefox”. The problem is that when I use a link from KDE anywhere it creates a redundant, new Firefox window. I’d much prefer the URL to go to a tab in the existing browser. I think the way to get that is for the command to change from
firefox <url>
to
firefox --new-tab <url>
I’ve tested the new-tab option from the command line and it makes all the difference. But the “Default Applications” in “System Settings” has no apparent way to add arguments, all you get is the checkbox for “Run in terminal” and even that is from using the “Other” option.
So is there some way to maybe edit a config file to get “firefox %u” to slip in the new-tab option?
So then I got the idea to change the Web Browser to something obscure, then search ~/.config for any file having the obscure value. So “dillo” as browser pointed out the magic file is ~/.config/mimeapps.list by searching for “dillo” in ~/.config
grep dillo *
x-scheme-handler/http=dillo.desktop;
x-scheme-handler/https=dillo.desktop;
x-scheme-handler/http=dillo.desktop;
x-scheme-handler/https=dillo.desktop;
At least pointing out the file that matters for this. But since those are “*.desktop” files, I suspect changing that requires having overrides for those for the “Exec=” line
UPDATE: I think I have the workaround, I simply copied
/usr/share/applications/org.mozilla.firefox.desktop to ~/.local/share/applications/
and edited the Exec in the “[Desktop Entry]” section to be:
Exec=firefox --new-tab %u
and tried a URL from a Konsole man page and it seemed to work (the URL using the konsole “Open Link” menu opened to a tab in my existing Firefox instance instead of a new window).
So is this the ‘best’ way?