So I have 2 terminals open in front of me;
- /dev/pts/1 - 'the controller'
- /dev/pts/2 - 'the receiver'
I am currently using ttyecho to execute commands in /pts2 from /pts1.
I can list the screens - ttyecho -n /dev/pts/2 screen -ls
fine from /pts1 and see the results in /pts2.
I can attach to a screen ttyecho -n /dev/pts/2 screen -x [blah]
from /pts1 on /pts2 fine.. But what I can't do, is when attached to a screen then detach from it.
So if /dev/pts/2 is then inside a screen, I am trying to detach from it by executing a command using ttyecho from /dev/pts1
I've tried sending...
ttyecho -n /dev/pts/2 ^a+d
ttyecho -n /dev/pts/2 screen -d -r
ttyecho -n /dev/pts/2 screen -D -RR
ttyecho -n /dev/pts/2 screen -d -r
ttyecho -n /dev/pts/2 screen -DRi
ttyecho -n /dev/pts/2 Ctrl+a+d
ttyecho -n /dev/pts/2 Ctrl+a d
ttyecho -n /dev/pts/2 CTRL + A
ttyecho -n /dev/pts/2 control+a
So I guess what I need is either:
- A command I can send that will detach the screen OR
- Someway to send some kind of pseudo keyboard commands via
ttyecho
to that other screen to detach it.
Any help most appreciated.