It seems the behavior of gnome-terminal has changed between the version shipped with Ubuntu 14 (v3.6?) and Ubuntu 18 (v3.28).
I have a script that opens a new gnome-terminal with a bunch of tabs setup to different directories for my development, and currently the first tab runs a script. The command to open the gnome-terminal with tabs looks something like this:
gnome-terminal \ --tab --command="myscript.sh" \ --tab --working-directory="<some dir 1>" \ --tab --working-directory="<some dir 2>" \ ...
This works perfectly as desired in the gnome-terminal version that shipped with Ubuntu 14 (v3.6?).
But in the gnome-terminal version that ships with Ubuntu 18 (v3.28) several things have changed:
- Unless I add the
--windowoption, the tabs open in the current gnome-terminal, not a new one. Unfortunately adding the
--windowoption opens an initial blank tab. Is it possible to open a new window with only the tabs that I specify?
I now get the following notice (though it functions as before):
# Option “--command” is deprecated and might be removed in a later version of gnome-terminal. # Use “-- ” to terminate the options and put the command line to execute after it.
Changing my script per this guidance changes the behavior such that the command is issued to all tabs, whereas before I could apply a unique command to each tab. Does this mean the ability to run a separate command per tab has been deprecated, or am I missing something?
I appreciate suggestions on how to change my script to support the old behavior in the newer gnome-terminal.