Это происходит потому что screen хочет терминал. ЧТобы он не хотел терминал есть две опции:
-m causes screen to ignore the $STY environment variable. With
"screen -m" creation of a new session is enforced, regardless
whether screen is called from within another screen session or
not. This flag has a special meaning in connection with the `-d'
option:
-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.
Я использую обычно -d -m.
Discussion
Большое спасибо за Ваш сайт.
Отдельное спасибо за статью “linux_faq:при-использовании-в-стартап-скриптах-screen-говорит-что-must-be-connected-to-a-terminal”
Долго разобраться не мог, оказывается все просто!
Приходите снова! :)