How to open mate-terminal, run a command in it and leave the terminal open?

How can I launch a mate-terminal, run a command in it and leave the terminal open?

It seems that konsole and xterm support this pretty easily as you can see from the following post:

konsole --noclose -e echo Hello World. Running this from terminal 1! &

xterm -hold -e echo “Hello world: $i” && /bin/bash &
1 Like

Hi not sure of your intended usage but in 4. of the link you provided it references your run a command and leave the terminal open question.

" Lastly, exec bash ensures that the Bash terminal stays open even after the code has been executed."

Note: It mentions gnome-terminal which is mate-terminal in MATE.
It seems to be involved with scripts. Are you trying to follow a bash tutorial?
Or just using the terminal. I use it and when not using script it stays open after each command I enter.
Maybe a more precise example of what is failing for you.

1 Like

Welcome @jk10 to the community!

There is no such commandline-option for mate-terminal.
But:

  1. You can keep the terminal open by a setting in the selected/loaded profile.

  2. You can select/load a profile by commandline-option

mate-terminal --profile='MyProfileName' -e 'MyCommand'

Combining these two steps brings you as close as you can get to the desired result.

3 Likes