Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
add comment

migrated from stackoverflow.com Mar 30 '10 at 8:14

This question came from our site for professional and enthusiast programmers.

2 Answers

Why not just do:

screen -S test ./test.php
share|improve this answer
    
[screen is terminating] that's all that i get –  Jeje Mar 29 '10 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 '10 at 10:46
    
sure, screen must be alive after script executed –  Jeje Mar 29 '10 at 11:51
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.