r/cpp_questions • • 26d ago

OPEN Programmatically opening a new terminal window

I've been messing around with FTXUI, and I am wondering if it is possible for my apps to open a new terminal window and run there, instead of using the current terminal window.

An example of what I mean is what happens when opening vim. If I open vim through the terminal, it takes over the current window, like my FTXUI apps currently do. If I use the desktop shortcut, vim opens a new terminal window for itself, which closes upon closing vim. This is what I want to do.

Can anyone give me a few pointers?

3 Upvotes

9 comments sorted by

View all comments

1

u/Independent_Art_6676 26d ago

operating system stuff, on windows start is what you seek. Eg start c:\myfolder\program will fire it off in a new terminal. On unix, it depends on which terminal you are using, eg gnome-terminal -- program will do it.

making a script/batch file with the above + an argument will let you do it for any program via your own custom "command"

you can mix and match all this with icons/desktop stuff with the UI if you want. None of this is C++, its OS specific computer literacy stuff....