Ubuntu: How can I make a script that opens terminal windows and executes commands in them?

Ubuntu: How can I make a script that opens terminal windows and executes commands in them?

👉 https://amzn.to/4aLHbLD 👈 You’re literally one click away from a better setup — grab it now! 🚀👑 As an Amazon Associate I earn from qualifying purchases. Ubuntu: How can I make a script that opens terminal windows and executes commands in them? Question: 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). Solutions Sample (Please watch the whole video to see all solutions, in order of how many people found them helpful): == This solution helped 125 people == gnome-terminal -e 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 == This solution helped 1 person == commenting for the answer by Lekensteyn. I know this is a old post, but for anyone who finds this useful (as I just did) Instead of making another "hacky script" with just put a function inside the script you are calling hacky_function() { "$@" exec "$SHELL" } Call your script with "x-terminal-emulator -e /path/to/script hacky_function optional arguments here" Don't forget to put "$@" at the end of the script With thanks & praise to God! With thanks to all the many who have made this project possible! | Content (except music & images) licensed under cc by-sa 3.0 | Music & music license: https://www.bensound.com/royalty-free... | Images & images license: https://stocksnap.io/license and others | With thanks to user Sruli (https://askubuntu.com/users/483497), user nickguletskii (https://askubuntu.com/users/15898), user Lekensteyn (https://askubuntu.com/users/6969), user Karthik T (https://askubuntu.com/users/92812), user JSBach (https://askubuntu.com/users/19186), user Gabriel Staples (https://askubuntu.com/users/327339), user Flimm (https://askubuntu.com/users/2355), user Eliah Kagan (https://askubuntu.com/users/22949), and the Stack Exchange Network (http://stackoverflow.com/questions/46.... Trademarks are property of their respective owners. Disclaimer: All information is provided "AS IS" without warranty of any kind. You are responsible for your own actions. Please contact me if anything should be amiss at Roel D.OT VandePaar A.T gmail.com.