0

my terminal - genome I am trying to run some commands, each in a separate tab in the same window. I tried using

gnome-terminal --tab -t "XXX"  -x bash -c "redis-server /etc/redis/redis.conf; redis-sentinel /etc/redis/sentinel.conf; sudo redis-server; exec bash"
gnome-terminal --tab -t "XXX"  -x bash -c "mongod --config /etc/mongod.conf; exec bash"
gnome-terminal --tab -t "XXX"  -x bash -c "node server.js; exec bash"

But the problem is it's opening new windows like this:

1

but I want it to look like this:

2

4
  • Try to make a minimal reproducible example. Do not use commands like cmd1, etc. which we can't reproduce. See: How to create a Minimal, Reproducible Example. Give more information about how you start your script or command. Commented Jul 30, 2021 at 9:10
  • The option --tab doesn't exist in the manual you can invoke with man gnome-terminal. However, its use doesn't trigger any error. It is probably deprecated. Commented Jul 30, 2021 at 9:13
  • @PierreFrançois thanks for the suggestion, I edited the question, hope i created a minimal reproducible example. Commented Jul 30, 2021 at 17:06
  • Thank you, but the commands you use, like cd /home/udaysrinivas/, are not reproducible for other users. Please, try to simplify the example for us. Commented Jul 31, 2021 at 16:24

1 Answer 1

0

You can have several --tab options:

gnome-terminal --tab -e bash --tab -e bash --tab -e cmd1 --tab -e cmd2

Tester with gnome-terminal 3.30.2

Sign up to request clarification or add additional context in comments.

1 Comment

This is the command i generated based on your answer ---- gnome-terminal --tab -e bash --tab -e bash --tab -e 'redis-server /etc/redis/redis.conf; redis-sentinel /etc/redis/sentinel.conf; sudo redis-server;' --tab -e 'mongod --config /etc/mongod.conf;' ------ but it's not working

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.