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

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255

1 Answers1

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 &
CameronNemo
  • 1,131