Tuesday, May 7, 2024
216
rated 0 times [  216] [ 0]  / answers: 1 / hits: 689955  / 2 Years ago, sat, july 2, 2022, 11:34:32

I have three scripts I need to run when I start up my Ubuntu machine, they start services I use in my development environment.



To do that, I manually open three terminals and type in the commands.



Is there any way to create a script that will open three terminals and execute one command in each of these? (Each command should be in a separate terminal window so I can see their output).


More From » command-line

 Answers
1
gnome-terminal -- command

or


xterm -e command

or


konsole -e command

Pretty much


terminal -e command

To make the terminal stay when the command exits:


In konsole there is a --noclose flag.


In xterm, there is a -hold flag.


In gnome-terminal, go to Edit -> Profile Preferences -> Title. Click the Command tab. Select Hold the terminal from the drop-down menu labelled When command exits. You should create a new profile for that and execute with


gnome-terminal --window-with-profile=NAMEOFTHEPROFILE -e command

[#44844] Sunday, July 3, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
disdry

Total Points: 133
Total Questions: 128
Total Answers: 109

Location: Greenland
Member since Fri, Jul 31, 2020
4 Years ago
;