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

Armin Berres trigger at space-based.de
Wed Nov 26 11:09:48 GMT 2008

On Tue, 25 Nov 08 21:44, David Faure wrote:
> 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.

Yuk, for sure I mean kfmclient.

> 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...

But using "kioclient exec" instead of "kfmclient openUrl" wouldn't
really break knetattach -- the difference would be that instead of
Konqueror Dolphin will be used. Or do I muss something here?

> > 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.

The real Problem here is, that xdg-open calls "kfmclient openUrl" when
it finds a KDE environment, if kfmclient is not around it will use sensible-browser.

    which kfmclient >/dev/null || open_generic "$1"

    kfmclient exec "$1"
    kfmclient_fix_exit_code $?

    if [ $? -eq 0 ]; then

Seems as if this is also not really what we want.

> > 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.

Point taken :-)


More information about the kde-core-devel mailing list