How to start a process from another application and then open a terminal for this process on the gnu screen

I would like to start the process from the GUI application (right now I’m thinking about letting the eclipse user - perhaps through the plugin - click a button to start the build using my build organization system).

I do not want this process to stop when I stop the parent application, and I want to be able to “switch to it” later, as if I started it from the command line.

I have seen how the GNU screen is described as good for most of what I ask, but I'm not sure about the part “starting a process from another application”.

Can this be done if the GUI application was launched from the screen? Can this be done if this is not so? I would be very interested to see how!

Update: Turning the “screen” into the command line looks like a good way to start the process on the screen from the shell, but I'm trying to find a way to do this without taking directly into this session. I want to “send” a command to a screen session, where it will be launched in a new window in this session.

0
source share
3 answers

just add the 'screen' command to your regular command line.

eg. if you usually run " ./make_build.sh opt1 opt ", then your escaped command line will be " screen ./make_build.sh opt1 opt2 "

It is so simple!: -)

+2
source

You can send screen messages to a running screen session with the -X flag.

See How to start a new process in a new window in an existing GNU screen session, out of session, or on the on-screen manual pages.

0
source

If you can pause the process (via Cont-Z), you can run

 screen -dr -X screen $(fg) 

He will connect this process to a new window on the screen. Its not perfect, but it will work.

0
source

All Articles