Directing input made to a screen session with a command to a specific window inside the session?
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
So I have an automatic backup script hourly backing up important files of the server.
It has many lines like this that send input to the screen session the game server console is running in to broadcast when it starts to backup the files:
screen -x $SCREENNAME -X stuff "`printf "say Backing up world: '$WORLD'r"`
It works fine, unless I'm using a different window inside of the screen session.
When I'm using a different window in the same screen session the script tries to execute the say Backing up world
in the bash terminal I'm using which doesn't work and no message gets sent to the game console.
Is there any way to direct the output to a specific screen inside the seesion. My game console is always on the first screen so screen 0.
I'm on CentOS 7 if that's relevant
scripting backup gnu-screen
add a comment |Â
up vote
2
down vote
favorite
So I have an automatic backup script hourly backing up important files of the server.
It has many lines like this that send input to the screen session the game server console is running in to broadcast when it starts to backup the files:
screen -x $SCREENNAME -X stuff "`printf "say Backing up world: '$WORLD'r"`
It works fine, unless I'm using a different window inside of the screen session.
When I'm using a different window in the same screen session the script tries to execute the say Backing up world
in the bash terminal I'm using which doesn't work and no message gets sent to the game console.
Is there any way to direct the output to a specific screen inside the seesion. My game console is always on the first screen so screen 0.
I'm on CentOS 7 if that's relevant
scripting backup gnu-screen
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
So I have an automatic backup script hourly backing up important files of the server.
It has many lines like this that send input to the screen session the game server console is running in to broadcast when it starts to backup the files:
screen -x $SCREENNAME -X stuff "`printf "say Backing up world: '$WORLD'r"`
It works fine, unless I'm using a different window inside of the screen session.
When I'm using a different window in the same screen session the script tries to execute the say Backing up world
in the bash terminal I'm using which doesn't work and no message gets sent to the game console.
Is there any way to direct the output to a specific screen inside the seesion. My game console is always on the first screen so screen 0.
I'm on CentOS 7 if that's relevant
scripting backup gnu-screen
So I have an automatic backup script hourly backing up important files of the server.
It has many lines like this that send input to the screen session the game server console is running in to broadcast when it starts to backup the files:
screen -x $SCREENNAME -X stuff "`printf "say Backing up world: '$WORLD'r"`
It works fine, unless I'm using a different window inside of the screen session.
When I'm using a different window in the same screen session the script tries to execute the say Backing up world
in the bash terminal I'm using which doesn't work and no message gets sent to the game console.
Is there any way to direct the output to a specific screen inside the seesion. My game console is always on the first screen so screen 0.
I'm on CentOS 7 if that's relevant
scripting backup gnu-screen
asked Apr 1 at 15:29
Tundral
425
425
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
You can preselect a window by specifying -p , 0 is first window, 1 is second so on...
screen -x $SCREENNAME -p 0 -X stuff "printf "say Backing up world: '$WORLD'r"
"
So my screen now has this in itscreen -p 0 -S $SCREENNAME -X eval 'stuff "helpop $SAY_BACKUP_START"15'
But it still keeps inputting the things to the window that I have currently selected instead of window #0
â Tundral
Apr 28 at 11:55
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
You can preselect a window by specifying -p , 0 is first window, 1 is second so on...
screen -x $SCREENNAME -p 0 -X stuff "printf "say Backing up world: '$WORLD'r"
"
So my screen now has this in itscreen -p 0 -S $SCREENNAME -X eval 'stuff "helpop $SAY_BACKUP_START"15'
But it still keeps inputting the things to the window that I have currently selected instead of window #0
â Tundral
Apr 28 at 11:55
add a comment |Â
up vote
1
down vote
accepted
You can preselect a window by specifying -p , 0 is first window, 1 is second so on...
screen -x $SCREENNAME -p 0 -X stuff "printf "say Backing up world: '$WORLD'r"
"
So my screen now has this in itscreen -p 0 -S $SCREENNAME -X eval 'stuff "helpop $SAY_BACKUP_START"15'
But it still keeps inputting the things to the window that I have currently selected instead of window #0
â Tundral
Apr 28 at 11:55
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
You can preselect a window by specifying -p , 0 is first window, 1 is second so on...
screen -x $SCREENNAME -p 0 -X stuff "printf "say Backing up world: '$WORLD'r"
"
You can preselect a window by specifying -p , 0 is first window, 1 is second so on...
screen -x $SCREENNAME -p 0 -X stuff "printf "say Backing up world: '$WORLD'r"
"
answered Apr 1 at 16:46
Bharat
3058
3058
So my screen now has this in itscreen -p 0 -S $SCREENNAME -X eval 'stuff "helpop $SAY_BACKUP_START"15'
But it still keeps inputting the things to the window that I have currently selected instead of window #0
â Tundral
Apr 28 at 11:55
add a comment |Â
So my screen now has this in itscreen -p 0 -S $SCREENNAME -X eval 'stuff "helpop $SAY_BACKUP_START"15'
But it still keeps inputting the things to the window that I have currently selected instead of window #0
â Tundral
Apr 28 at 11:55
So my screen now has this in it
screen -p 0 -S $SCREENNAME -X eval 'stuff "helpop $SAY_BACKUP_START"15'
But it still keeps inputting the things to the window that I have currently selected instead of window #0â Tundral
Apr 28 at 11:55
So my screen now has this in it
screen -p 0 -S $SCREENNAME -X eval 'stuff "helpop $SAY_BACKUP_START"15'
But it still keeps inputting the things to the window that I have currently selected instead of window #0â Tundral
Apr 28 at 11:55
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f434851%2fdirecting-input-made-to-a-screen-session-with-a-command-to-a-specific-window-ins%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password