open URL a in variable browser (July 22, 2007)
I was recently annoyed by how URLs were started in KDE: I used an antiquated firefox command to run an URL in a new tab (
firefox-remote "OpenURL(%u, new-window)") which does the job quite well. But: If you have no running firefox instance this command will simply do nothing. Right - nothing! You’ll have to start firefox manually and click once again on the link (in konversation, kopete or wherever).
But the newer firefox versions (I don’t know when this feature was added) support the
firefox -newtab %u command. This is all you need if you only use firefox. Configure KDE via
kcontrol to use this command as a standard webbrowser.
This was still not enough for me though, as I regularly switch to konqueror or opera, because firefox is sometimes to slow for a quick browse. This is what I came up with:
what it does
Via open_url it is possible to use one of the currently open browsers. If you for example have a running konqueror instance but no firefox it is more likely (in my point of view) to open a new URL in konqueror instead of launching a new firefox instance (which would take a long time).