Friday, May 3, 2024
10
rated 0 times [  10] [ 0]  / answers: 1 / hits: 10869  / 2 Years ago, wed, august 17, 2022, 7:50:50

I'm on ubuntu 12.04 and I use gnome terminal as my default terminal. I need to open another terminal from the command line. I know I can do this with gnome-terminal but I want to run a command that always opens the default terminal so that my script can run on other distros, even the ones not using gnome.



EDIT: I want a bash script that opens the terminal.


More From » gnome-terminal

 Answers
6

xterm is available by default on almost all Linux distributions if I remember correctly.



So you could run a command in it, depending on the shell that the script's written in with something like this, (the example is for a bash shell script)



xterm -e "sh script.sh"


It'll spawn a new shell window and execute your script.


[#36136] Friday, August 19, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
heathree

Total Points: 157
Total Questions: 132
Total Answers: 108

Location: Honduras
Member since Mon, Apr 5, 2021
3 Years ago
;