Open the application in a separate console window

I am currently writing an application that I would like to open in a new terminal window by resizing it in the process, and not the one in which the call command was entered. How should I do it? I am using the gnome terminal and will be writing a C ++ application.

+3
source share
3 answers

Try it gnome-terminal --geometry="20x10" -e 'command'(20 - height, 10 - width).

In C ++, you can invoke a command using system () .

+4
source

++ . , , , system(), cstdlib.

:

    system("<your-shell-command> <parameters>"); 

,

    system("/usr/bin/gnome-terminal /usr/executables/a.out"); 

    system("C:\\Windows\\cmd.exe C:\\Users\FuUser\\Binaries\a.exe"); 
+2

If you do this from the Linux console, you want openvt:

http://www.oreillynet.com/linux/cmd/cmd.csp?path=o/openvt

If you are talking about a terminal window under X, you can usually use a command like

gnome-terminal -e "command"
+1
source

Source: https://habr.com/ru/post/1772735/


All Articles