Open another terminal in the linux shell script and execute the shell script in the new terminal


gnome-terminal -t "title-name" -x bash -c "sh ./run.sh;exec bash;"


-t is the title to open the terminal for easy distinction.
The ones after -x are the scripts to be executed in the opened terminal, and you can modify them according to your needs.

The last exec bash; is to let the opened terminal not close after executing the script.


From: http://blog.csdn.net/wutong_login/article/details/17767153


Published 30 original articles · Like 13 · Visits 100,000+

Guess you like

Origin blog.csdn.net/u013224189/article/details/38299333