[Psi-devel] Custom browser
Cliff Dugal
psi at pico.ca
Sat Dec 30 23:25:44 PST 2006
On Tuesday, December 26, 2006 04:16, Ephraim Talrock wrote:
> Am Montag, den 25.12.2006, 21:40 -0500 schrieb Cliff Dugal:
> > Interesting. I had the option set to the default one ("open http and
> > https URLs: in an application based on the contents of the URL"). With
> > this option, KDE applications launched Konqueror, while Psi launched
> > Firefox. It seems like KDE uses a different browser choosing mechanism
> > than Psi. If I set KDE to explicitly use the command "kfmclient
> > openProfile webbrowsing" for my browser, then Konqueror is used for
> > everything.
>
> Psi uses Qt's QDesktopServices for opening a Url. Not sure how Qt does
> it.
I looked into it just for interest's sake, and here's my observations:
Qt4 web browser launch code:
===
static bool launchWebBrowser(const QUrl &url)
{
if (!url.isValid())
return false;
if (url.scheme() == "mailto")
return openDocument(url);
if (launch(url, "xdg-open"))
return true;
if (launch(url, getenv("DEFAULT_BROWSER")))
return true;
if (launch(url, getenv("BROWSER")))
return true;
if (X11->desktopEnvironment == DE_GNOME && launch(url, "gnome-open")) {
return true;
} else {
if (X11->desktopEnvironment == DE_KDE && launch(url, "kfmclient
openURL"))
return true;
}
if (launch(url, "firefox"))
return true;
if (launch(url, "mozilla"))
return true;
if (launch(url, "netscape"))
return true;
if (launch(url, "opera"))
return true;
return false;
}
===
On Mandriva 2007.0, xdg-open doesn't exist, but BROWSER is set
to /usr/bin/www-browser. www-browser is a shell script that will load the
browser that was set by the active desktop environment. If a browser isn't
set by the DE, then Firefox is the first browser to be launched by default.
So, I'm guessing that my problem is that KDE launches Konqueror if a browser
isn't explicitly set for it, while www-browser launches Firefox. I suppose it
could be considered that there's a bug with the script since the launching
behaviour is inconsistent.
Doesn't explain your problem though, Hal. ;)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.affinix.com/pipermail/psi-devel-affinix.com/attachments/20061231/5cbe279b/attachment.pgp
More information about the psi-devel
mailing list