Bug 138789 - [PATCH] URLs opened from outside Firefox open in new windows, regardless of UI setting
[PATCH] URLs opened from outside Firefox open in new windows, regardless of U...
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: firefox (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Christopher Aillon
:
: 141564 142775 144981 (view as bug list)
Depends On:
Blocks: FC4Blocker FC3Update
  Show dependency treegraph
 
Reported: 2004-11-11 01:07 EST by Craig Box
Modified: 2007-11-30 17:10 EST (History)
10 users (show)

See Also:
Fixed In Version: 1.0.2-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-03-25 13:00:52 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to firefox.js to set default pref for opening windows (483 bytes, patch)
2004-12-20 05:55 EST, David Fraser
no flags Details | Diff
patch to firefox.sh.in to not pass "new-window" to firefox (520 bytes, patch)
2004-12-20 05:57 EST, David Fraser
no flags Details | Diff

  None (edit)
Description Craig Box 2004-11-11 01:07:00 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Gecko/20041109 Firefox/1.0

Description of problem:
Firefox 1.0 has an option "Open links from other application in".  I
wish to have this set to "A tab in the most recently used window".

The /usr/bin/firefox script that ships with Firefox on Fedora calls
firefox with the new-window parameter, so that each time a new window
is created.

Removing the new-window parameter (on line 224) causes the correct
behaivour.

Version-Release number of selected component (if applicable):
firefox-1.0-0

How reproducible:
Always

Steps to Reproduce:
1. Set Firefox as your default browser in Preferred Applications
2. Set "Open linsk from other applications in a tab in the most
recently used window" in the Firefox prefs
3. Click a link (from gnome-terminal for example)
4. Click a second link
    

Actual Results:  Two Firefox windows are opened.

Expected Results:  One window is opened with two tabs.

Additional info:
Comment 1 Warren Togami 2004-11-11 01:38:31 EST
This wont be easy due to the inflexibility of the gconf-based system
used to launch the preferred applications.
Comment 2 Carlos Rodrigues 2004-11-29 17:17:05 EST
I noticed this too.

Why must it be "openurl($URL,new-window)" and not "openurl($URL)"? I'm
not seeing the problem with doing this...
Comment 3 Warren Togami 2004-11-29 19:45:39 EST
That is unacceptable to me.  I happen to LIKE new windows opening on
links from other programs, because it is impossible to open multiple
links because it replaces the current content of your browser window.

The only way to fix this is to extend the reach of the preference.
Anything less is unacceptable.
Comment 4 Carlos Rodrigues 2004-11-29 20:03:41 EST
Well, when Firefox has "open links in a new tab in the most recent
window", the contents aren't replaced, as the preference says.
Besides, "openurl($URL)" does not impose any particular setting, it
honors the preference defined in firefox (new window/new tab/most
recent window).
With "openurl($URL,new-window)", the preference is ignored, which _is_
a bug.
Comment 5 Warren Togami 2004-12-02 01:02:25 EST
*** Bug 141564 has been marked as a duplicate of this bug. ***
Comment 6 Warren Togami 2004-12-02 01:04:24 EST
Ok, I think it would be acceptable to make this change to /usr/bin/firefox ONLY
IF our package default preference be changed to "new window" rather than the
current window.  Then advanced users like yourself can change it to their
preferred behavior.

caillon, your thoughts?
Comment 7 Carlos Rodrigues 2004-12-02 06:06:25 EST
That would be just fine.
Comment 8 Warren Togami 2004-12-13 21:43:10 EST
*** Bug 142775 has been marked as a duplicate of this bug. ***
Comment 9 Mariano Draghi 2004-12-14 07:33:28 EST
First, sorry for the duplicate 142775. As Firefox is new in FC3, I
didn't look for the bug in "Devel" version.

Having read all these comments, I don't understand why we have to wait
for a "fix" in the package default preference to fix this bug. Firefox
has a preference so the user can choose if he/she likes a new window,
a new tab or the same window/tab. With the current behaviour,
/usr/bin/firefox *overrides* the user preference, which is very
annoying and frustrating (nobody is going to look into
/usr/bin/firefox, specially a newbie).

With the proposed fix in /usr/bin/firefox, *all of us* (advanced users
or not) can have firefox do whatever they choose in the preferences.
Comment 10 Warren Togami 2004-12-20 04:10:12 EST
We have to cater to both advanced and newbie users.  The default
behavior of "open in the same window" is absolutely terrible.  For
this reason I suggest to the package maintainer to change that default
option while also changing /usr/bin/firefox.

If somebody submits a simple patch to change that default behavior,
maybe this can happen sooner.
Comment 11 David Fraser 2004-12-20 05:38:15 EST
For reference, the config option is "browser.link.open_external" and
the options are accessible under Edit->Preferences->Advanced->Tabbed
Browsing: "Open links from other applications in:"
  (2) a new window
  (3) a new tab
  (1) the most recent tab/window (default)
The number given is the value of the preference for that option.
Comment 12 David Fraser 2004-12-20 05:55:25 EST
Created attachment 108881 [details]
Patch to firefox.js to set default pref for opening windows

Added a patch to mozilla/browser/app/profile/firefox.js to set the default
preference to open links from external applications in a new window
Comment 13 David Fraser 2004-12-20 05:57:15 EST
Created attachment 108882 [details]
patch to firefox.sh.in to not pass "new-window" to firefox

this just removes the ",new-window" parameter that is passed to firefox when
opening a new URL
Comment 14 David Fraser 2004-12-20 05:59:13 EST
Attached the neccessary patches.

The prefs patch needs to be applied to
mozilla/browser/app/profile/firefox.js inside the tarball so it would
need a change to the spec file, or it could be added to another patch.

The other patch is to firefox.sh.in which is included as a source file
in the RPM.

These are untested but should work by principle, hopefully someone can
check them out and apply them.
Comment 15 Warren Togami 2005-02-24 22:41:25 EST
caillon: his patches should work, but we are forbidden from patching firefox.js
caillon: use firefox-redhat-default-preferences.js
caillon: firefox.js is reserved for upstream

Chris said he'll fold this into FC4 soon along with many other patches.  It will
be tested there for a short while, then backported into a FC3 firefox update.
Comment 16 Matthew Miller 2005-02-28 10:38:09 EST
*** Bug 144981 has been marked as a duplicate of this bug. ***
Comment 17 Warren Togami 2005-03-18 16:54:00 EST
caillon said this is going in before FC4test2.
Comment 18 Christopher Aillon 2005-03-25 13:00:52 EST
In tomorrow's rawhide.  Thanks for the patch, David, and sorry for the delay here.
Comment 19 Jens Petersen 2005-04-06 23:24:56 EDT
This patch just saved my sanity. :)
Comment 20 David Fraser 2005-04-07 03:36:09 EDT
Glad this has gone in, and to be saving people's sanity ...
Could someone report here if/when this goes into a FC3 update?
Comment 21 Carl Davis 2005-04-18 08:54:03 EDT
Could someone please report if there are plans on an update to FC3 or if we will
have to go to FC4 to get this fixed?

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