Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 504026 - kde-base/kdelibs-?: GUI to set default browser using x-scheme-handler/http; and https; is what? (was: USE="X" www-client/links pre-empts other browsers in net-irc/hexchat)
Summary: kde-base/kdelibs-?: GUI to set default browser using x-scheme-handler/http; a...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL: https://bugs.kde.org/show_bug.cgi?id=...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-09 23:00 UTC by Kelly Price
Modified: 2015-01-10 11:43 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kelly Price 2014-03-09 23:00:06 UTC
If you compile www-client/links to use X, it pre-empts any settings in KDE or xdg-mime when a link is clicked off of net-irc/hexchat.  Hexchat strangely launches graphical links.

Even these don't do anything:

tygris@sandra ~ $ xdg-mime query default text/html
google-chrome.desktop
tygris@sandra ~ $ xdg-mime query default x-scheme-handler/http
firefox-bin.desktop
tygris@sandra ~ $ xdg-mime query default x-scheme-handler/https
firefox-bin.desktop
tygris@sandra ~ $ BROWSER=firefox-bin
tygris@sandra ~ $ export BROWSER


Reproducible: Always

Steps to Reproduce:
1. Emerge net-irc/hexchat and your regular browser, then USE="X" emerge www-client/links
2. Start hexchat, and connect to freenode.
3. Click on any link (just a single click!)
Actual Results:  
Links' graphical window pops up.

Expected Results:  
Firefox or Chrome (I have Chrome set as default) should launch.

To work around this, USE="-X" emerge www-client/links.  Firefox launches (but not Chrome, which is odd... maybe there's some ordering issues...)
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2014-03-10 07:08:47 UTC
http://forums.gentoo.org/viewtopic.php?p=7514320#7514320
Comment 2 Kelly Price 2014-03-10 10:25:34 UTC
According to the link,

"It's because www-client/links has .desktop files with MimeType= lines for x-scheme-handler/http; and x-scheme-handler/https; and when you run the command `update-desktop-database`, the file mimeinfo.cache will get updated and the last .desktop installed providing the MimeType='s for those associations will get used, unless you override them yourself in ~/.local/share/applications/mimeapps.list"

That's a problem.  While I installed links, it never was intended to be the default handler.  Meanwhile, my .local/share/applications/mimeapps.list is:

[Added Associations]
image/png=xv-2.desktop;
text/html=google-chrome.desktop

[Default Applications]
text/html=google-chrome.desktop

In other words I doubt KDE updates this file -- it's default says Google Chrome.

Resolution fixed; A lack of documentation is a bug.
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2014-03-10 11:06:31 UTC
(In reply to Kelly Price from comment #2)
> According to the link,
> 
> "It's because www-client/links has .desktop files with MimeType= lines for
> x-scheme-handler/http; and x-scheme-handler/https; and when you run the
> command `update-desktop-database`, the file mimeinfo.cache will get updated
> and the last .desktop installed providing the MimeType='s for those
> associations will get used, unless you override them yourself in
> ~/.local/share/applications/mimeapps.list"
> 
> That's a problem.  While I installed links, it never was intended to be the
> default handler.  Meanwhile, my .local/share/applications/mimeapps.list is:
> 
> [Added Associations]
> image/png=xv-2.desktop;
> text/html=google-chrome.desktop
> 
> [Default Applications]
> text/html=google-chrome.desktop
> 
> In other words I doubt KDE updates this file -- it's default says Google
> Chrome.
> 
> Resolution fixed; A lack of documentation is a bug.

Your mimeapps.list is missing x-scheme-handler/http; and https; settings. Those have been the de facto way of setting default browsers for some years now, ever since glib changed to it.
Reassigning to KDE then, something in KDE should be setting them, and I bet something does, but I'm not a KDE user, so I can't tell offhand.
Comment 4 Michael Palimaka (kensington) gentoo-dev 2014-03-11 08:40:44 UTC
AFAIK there is no KDE GUI for this, since it uses the xdg-* stuff mentioned in comment #0.
Comment 5 Michael Palimaka (kensington) gentoo-dev 2014-03-11 09:45:26 UTC
Which KDE version are you using by the way?
Comment 6 Kelly Price 2014-03-11 10:19:42 UTC
4.11.5

It may only be setting text/html and not the scheme handlers (which is what xdg-* is looking for).
Comment 7 Michael Palimaka (kensington) gentoo-dev 2014-03-14 10:24:01 UTC
Can you please report upstream (and post here the bug link) that x-scheme-handler etc. is not being set and see what they say?
Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2014-03-24 08:04:40 UTC
(In reply to Michael Palimaka (kensington) from comment #4)
> AFAIK there is no KDE GUI for this, since it uses the xdg-* stuff mentioned
> in comment #0.

err, no, rather xdg-utils has a kludge that detects if KDE is running by checking $KDE_SESSION_VERSION, $KDE_FULL_SESSION, and perhaps some others, and then it uses kde's defaults

that kludge exists only in xdg-utils

anything else, using xdg-utils (with kde not detected mode, as in, in the generic mode that reads mimes) or dev-libs/glib (that's MANY apps, every second or so :P) will respect x-scheme-handler/http;, https;, mailto;, magnet; and maybe there are others haven't checked for updates in a while

so to me best knowledge, KDE doesn't use xdg-utils and even if it did, it doesn't make a difference here

(In reply to Michael Palimaka (kensington) from comment #7)
> Can you please report upstream (and post here the bug link) that
> x-scheme-handler etc. is not being set and see what they say?

^ exactly, upstream should be notified they lack a GUI for setting default browser, mail client, and torrent client (the magnet; links) for anything using glib, or xdg-utils (in a generic mode, not in kde mode)
Comment 9 Michael Palimaka (kensington) gentoo-dev 2014-03-24 09:42:28 UTC
Right, we already discussed that on IRC, but I forgot to update the bug.
Comment 10 Kelly Price 2014-03-30 15:43:24 UTC
Finally got a chance to report it upstream to KDE.
Comment 11 Samuli Suominen (RETIRED) gentoo-dev 2014-03-31 08:01:02 UTC
(In reply to Kelly Price from comment #10)
> Finally got a chance to report it upstream to KDE.

No offense, but it's poorly explained in the report, I doubt anything will happen based on so vague bug report
Comment 12 Johannes Huber (RETIRED) gentoo-dev 2015-01-10 11:43:16 UTC
From upstream bug:

nnot confirm here with KDE 4.11.10. After setting default browser to something else, then back to chromium-browser, x-scheme-handler/http was properly set.

You may want to check/compare outputs of

xdg-settings get default-web-browser
xdg-settings get default-url-scheme-handler
xdg-mime query default x-scheme-handler/http
xdg-mime query default text/html