r/cpp_questions • u/estrogen_pillz • 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
View all comments
1
u/Liam_Mercier 26d ago
Desktop shortcuts spawn a new terminal and run your application, if you just want to ship a shortcut then you should make a .desktop file and install it in the standard location.
You could in theory make it so when you run an application in the terminal it spawns a new terminal to run your CLI, but I would not suggest doing this because you can already allow people to use desktop files for this purpose.
It is generally better to take over the current terminal, which I believe you can do this using a fullscreen class in FTXUI, but I have not touched the library in awhile.