Open a terminal with Python but keep it running

86 Views Asked by At

I am developing a distributed app with zeroc and to start all the servers needed we have made a script. One of the commands to be executed is icegridregistry --Ice.Config=registry.conf so in the scripts it appears as os.system("gnome-terminal -- icegridregistry --Ice.Config=./iceflix/registry.conf") and it works, but I need that terminal window being opened and active instead of being closed when the command is executed.

1

There are 1 best solutions below

1
luk020 On

You should use the --Ice.Nohup option.

Syntax: Ice.Nohup=num

If num is set to a value larger than zero, the C++ classes Ice::Application and Ice::Service ignore SIGHUP (for UNIX) and CTRL_LOGOFF_EVENT (for Windows). As a result, an application that sets Ice.Nohup continues to run if the user that started the application logs off. The default value for Ice::Application is 0, and the default value for Ice::Service is 1 (C++ only.)

As per documentation.