Bug 1193887 - abrt does not handle default browser, open links in Firefox
Summary: abrt does not handle default browser, open links in Firefox
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: gtk3
Version: 21
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Matthias Clasen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-18 13:52 UTC by Brian J. Murrell
Modified: 2015-04-20 11:12 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 588645
Environment:
Last Closed: 2015-04-20 11:12:15 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Brian J. Murrell 2015-02-18 13:52:23 UTC
+++ This bug was initially created as a clone of Bug #588645 +++

Description of problem:
My default browser in XFCE DE is Google-chrome. And it is work correctly in most applications, so
$ xdg-open http://google.ru
open link in it.

But when I click by URL in abrt it open link (f.e. to bugreports) in Firefox regardless by my settings.

Version-Release number of selected component (if applicable):
$ rpm -q abrt
abrt-1.0.9-2.fc13.i686

How reproducible:
Always

--- Additional comment from Bug Zapper on 2011-06-02 10:31:21 EDT ---


This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

--- Additional comment from Bug Zapper on 2011-06-27 12:04:47 EDT ---


Fedora 13 changed to end-of-life (EOL) status on 2011-06-25. Fedora 13 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

--- Additional comment from Pavel Alexeev (aka Pahan-Hubbitus) on 2013-05-21 11:29:03 EDT ---

This is again actual.

--- Additional comment from Jiri Moskovcak on 2013-08-20 06:42:34 EDT ---

abrt uses gtk_show_uri() which according to it's manual pages: "is a convenience function for launching the default application to show the uri." So either gtk or xfce uses different definition of default. -> reassigning to gtk.

--- Additional comment from Brian J. Murrell on 2013-11-22 08:13:26 EST ---

I see this also, on F19 using the MATE desktop.  Per the original reporter, every other application seems to have no problem opening my preferred browser when I click on a link.  It's only the ABRT GUI that wants to open firefox.

--- Additional comment from Matthias Clasen on 2013-11-22 09:56:41 EST ---

given that every other application does not have this issue, I don't see why this was assigned to GTK+. Useful diagnostic information would include:

1) the url that abrt is trying to open

2) output of gvfs-info on that url

3) output of gvfs-mime --query text/html   (assuming the url does not get classified as something else in 2)

--- Additional comment from Brian J. Murrell on 2013-11-22 10:18:45 EST ---

$ gvfs-info http://bugzilla.redhat.com/
display name: /
edit name: /
type: regular
size:  4980
attributes:
  standard::type: 1
  standard::display-name: /
  standard::edit-name: /
  standard::icon: text-html, gnome-mime-text-html, text-x-generic
  standard::content-type: text/html
  standard::fast-content-type: text/html
  standard::size: 4980
  standard::symbolic-icon: text-html-symbolic, gnome-mime-text-html-symbolic, text-x-generic-symbolic
  id::filesystem: http:uri=http%3A%2F%2Fbugzilla.redhat.com%2F

$ gvfs-mime --query text/html
Default application for 'text/html': firefox.desktop
Registered applications:
	firefox.desktop
	google-chrome.desktop
	geany.desktop
	gvim.desktop
	gedit.desktop
	userapp-send_email-VVNJPU.desktop
	libreoffice-writer.desktop
	pluma.desktop
Recommended applications:
	firefox.desktop
	google-chrome.desktop
	geany.desktop

I think the difference between this app and most others on the GNOME desktop that open the user's preferred browser is that those other apps are probably using the "GNOME" registered preferred browser which might not be the same as this "GTK" preferred browser.  It does seem from the list above that firefox is being preferred over google-chrome.

So how does one adjust this preference/order within gvfs?

--- Additional comment from Matthias Clasen on 2013-11-22 10:40:55 EST ---

There's no such thing as a "GNOME preferred browser", and neither a GTK+ one.

We're using the mechanisms provided by the shared-mime-info system.

The 'factory default' handler for text/html is defined in /usr/share/applications/defaults.list

User-specific overrides are stored in ~/.local/share/applications/mimeapps.list

--- Additional comment from Brian J. Murrell on 2013-11-22 11:56:53 EST ---

