! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
opening a URL from terminal in firefox always makes a new window
Status:
CLOSED: FIXED
Product:
Xfce4-terminal
Component:
General

Comments

Description Chris Moore 2006-05-23 14:54:35 CEST
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.3) Gecko/20060513 Ubuntu/dapper Firefox/1.5.0.3
Build Identifier: 0.2.5+r21674-0ubuntu2

I have firefox set up to make new tabs when asked to open a URL by an external application, but when Terminal asks it to open a URL it always makes a new window, not a new tab.

This is because of the line in helpers/firefox.desktop.in which says:
  X-Terminal-Command=%B -remote "openURL(%u,new-window)" || %B "%u"

ie. it is asking firefox to always make a new window.

If this just said:
  X-Terminal-Command=%B "%u"

instead, then firefox could decide for itself whether to make a new window or a new tab, based on user preferences.

Reproducible: Always

Steps to Reproduce:
Comment 1 Benedikt Meurer editbugs 2006-05-23 15:01:38 CEST
Yep, this is because older versions of Firefox don't support this feature. You can easily override the default firefox.desktop with your custom one, by creating the directory ~/.local/share/Terminal/apps/ and putting a firefox.desktop file in there with the following content:

[Desktop Entry]
Encoding=UTF-8
Icon=firefox
Name=Mozilla Firefox (Tabs)
Type=Application
X-Terminal-Binaries=firefox;firefox-gtk2;firefox-gtk;mozilla-firefox;
X-Terminal-Category=WebBrowser
X-Terminal-Command=%B "%u"
Comment 2 James Westby 2006-05-23 15:02:04 CEST
Created attachment 564 
Patch to change the file as requested
Comment 3 Chris Moore 2006-05-23 15:08:03 CEST
(In reply to comment #1)
> Yep, this is because older versions of Firefox don't support this feature.

How about having 2 separate entries in the menu; "firefox < 1.5" and "firefox >= 1.5" (or whatever version constitutes "older").
Comment 4 Benedikt Meurer editbugs 2006-05-23 15:09:22 CEST
Created attachment 565 
Possible fix

Hm, could be changed to this. Atleast Firefox 1.0.x supports that, and it should work with 1.5 as well.
Comment 5 Benedikt Meurer editbugs 2006-05-25 17:12:24 CEST
Committed with revision 21838.

2006-05-25	Benedikt Meurer <benny@xfce.org>

	* helpers/firefox.desktop.in: Don't forcibly open a new window for
	  Firefox, but do whatever the user configured in Firefox. Bug #1841.

Bug #1841

Reported by:
Chris Moore
Reported on: 2006-05-23
Last modified on: 2009-12-17

People

Assignee:
Benedikt Meurer
CC List:
1 user

Version

Version:
unspecified

Attachments

Patch to change the file as requested (371 bytes, patch)
2006-05-23 15:02 CEST , James Westby
no flags
Possible fix (456 bytes, patch)
2006-05-23 15:09 CEST , Benedikt Meurer
no flags

Additional information