#1138176 screen -p (number) -X stuff "foo" no longer works

Package:
screen
Source:
screen
Description:
terminal multiplexer with VT100/ANSI terminal emulation
Submitter:
Matija Grabnar
Date:
2026-08-25 11:07:02 UTC
Severity:
normal
Tags:
#1138176#5
Date:
2026-05-28 18:21:11 UTC
From:
To:
Dear Maintainer,

I have a program which runs in one window of my screen, monitoring certain parameters.
When those parameters reach certain values, it executes a command in another program, running in
another window of the same screen.

So if the windows are 1 and 2, then the program in screen 1 will execute a command
screen -p 2 -X stuff "some commands". Program in window 2 receives those commands as if
they came from the keyboard. Very nice.

This worked for several years, no problems.

However, recently (days ago), this started failing: now whenever I run screen -p (number),
I get an error saying "could not find pre-select window".

Note: I have only one screen process running. This does not seem to be about the command being
sent to the wrong screen session.

Restarting screen did not bring any change.

#1138176#10
Date:
2026-08-05 20:40:46 UTC
From:
To:
Hi Matija,

I cannot reproduce this bug.

Tested with 5.0.1-3:
screen -p 2 -X stuff "some commands"

"some commands" appears in window 2.

If you're still able to reproduce this bug, please provide:
1. output of: dpkg -l screen
2. output of: screen -ls
3. output of: screen -Q windows "%n %t"
4. if this is being invoked in a script - if the script creates the
target window first
5. whether the command is run from inside screen or outside, and whether
STY is set

Cheers,
Peter Dey

#1138176#19
Date:
2026-08-25 11:04:05 UTC
From:
To:
tags 1138176 + unreproducible
thanks

No response received.  Closing as unreproducible.
Test written and included in 5.0.2-1.