0

a new terminal opens up and runs the script.

terminal -e "/script"

script runs a gui_app, disowns it. sleeps 4 seconds.

  #!/bin/sh

  /gui_app & disown

  sleep 4

after sleep.. terminal closes because there never was

   ;bash

attached to the command.

Conflict : it also shuts down the disowned gui_app

2

Difference between nohup, disown and &

Try using nohup rather than disown:

nohup /gui_app &

Note that this will feed output into a file, nohup.out. To prevent this send stdout and stderr to /dev/null:

nohup /gui_app >/dev/null 2>&1 &

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy