Monday, December 4, 2023
216
rated 0 times [  216] [ 0]  / answers: 1 / hits: 689837  / 1 Year 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, 1 Year  [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
3 Years ago
disdry questions
Tue, Apr 11, 23, 11:37, 8 Months ago
Thu, Oct 13, 22, 19:09, 1 Year ago
Fri, Oct 28, 22, 15:06, 1 Year ago
Sat, Feb 25, 23, 11:33, 10 Months ago
;