KDE applications need kfmclient to open links, which is not shipped with kdebase/runtime

David Faure faure at kde.org
Tue Nov 25 20:44:25 GMT 2008

On Friday 21 November 2008, Armin Berres wrote:
> On Fri, 21 Nov 08 21:56, Armin Berres wrote:
> > Another problem: xdg-open calls ksmserver and happily fails more or less
> > when it is not around. It doesn't even open Iceweasel or x-www-browser
> > on Debian then. Actually it tries to open websites with w3m...
> Oki doki, if ksmserver is not around it tries to use sensible-browser
> which falls back to w3m on my box. Seems as if this is not a general
> problem. Maybe changing it to search for kioclient first these days
> wouldn't hurt.

You mean kfmclient where you say "ksmserver", right? I can't see what ksmserver has to do
with any of this.

invokeBrowser calling "kioclient exec" instead of "kfmclient openUrl" would have
the risk that if the mimetype is not text/html or derivative, then you won't get a browser,
thereby breaking what invokeBrowser is supposed to do :-)

Hmm. Can't find a good example for a case where this might happen though
(a misconfigured webserver wouldn't make konq load khtml, anyway,
and an image or anything else would be opened just as well in konq and in
a standalone app anyway)... 
But this made me grep for invokeBrowser and I found that knetattach 
was abusing invokeBrowser in order to launch konqueror on a ftp/fish/smb url.
This is wrong, it should use KRun instead...

> xdg-open would have the benefit, that it uses e.g. the default browser
> on Gnome when the user is running Gnome instead of KDE. Opening
> protocols like fish wouldn't work in this case, but I guess
> invokeBrowser() isn't meant to be able to do this?

I would say "no in theory", but in practice it has been abused to do so, so 
changing it will break some apps... Using kioclient exec would make knetattach
launch e.g. dolphin, which is fine, while using xdg-open would make knetattach
launch some browser like firefox and the user gets an error, right?
Of course knetattach has to be fixed (any maintainer for it???), but this
abuse could exist elsewhere.

This was for the pragmatic answer. In theory I agree that xdg-open (if present)
would be a solution. Hmm, wait.

xdg-open ftp://ftp.kde.org
-> mozilla.
xdg-open does not detect that I'm in KDE?

> Another thing: Wouldn't it make sense to use the default broswer on the
> installed system (sensible-browser, x-www-browser or whatever) if no
> default browser is chosen in KDE? Encouraging people to use Konqueror is
> nice for sure, but the user does have to change his default browser in
> one less place then.

No, this goes way too far. Someone trying KDE should at least be able to
enjoy the good integration with konqueror, before deciding if he/she wants
it or not. If KDE launches x-www-browser (*) by default (which is old Mozilla here),
we lose that (and basically this kills konqueror, given that most people do 
not change defaults). A sensible default for KDE _is_ konqueror; people can 
switch to something else if they want.

(*) sensible-browser defaults to x-www-browser unless $BROWSER is set, so
this is old mozilla again here. Nice...

David Faure, faure at kde.org, sponsored by Qt Software @ Nokia to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).

More information about the kde-core-devel mailing list