I have processes that I background with screen. I'm trying to write a script that attaches to a terminal, executes a couple commands, then detaches. The problem is that when I attach to a terminal, screen directs control to the user. How do I work around this?
Asked
Active
Viewed 3,512 times
1 Answers
5
Screen has an option -X which you can use to remote-control a screen session from within a script. See, for example, here.

Mark Probst
- 7,107
- 7
- 40
- 42
-
That lets me send screen commands to screen. Is there any way to send arbitrary commands to the terminal running inside screen? – David Berger Mar 20 '09 at 17:46