open new tab doesn't work as intended

Bug #1661211 reported by Emiddio Esposito
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-terminal (Ubuntu)
New
Undecided
Unassigned

Bug Description

According to the help (output of "gnome-terminal --help-terminal"), if i use the "--tab" option a new tab will be opened in the last window opened from the default profile.

But, again, if i try to use the command " gnome-terminal --tab ", a new window will be opened, and it will not open it in the newest window with the default profile ( the wrong behavious happens if the latest opened window is the same on which the command is run and it also happens if it isn't ).

I don't know if it help, but a similar bug with mate-terminal (which has similar options) has been reported and, according to the tracking, resolved and came up again and resolved again (???)

https://github.com/mate-desktop/mate-terminal/issues/45
https://github.com/mate-desktop/mate-terminal/issues/96

Thank you very much.

Some info:

"lsb_release -rd" :

Description: Ubuntu 14.04.5 LTS
Release: 14.04

"apt-cache policy gnome-terminal" :
gnome-terminal:
  Installato: 3.6.2-0ubuntu1
  Candidato: 3.6.2-0ubuntu1
  Tabella versione:
 *** 3.6.2-0ubuntu1 0
        500 http://it.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

Expected:

using "gnome-terminal --tab" opens a new tab in an existing window

Actual Result:

using "gnome-terminal --tab" opens a new window

Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

The output of "gnome-terminal --help" is probably a bit poorly worded.

The intent is that --tab opens a new tab in the window that was created by a preceding --window option of this very same "gnome-terminal" command line.

E.g.

gnome-terminal --window

Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

(sorry, accidentally hit "Post")

E.g.

gnome-terminal --window --profile=asdf --tab --profile=qwer --tab --profile=zxcv

Other than here, gnome-terminal does not keep track which of its windows was the "last opened" (which may not even exist by that time, so it'd need to be "most recent" instead, but again, it doesn't keep track of it).

Keeping track of this would probably be counterintuitive since it has nothing to do with anything on the UI (e.g. visual arrangements of the windows, or most recently used one, etc.).

Revision history for this message
Emiddio Esposito (bracco23) wrote :

It still seems to me than a set of features poorly designed. You can see that by playing around with the two option: "--window" e "--tab"

a command like "gnome-terminal --window --tab" does exactly the same as "gnome-terminal --tab --tab" but a different thing from "gnome-terminal --window --window"

Still, alone, "gnome-terminal --window" and "gnome-terminal --tab" do exactly the same thing, leaving multiple option for the same outcome (having a new window with multiple tab) but noone for the possbile outcome of having a new tab in an existing window.

Keeping track of the window in which open the new tab could be as simple as adding an id to the profile (since --tab uses the Default profile, but --tab-with-profile also exist). The id could be used to connect to the window and send the command to open the tab(s), and everytime a new window gets opened the profile will be updated.

It seems to me that would be much more interesting to treat this as a bug, with the help written with the intended functionality, than to consider the help written in a bad way.

Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

I agree that these options are far from ideal.

Could you please share your entire (desired) use case / workflow? It's hard for me to imagine how you'd use these options.

Note that Ubuntu folks are extremely unlikely to create and maintain a patch for your feature request. gnome-terminal development is tracked in GNOME's bugzilla, this conversation should happen there. Could you please file a bug there? I'll likely comment on it, but I'm not the main developer to decide.

Revision history for this message
Emiddio Esposito (bracco23) wrote :

I met this need working with ROS and its launch files.

it is basically a middleware that allows you to launch more that one executable at the same time with some kind of xml file.

The idea is to open each executable in a different tab so that you have only one window but with one tab for each executable and you can check more easily the output of each one.

so basically the workflow could be:

-> open terminal from the gui
-> gnome-terminal --tab exec #open a new tab in this window and execute exec
-> gnome-terminal --window # to open a new window
-> gnome-terminal --tab exec1 # open a new tab in the window just opened and execute exec1
-> gnome-terminal --tab exec2 --tab exec3 # two new tabs with two differen executables
-> gnome-terminal --tab exec4 --window --tab exec5 # exec4 in the the same window as before, exec5 in a new one

I would have filed the bug directly to the GNOME tracker if their help page (here https://wiki.gnome.org/Apps/Terminal/ReportingBugs) didn't explicitly tell to use the distro bug tracker and let the developers use the GNOME one.

Since i didn't think of this as a feature but more as a bug (due to the help sentence) i did not see the https://bugzilla.gnome.org/show_bug.cgi?id=83203, which is open since 2002 and which last comment is yours (two years ago).

Well, Thanks anyway!

Revision history for this message
Emiddio Esposito (bracco23) wrote :

ERRATA: in the workflow maybe some options like -x or --command should be added, sorry, but it doesn't change the use of --tab and --window.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.