(In reply to Matthias Clasen from comment #8)
> There's no such thing as a "GNOME preferred browser", and neither a GTK+ one.

Hrm.  Perhaps I need to s/GNOME/MATE/.

There is most definitely a "Preferred Applications" tool in MATE (which as you know is just a rebranding/continued development of GNOME2) in which I select which browser I want "MATE" applications to use.  This tool of course also used to at least be in GNOME at one time.  I have not used GNOME in a long time (since the abomination of GNOME3 at least) so I can't attest to what's in it any more in regards to "preferred applications" selection.

> The 'factory default' handler for text/html is defined in
> /usr/share/applications/defaults.list

$ grep text/html /usr/share/applications/defaults.list
text/html=firefox.desktop
 
> User-specific overrides are stored in
> ~/.local/share/applications/mimeapps.list

$ grep text/html ~/.local/share/applications/mimeapps.list
text/html=chromium-browser.desktop;epiphany.desktop;
text/html=open-url.desktop

Where open-url.desktop is my own:

$ cat /home/brian/.config/mate/panel2.d/default/launchers/open-url.desktop
#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Name=Open A URL
GenericName=Open A URL
Comment=Open A URL
Exec=bin/open-url --password-store=gnome %U --ignore-gpu-blacklist
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=chromium-browser
Categories=Network;WebBrowser;
StartupWMClass=Chromium-browser
X-Ayatana-Desktop-Shortcuts=NewWindow;Incognito;TempProfile
MimeType=x-scheme-handler/unknown;x-scheme-handler/about;text/html;text/xml;application/xhtml_xml;x-scheme-handler/http;x-scheme-handler/https;
Icon[en_US]=/usr/share/icons/mate/256x256/apps/web-browser.png

and ~/bin/open-url is essentially "exec google-chrome".

All of that aside, given that firefox doesn't even exist for text/html in my override file, why is firefox being used at all to open a URL?

So given that I want "open-url.desktop" to be what I want abrt to use, where/how should it appear in my ~/.local/share/applications/mimeapps.list?  Is it ok to have it on a separate line for text/html?  Or should I merge those lines and put open-url.desktop first?

--- Additional comment from Matthias Clasen on 2013-11-22 12:40:41 EST ---

There's several sections in mimeapps.list, with different meanings.
Please show the entire file

--- Additional comment from Brian J. Murrell on 2013-11-22 12:48:03 EST ---

(In reply to Matthias Clasen from comment #10)
> There's several sections in mimeapps.list, with different meanings.

Oh, yes.  Sorry.  I did not notice that at first.

> Please show the entire file

[Added Associations
application/x-extension-cat=gvim-usercreated-1.desktop;
application/x-cd-image=nautilus-cd-burner-open-iso.desktop;
application/x-executable=userapp-file-roller-IEN3BU.desktop;
application/x-bittorrent=bittornado.desktop;userapp-swarmplayer-4DJIEU.desktop;VI editor-usercustom-3.desktop;
image/x-ico=gimp.desktop;
text/x-patch=gvim.desktop;
text/plain=gvim.desktop;gedit.desktop;ooo-writer.desktop;abiword.desktop;userapp-send_email-VVNJPU.desktop;
application/x-cpio=file-roller.desktop;userapp-gvim-AASJIU.desktop;
application/x-shellscript=gvim.desktop;
application/x-gzip=file-roller.desktop;
application/octet-stream=userapp-gvim-DA3IKU.desktop;userapp-gvim-I0XGKU.desktop;userapp-gvim-C16UJU.desktop;userapp-gvim-8LANJU.desktop;
text/csv=gvim.desktop;
text/x-makefile=gvim.desktop;
application/x-perl=gvim.desktop;
x-content/video-dvd=totem.desktop;vlc.desktop;userapp-dvdrip-1BZ0MU.desktop;
audio/x-scpls=totem.desktop;menu-simplified-xdg-X-Mandrakelinux-EnjoyMusicandVideo-Watch Videos.desktop;menu-simplified-xdg-X-Mandrakelinux-EnjoyMusicandVideo-DiscoverMoreEntertainmentOptions-Video-Totem Movie Player.desktop;menu-simplified-xdg-X-Mandrakelinux-EnjoyMusicandVideo-DiscoverMoreEntertainmentOptions-Video-Gxine.desktop;Mandrakelinux-Multimedia-Video-Totem Movie Player.desktop;Mandrakelinux-Multimedia-Video-Gxine.desktop;vlc.desktop;xmms-pl.desktop;mplayer.desktop;userapp-gvim-8LANJU.desktop;
application/xml=gvim-usercreated-1.desktop;userapp-hella_enqueue-G79X5U.desktop;pan-usercreated.desktop;firefox.desktop;Mandrakelinux-Internet-WebBrowsers-Mozilla Firefox.desktop;amaya.desktop;firefox-2.desktop;firefox-3.6.desktop;epiphany.desktop;galeon.desktop;gedit.desktop;ooo-writer.desktop;abiword.desktop;userapp-send_email-VVNJPU.desktop;openoffice.org-writer.desktop;
application/x-trash=gvim-usercustom.desktop;
application/rdf+xml=gvim.desktop;
application/vnd.mozilla.xul+xml=gvim.desktop;
application/javascript=gvim.desktop;
audio/x-ms-asx=userapp-mplayer_no_proxy_asx-H0F16U.desktop;totem.desktop;menu-simplified-xdg-X-Mandrakelinux-EnjoyMusicandVideo-Watch Videos.desktop;menu-simplified-xdg-X-Mandrakelinux-EnjoyMusicandVideo-DiscoverMoreEntertainmentOptions-Video-Totem Movie Player.desktop;menu-simplified-xdg-X-Mandrakelinux-EnjoyMusicandVideo-DiscoverMoreEntertainmentOptions-Video-Gxine.desktop;Mandrakelinux-Multimedia-Video-Totem Movie Player.desktop;Mandrakelinux-Multimedia-Video-Gxine.desktop;banshee-1.desktop;mplayer.desktop;gxine.desktop;vlc.desktop;brasero-open-playlist.desktop;gvim.desktop;brasero.desktop;userapp-mplayer-ITHP6U.desktop;
x-content/audio-player=banshee-1-media-player.desktop;
inode/directory=nautilus-folder-handler.desktop;userapp-picard-UYLC4U.desktop;
text/html=chromium-browser.desktop;epiphany.desktop;
application/x-extension-drive=brasero.desktop;
application/x-nzb=userapp-hella_enqueue-G79X5U.desktop;userapp-sabnzbdplus-R359YV.desktop;userapp-submit_nzb-RDNF3V.desktop;userapp-submit_nzb-8CBTXW.desktop;
text/x-uri=gvim.desktop;
text/calendar=gvim.desktop;gedit.desktop;ooo-writer.desktop;abiword.desktop;gvim-usercreated-1.desktop;userapp-send_email-VVNJPU.desktop;openoffice.org-writer.desktop;userapp-evolution-H7B06U.desktop;
application/x-java=gvim.desktop;
text/x-python=gvim.desktop;
application/x-extension-nfo=userapp-gvim-65Z9DV.desktop;
application/x-extension-apk=userapp-file-roller-IEN3BU.desktop;
video/x-matroska=banshee-1.desktop;ghb.desktop;gxine.desktop;menu-simplified-xdg-X-Mandrakelinux-EnjoyMusicandVideo-Watch Videos.desktop;menu-simplified-xdg-X-Mandrakelinux-EnjoyMusicandVideo-DiscoverMoreEntertainmentOptions-Video-Xine.desktop;menu-simplified-xdg-X-Mandrakelinux-EnjoyMusicandVideo-DiscoverMoreEntertainmentOptions-Video-Totem Movie Player.desktop;menu-simplified-xdg-X-Mandrakelinux-EnjoyMusicandVideo-DiscoverMoreEntertainmentOptions-Video-Gxine.desktop;Mandrakelinux-Multimedia-Video-Totem Movie Player.desktop;Mandrakelinux-Multimedia-Video-Gxine.desktop;vlc.desktop;miro.desktop;userapp-mplayer-5NMX6U.desktop;
application/vnd.ms-excel=openoffice.org-calc.desktop;gnumeric.desktop;
application/msword=abiword.desktop;
message/rfc822=userapp-thunderbird-BE3VRV.desktop;
video/mp4=userapp-mplayer-F1171V.desktop;vlc.desktop;
application/x-wine-extension-lnk=gvim-usercustom.desktop;
video/quicktime=userapp-mplayer-F1171V.desktop;
audio/x-vorbis+ogg=totem.desktop;
audio/mpeg=totem.desktop;
audio/x-wav=totem.desktop;
audio/x-mpegurl=totem.desktop;
video/webm=rhythmbox.desktop;
x-scheme-handler/http=exo-web-browser.desktop;firefox.desktop;
x-scheme-handler/https=exo-web-browser.desktop;firefox.desktop;
x-scheme-handler/about=firefox.desktop;
x-scheme-handler/file=exo-file-manager.desktop
x-scheme-handler/trash=exo-file-manager.desktop
application/epub+zip=userapp-file-roller-IEN3BU.desktop;gvim-usercreated-3.desktop;
application/x-mobipocket-ebook=gvim-usercreated-3.desktop;
application/vnd.apple.mpegurl=VI editor-usercustom.desktop;
application/vnd.ms-wpl=gvim-usercreated-3.desktop;

[Removed Associations]
audio/x-ms-asx=userapp-mplayer-5NMX6U.desktop;
video/mp4=userapp-mplayer-5NMX6U.desktop;

[Default Applications]
text/html=open-url.desktop
x-scheme-handler/http=open-url.desktop
x-scheme-handler/https=open-url.desktop
x-scheme-handler/about=open-url.desktop
x-scheme-handler/unknown=open-url.desktop
video/mp4=totem.desktop
application/x-nzb=userapp-submit_nzb-8CBTXW.desktop
application/x-shellscript=gvim.desktop
x-scheme-handler/mailto=userapp-Evolution-NDXD5W.desktop
application/xml=gvim.desktop
application/x-wine-extension-lnk=gvim-usercustom.desktop
video/quicktime=totem.desktop
text/plain=gvim-usercreated-1.desktop
image/png=eom.desktop
image/jpeg=eom.desktop
image/gif=eom.desktop
image/bmp=eom.desktop
image/tiff=eom.desktop
audio/x-vorbis+ogg=rhythmbox.desktop
audio/x-scpls=rhythmbox.desktop
audio/mpeg=rhythmbox.desktop
audio/x-wav=rhythmbox.desktop
audio/x-mpegurl=rhythmbox.desktop
video/webm=totem.desktop
video/mpeg=totem.desktop
video/x-mpeg=totem.desktop
video/msvideo=totem.desktop
video/x-avi=totem.desktop
video/x-ogm+ogg=totem.desktop
video/x-matroska=totem.desktop
video/x-flv=totem.desktop
inode/directory=caja-folder-handler.desktop
audio/x-ms-asx=userapp-mplayer_no_proxy_asx-H0F16U.desktop
application/vnd.apple.mpegurl=VI editor-usercustom.desktop
application/vnd.ms-wpl=gvim-usercreated-3.desktop
application/x-bittorrent=bittornado.desktop
text/calendar=evolution.desktop
application/x-extension-eml=userapp-Evolution-NDXD5W.desktop
message/rfc822=userapp-Evolution-NDXD5W.desktop
video/mp2t=totem.desktop

--- Additional comment from Brian J. Murrell on 2013-12-13 10:40:52 EST ---

Any update to my most recent posting here?

--- Additional comment from Fedora End Of Life on 2013-12-21 09:53:16 EST ---

This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

--- Additional comment from Brian J. Murrell on 2013-12-21 09:57:47 EST ---

Can we have this updated to Version: 19 please since this is happening there also.

It would be nice also if Matthias Clasen would comment on the information I provided at his request.

--- Additional comment from Fedora End Of Life on 2015-01-09 16:43:45 EST ---

This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

--- Additional comment from Brian J. Murrell on 2015-01-10 09:56:00 EST ---

This is still a problem on F21.  Can we please have the Version: updated?  Thanks.

And it would be nice if Matthias Clasen would comment on the information I provided at his request.  It's really quite rude asking somebody to spend time to gather information if you are just going to ignore it.

--- Additional comment from Fedora End Of Life on 2015-02-18 08:26:29 EST ---

Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

--- Additional comment from Brian J. Murrell on 2015-02-18 08:50:56 EST ---

I asked for this bug to have it's version updated to F21 more than a month ago and that seems to have been ignored and the bug closed EOL instead.  I will go reopen a new one thanks.

On cloning this bug I am setting the Severity to high in hopes that it actually gets some attention this time.

Comment 1 Matthias Clasen 2015-04-08 23:18:27 UTC
Sorry it took me a while to get around to this again.

Looking at this:

$ cat /home/brian/.config/mate/panel2.d/default/launchers/open-url.desktop
#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Name=Open A URL
GenericName=Open A URL
Comment=Open A URL
Exec=bin/open-url --password-store=gnome %U --ignore-gpu-blacklist
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=chromium-browser
Categories=Network;WebBrowser;
StartupWMClass=Chromium-browser
X-Ayatana-Desktop-Shortcuts=NewWindow;Incognito;TempProfile
MimeType=x-scheme-handler/unknown;x-scheme-handler/about;text/html;text/xml;application/xhtml_xml;x-scheme-handler/http;x-scheme-handler/https;


I don't think it is a surprise that it is not being picked up.
There's several things wrong here:

1) it is stored in a private .config space of the mate panel, not in one of the applications subdirectories of $XDG_DATA_DIRS

2) the Exec key has a relative path, while the spec says it can be either an absolute path or just an executable name.

If you fix those two things, glib might start returning this as the handler for text/html.

Comment 2 Brian J. Murrell 2015-04-20 11:12:15 UTC
I've figured out the problem with a little help from trusting that abrt really is calling the XDG open and strace to see where it was going wrong and you hit the nail on the head...

(In reply to Matthias Clasen from comment #1)
> 
> There's several things wrong here:
> 
> 1) it is stored in a private .config space of the mate panel, not in one of
> the applications subdirectories of $XDG_DATA_DIRS

It's actually in /home/brian/.local/share/applications/open-url.desktop so that's all good.  I think what you were referring to in the private .config space of mate panel was just a copy of the original as a panel object.

> 2) the Exec key has a relative path, while the spec says it can be either an
> absolute path or just an executable name.

This was the key issue.  I have never run into a problem with this prior to now because I suppose every other application that has wanted to open a URL has done it without chdir()ing itself out of my $HOME first.  the ABRT gui is the first to have this problem.  But indeed, complying with the spec and making the path absolute does resolve this issue.


Note You need to log in before you can comment on or make changes to this bug.