I am trying to make a script which is supposed to open a new gnome-terminal and issue a command (launch a jetty server).

If I try only : gnome-terminal, a new gnome-terminal is opened.

If I try : gnome-terminal -e ls, I get a warning message :

Option “-e” 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.

Here, the new gnome-terminal is not always opened. If I try this command fast 10 times, maybe 2 terminal will open...

Same if I try with the recommended syntax : gnome-terminal -- ls.

What is the correct way to achieve this?

  • Hello, Arnaud Denoyelle, thank you for the updatete of my answer! Which is the Ubuntu version where -e/-x are depreciated? – pa4080 May 29 '18 at 14:49
  • 1
    @pa4080 I get this warning message on a 18.04 LTS – Arnaud Denoyelle May 29 '18 at 14:50

Browse other questions tagged or ask your own question.