1

So far I have this command that works

gnome-terminal --tab -e '/bin/bash -c "ls";bash'

but there is a warning

# 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.

and when I change it to

gnome-terminal --tab -- '/bin/bash -c "ls";bash'

New tab fails with

There was an error creating the child process for this terminal
Failed to execute child process “/bin/bash -c "ls";bash” (No such file or directory)
Cyrus
  • 84,225
  • 14
  • 89
  • 153
ogbofjnr
  • 1,688
  • 5
  • 19
  • 41

1 Answers1

6

The reason that:

gnome-terminal --tab -- '/bin/bash -c "ls";bash'

Fails is that it is looking for a program with that as its name. This is an instance of chain loading where the rest of the arguments are passed as is to exec. Those first argument is the name of the program. With this quoting it receives the entire command and options as a single program name.

Change the quoting to:

gnome-terminal --tab -- /bin/bash -c "ls;bash"
Dan D.
  • 73,243
  • 15
  • 104
  • 123