bugGNU Screen - Bugs: bug #10074, sending a command to a screen...

 
 

bug #10074: sending a command to a screen started in daemon mode is silently ignored

Submitter:  None
Submitted:  Fri 20 Aug 2004 02:45:31 PM UTC
   
 
Category:  Program Logic Severity:  3 - Normal
Priority:  * 4 Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Release:  4.0.2
Fixed Release:  4.1.0 Planned Release:  Later
Work Required:  1 - Days
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 25 May 2009 05:00:04 PM UTC, comment #8: 


For those who cannot upgrade to the last release, here is a dirty workaround allowing to start processes in screens without having to attach manually before.

echo starting $basename screen
screen -d -m -S $basename
# we need to attach to the screen at least once before sending commands to it.
# So let's create an xterm in which we attach to the screen.
xterm -e "screen -r $basename" &
sleep 1
# detach the screen, this will wipe the xterm
screen -d $basename
# now we can send commands
screen -S $basename -X exec $basedir/$script

Anonymous
Sat 30 Aug 2008 09:32:30 PM UTC, comment #7: 

Should be fixed by 3956383

Sadrul Habib Chowdhury <sadrul>
Group administrator
Sat 12 Jul 2008 08:28:49 PM UTC, comment #6: 

Is there anything wrong with making the last-created (or automatically created) window the "foreground", if none were preselected? At any rate, this strikes me as not really being crucial for a 4.1.0 release, then, so I'm retargetting (however, feel free to take this on anyway, if it strikes your fancy - I'll fold it in for 4.1.0 if someone completes it).

Micah Cowan <micahcowan>
Sat 12 Jul 2008 03:49:44 PM UTC, comment #5: 

This seems to happen because there's no foreground window when there has never been a display. So none of the commands that require foreground windows (e.g. clear, exec etc.) work. But other commands (e.g. screen, select etc.) do work.

Sadrul Habib Chowdhury <sadrul>
Group administrator
Mon 23 Jun 2008 10:00:39 PM UTC, comment #4: 
Micah Cowan <micahcowan>
Mon 23 Jun 2008 08:58:45 PM UTC, comment #3: 

Tentatively targetting at 4.1.0; it may be that it will need to be punted for later, depending on what the source of the issue is.

Micah Cowan <micahcowan>
  Spam posted by anonymous
Sun 16 Jan 2005 07:59:40 PM UTC, comment #1: 

I think I'm getting another side effect of the same bug...
I start a screen session, the get the associated STY (using screen -ls). In another terminal, the session being attached, after having export'ed correctly the STY environment variable, I can add windows containing what I want using screen command, which is the desired behavior. However, if the screen is detached, the very same command does not create a new window (it silently does nothing). If I reattach the screen anywhere and, from the STY-aware terminal, it type once again the same command, it works well.

(Not sure whether it's clear or not, this may help. In the following termN are plain xterm shells whereas screenN are shells open in the screen session called "test".)

term1$ screen -S test
screen1$ # so this is ok, one window open

term2$ screen -ls
There are screens on:
        6796.test       (Attached)
(...)
term2$ export STY=6796.test
term2$ screen bash
term2$ echo $?
0

# now I've got two windows in my screen (screen1 and screen2)

screen1$ ^Ad
[detached]
term1$ # OK

term2$ screen bash # this should open a third window
term2$ echo $?
0

term1$ screen -R test
screen1$ # still two windows instead of the three I was expecting

term2$ screen bash
term2$ echo $?
0

screen1$ # the window openned correctly (screen3)

Olivier Mehani <shtrom>
Fri 20 Aug 2004 02:45:31 PM UTC, original submission:  

I downloaded, built and tested this with 'Screen version 4.00.02 (FAU) 5-Dec-03' on a PC running RedHat 8 with a custom 2.4.20 kernel.

Steps to reproduce:

screen -dmS test
screen -S test -X clear
screen -r test

(observe that the screen's screen has NOT been cleared)

detach from the screen with <ctrl>ad

screen -S test -X clear
screen -r test

(observe now that the screen's screen HAS been cleared)

It seems as though commands are ignored unless the screen has been attached at least once.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by sadrul (Posted a comment)
  • -email is unavailable- added by micahcowan (Updated the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-08-30 sadrul StatusConfirmed Fixed
        Open/ClosedOpen Closed
        Fixed ReleaseNone 4.1.0
    2008-07-12 micahcowan Planned Release4.1.0 Later
    2008-06-24 micahcowan Work RequiredNone 1 - Days
    2008-06-23 micahcowan CategoryNone Program Logic
        Priority5 - Normal 4
        ReleaseNone 4.0.2
        Planned ReleaseNone 4.1.0
    2008-06-13 micahcowan StatusNone Confirmed
    2005-01-16 shtrom Carbon-Copy- Added shtrom

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code