Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Opening a terminal from Linux Makefile

Can we open a new terminal tab or window from the existing terminal using a makefile or some c file.

If yes how? Thanks in advance for replying.

P.S. I want to do this because first in the terminal I want to run the server file then I want to open the new terminal and there run the file for the client.

From the second terminal I want to continue running the script.

like image 761
w2lame Avatar asked Sep 13 '26 17:09

w2lame


1 Answers

You could try running xterm (the most available terminal window program) with the program to run as the shell argument.

xterm ./my_client &

For this to work the DISPLAY environmental variable would have to be set to something usable (which it probably will be if you are running X windows locally -- if you are connecting remotely then it's more complicated).

If you want to get fancy you can try to determine what other terminal window programs are available and what the user would want to use, but I know some of them have a different way of specifying which "shell" to run.

like image 135
nategoose Avatar answered Sep 16 '26 05:09

nategoose



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!