1

I'm using bash to run a terminal which launches a few programs in separate tabs. However, after the terminal opens, it seems like my script continues even though generally this only happens if we use the ampersand (&).

Here is an example of what I'm talking about:

gnome-terminal --tab -e "./run_script.sh"

./runanothercommand

The behavior I'm seeing now is that gnome-terminal executes, and then immediately after the second command is executed. The desired behavior for myself is that the second command only executes when the gnome-terminal process ends.

Is there any way to halt the script until gnome-terminal completes?

EDIT:

According to the question linked, Run true multiple process instances of gnome-terminal, --disable-factory was an argument that would accomplish this. However, --disable-factory is deprecated and is no longer availble.

That thread also links here: https://wiki.gnome.org/Apps/Terminal/Debugging , which gives a method using GDB. However, I don't think this approach will work for me.

blurb
  • 131
  • And of course https://unix.stackexchange.com/questions/429797/ , https://unix.stackexchange.com/questions/401612/ , https://unix.stackexchange.com/questions/323663/ , and https://unix.stackexchange.com/questions/304269/ . – JdeBP Nov 29 '18 at 16:29
  • @JdeBP The first two links you sent are exactly what I am looking for. Unfortunately, the argument they specify is no longer supported in gnome-terminal thus this solution will not work for me. I will update my question to include this. – blurb Nov 29 '18 at 16:32

0 Answers0