Bug 823303

Summary: Non stop opening of new tabs when clicking in link
Product: [Fedora] Fedora Reporter: Paulo Andrade <paulo.cesar.pereira.de.andrade>
Component: xdg-utilsAssignee: Rex Dieter <rdieter>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 19CC: fedora, gecko-bugs-nobody, jhorak, pertusus, rdieter
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-15 14:31:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Paulo Andrade 2012-05-20 18:23:06 UTC
I just clicked on a link to subscribe to a list, and did need
to quit firefox and then close at least 50 tabs.

I visited http://www.hpl.hp.com/personal/Hans_Boehm/gc/
and clicked in the link
gc-request.hp.com?subject=subscribe

I was expecting some simple error, or it could even open
my gmail tab, but not that behavior.

I start firefox in a terminal, so I have a full xterm page
of these messages:

/usr/bin/xdg-email: line 680: x-www-browser: command not found
/usr/bin/xdg-email: line 680: x-www-browser: command not found
/usr/bin/xdg-email: line 680: x-www-browser: command not found
/usr/bin/xdg-email: line 680: x-www-browser: command not found
/usr/bin/xdg-email: line 680: x-www-browser: command not found
/usr/bin/xdg-email: line 680: x-www-browser: command not found
/usr/bin/xdg-email: line 680: x-www-browser: command not found
/usr/bin/xdg-email: line 680: x-www-browser: command not found
/usr/bin/xdg-email: line 680: x-www-browser: command not found
/usr/bin/xdg-email: line 680: x-www-browser: command not found
/usr/bin/xdg-email: line 680: x-www-browser: command not found
/usr/bin/xdg-email: line 680: x-www-browser: command not found
/usr/bin/xdg-email: line 680: x-www-browser: command not found
/usr/bin/xdg-email: line 680: x-www-browser: command not found
/usr/bin/xdg-email: line 680: x-www-browser: command not found
/usr/bin/xdg-email: line 680: x-www-browser: command not found
/usr/bin/xdg-email: line 680: x-www-browser: command not found
/usr/bin/xdg-email: line 680: x-www-browser: command not found

Comment 1 Jan Horak 2012-05-21 11:44:57 UTC
Thanks for bug report, to find out root of this bug we need to collect following info:
- To what is 'mailto' handler set (you can find out this in Firefox/Preferences/Applications menu)?
- Do the command 'xdg-email test' work (ie. opens mail client compose dialog with To:test pre-set)?

Thanks.

Comment 2 Paulo Andrade 2012-05-23 00:22:47 UTC
(In reply to comment #1)
> Thanks for bug report, to find out root of this bug we need to collect
> following info:
> - To what is 'mailto' handler set (you can find out this in
> Firefox/Preferences/Applications menu)?

  It is set to "Use xdg-email"

> - Do the command 'xdg-email test' work (ie. opens mail client
> compose dialog with To:test pre-set)?

  Nooooooo :-) So, it looks like a fork bomb, and I did need
to write a shell loop to keep killing xdg-email until it actually
got killed before forking... At least firefox appears to limit
the number of tabs... Now going to close 100 or so tabs...

> Thanks.

Comment 3 Jan Horak 2012-05-23 06:32:12 UTC
This seems to be problem of xdg-utils. Changing the component. You may change 'mailto' in Firefox/Preferences/Applications menu to different application to workaround this.

Comment 4 Paulo Andrade 2012-08-20 23:35:39 UTC
I changed the default mailto to "Use Gmail" in firefox
long ago.
Problem was initially reported because it is very easy
for an user to click in a mailto link. I actually did
click to see how it would work :-)

Probably, the pseudo patch to correct it would be
something like:

 open_generic()
 {
     IFS=":"
     for browser in $BROWSER; do
         if [ x"$browser" != x"" ]; then
 
-            browser_with_arg=`printf "$browser" "$1" 2>/dev/null`
+            browser_with_arg=`which "$browser" "$1" 2>/dev/null`
             if [ $? -ne 0 ]; then browser_with_arg=$browser;
             fi

in /usr/bin/xdg-email
But it may already work in common desktop environments,
and be only an issue in cases like my desktop, that is
just windowmaker.

Comment 5 Fedora End Of Life 2013-04-03 17:13:46 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 6 Christian Stadelmann 2014-07-28 15:33:22 UTC
This bug is still present under F20. I can reproduce it using awesome+Firefox. I can not reproduce it using GNOME+Firefox.

After reading the source code I just have one question: Why does xdg-email try to use a browser? Emails could be written using a Email application like Sylpheed, Claws, Geary, Evolution, …
I think xdg-email should try these and respect ~/.local/share/applications/mimeapps.list before launching a random unrelated browser.

Comment 7 Christian Stadelmann 2014-07-28 15:41:48 UTC
And by the way:
$ xdg-mime query default x-scheme-handler/mailto
correctly reports my default email client. so the data is available to xdg-utils.

Comment 8 Fedora End Of Life 2015-01-09 17:09:36 UTC
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.

Comment 9 Christian Stadelmann 2015-01-10 21:52:20 UTC
This bug is no more present in xdg-utils 1.1.0-0.31.rc2.fc21 on F21.

Comment 10 Paulo Andrade 2015-02-15 14:31:18 UTC
Good enough for me if it works in f21 or newer.
As I said the fix in firefox setup was somewhat
easy.