1

I need to start screen with some bash command to execute. I'm trying:

screen -S test -d -m bash -c './test.php'

but have no result, screen didn't apear.

Even more, let's say I need to start something like this:

vlc -I ncurses --http-reconnect http://ip/ --sout '#duplicate{dst=std{access=http{user=,pwd=},mux=ts,dst=:51001}}' --ttl=255 --loop --repeat

How do I do this? I'd like the screen to continue to display the results if the command completes.

0

2 Answers 2

2

You're starting screen with -d -m. From the manpage:

-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.

screen -r should attach your screen with the running command.

0

Why not just do:

screen -S test ./test.php
3
  • [screen is terminating] that's all that i get
    – Jeje
    Mar 29, 2010 at 10:43
  • that means the script finished executing. do you want the screen to remain open after the script has finished executing?
    – reko_t
    Mar 29, 2010 at 10:46
  • sure, screen must be alive after script executed
    – Jeje
    Mar 29, 2010 at 11:51

You must log in to answer this question.