views:

82

answers:

1

This question is about the linux utility screen.

I'd like to make a script to launch a program in screen then detatch it automatically after it starts.

I've got the script starting screen, starting the command in screen, but my question is now how do I detach it?

Thanks

+3  A: 

Don't attach in the first place. From the screen manual:

  -d -m   Start screen in "detached" mode. This creates a new session but
          doesn't  attach  to  it.  This  is  useful  for  system startup
          scripts.
Logan Capaldo
would i say something like: screen -d -m /home/user1/script.sh ??
Travis
That is correct.
Logan Capaldo
nice, thank you!
Travis