1

I have tried the following:

[matt@arch-desktop ~]$ gnome-terminal --window -e 'echo foo' --tab -e 'echo bar'
# 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.
# 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.

but it appears the option no longer exists. This works on my Debian 9 system, but my Arch install is newer.

[matt@arch-desktop ~]$ gnome-terminal --version
# GNOME Terminal 3.36.2 using VTE 0.60.2 +BIDI +GNUTLS +ICU +SYSTEMD

So my question is this: is there no longer a way to execute a terminal with multiple tabs, with each tab running a predefined command? I have some background processes to run and I would like to monitor the status of each by switching tabs. How do I achieve this? It does not necessarily have to be in gnome-terminal; screen may be a viable option as well.

I ultimately want to create a script that will run these commands for me. There are about 10 processes I want to run, so I don't want to type in the commands for each of them every time.

Thanks in advance.

1
  • then you may use tmux (or even screen) inside a gnome terminal using each command in a watch subsession or tailling log file or even signals depending on the commands themselves . (you can script tmux session to open pans & run commands at once of course)
    – francois P
    Commented May 12, 2020 at 20:58

1 Answer 1

1

The command you provided should still work in 3.36 despite the deprecation message and there are currently no plans to remove the option: https://gitlab.gnome.org/GNOME/gnome-terminal/-/issues/58#note_372375. I've also verified that it works on Fedora 32 with gnome-terminal 3.36.

One reason why it could appear to not work is that by default gnome-terminal closes the tab/window once the command has finished. Usually that command is a shell which does not quit until manually terminated/exited. But echo will exit immediately after printing the text. This can be changed in the profile settings.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .