Ubuntu – How to open a terminal from the terminal


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.

Best Answer

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.