Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a shell script as following

screen -d -m -S script1 /usr/bin/ruby script1.rb; true
screen -d -m -S script2 /usr/bin/ruby script2.rb; true
screen -d -m -S script3 /usr/bin/ruby script3.rb; true
screen -d -m -S script4 /usr/bin/ruby script4.rb; true
screen -d -m -S script5 /usr/bin/ruby script5.rb; true
screen -d -m -S script6 /usr/bin/ruby script6.rb; true
screen -d -m -S script7 /usr/bin/ruby script7.rb; true
screen -d -m -S script8 /usr/bin/ruby script8.rb; true
screen -d -m -S script9 /usr/bin/ruby script9.rb; true

No matter of which script run first, only the first eight scripts will get run. How can I solve this problem?

share|improve this question

You're probably running out of pseudo-tty's. What does it say if you run the first 8 scripts, and then just type "screen" (so that you can see any errors)?

What OS is this? Pseudo-tty allocation is a little different for each, but if you google for "linux (whatever) pseudo tty allocation", it will probably come up.

share|improve this answer

maybe it would be easier to use something like the following template in .screenrc

    # define a bigger scrollback, default is 100 lines
defscrollback 10240

nethack on
startup_message off

hardstatus on
hardstatus alwayslastline
hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %m/%d %C%a "

altscreen on

screen bash
title "receiver"

screen bash
title "serv1"

screen bash
title "serv2 "

you can save this screenrc template somewhere and run it as screen -c your_path

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.