bugGNU Screen - Bugs: bug #51562, Reconnet by session name connects...


bug #51562: Reconnet by session name connects wrong session

Submitted by:  None
Submitted on:  Mon 24 Jul 2017 04:09:50 PM UTC  
Votes:  30  
Category: User InterfaceSeverity: 3 - Normal
Priority: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: OpenRelease: 4.2.1
Fixed Release: NonePlanned Release: None
Work Required: None

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Tue 08 Aug 2017 11:46:05 AM UTC, comment #4:

Did you use, screen build yourself or one provided by your distribution? (Seeing dates on 'screen -ls' it's not vanilla screen)

Some distributions (for example debian) apply patches changing screen attach behaviour.

Can you try with latest release (4.6.1), built by yourself, instead of your distribution?

Attaching to partially matching session, when there is only one screen with partial match, should be considered a separate issue, please report as separate issue.

Amadeusz Sławiński <amade>
Project Administrator
Mon 07 Aug 2017 10:12:29 AM UTC, comment #3:

I'm experiencing the same issues: resuming matches a first found name for which the one specified in command line is prefix. For example, BC2 can be attached for "screen -x BC".
This is reproduced at: FreeBSD 10.3 with "Screen version 4.03.01 (GNU) 28-Jun-15"; CentOS 7 with "Screen version 4.01.00devel (GNU) 2-May-06"; Ubuntu 14.04 with the same version; FreeBSD 10.3 with "Screen version 4.05.00 (GNU) 10-Dec-16". Example for the latter one:

$ screen -ls
There is a screen on:
11293.main (Attached)
1 Socket in /tmp/screens/S-netch.

If I run "screen -x m", it attaches that "main".

Valentin Nechayev <netch>
Mon 07 Aug 2017 09:12:00 AM UTC, comment #2:

This is strange. I double checked it on different machines with different users. On all Debian Jessie machines I got connected to the wrong session without any error or warning.

On Stretch machines with Screen "4.05.00 (GNU) 10-Dec-16" I'm getting connected to the right screen session. So this seems to be fixed in some version in between. That's fine for me because it rarely happens that my session names collides.

Mon 31 Jul 2017 03:50:04 PM UTC, comment #1:

With screen version 4.02.01 (GNU) 28-Apr-14, creating two screens with names where one is a subset of another like in your example results in different behavior. Executing your command #9 (&quot;screen -r sessionname&quot;) results in an error instead of attaching to either screen:
&quot;WriteMessage: Bad file descriptor&quot;

Tony Ohmann <tonyohmann>
Mon 24 Jul 2017 04:09:50 PM UTC, original submission:

1. screen -S sessionname

2. screen -ls
4508.sessionname (07/24/17 15:56:28) (Attached)

3. ctrl a d

4. screen -ls
4508.sessionname (07/24/17 15:56:28) (Detached)

5. screen -S sessionname2

6. screen -ls
6241.sessionname2 (07/24/17 16:03:13) (Attached)
4508.sessionname (07/24/17 15:56:27) (Detached)

7. ctrl a d

8. screen -ls
6241.sessionname2 (07/24/17 16:03:14) (Detached)
4508.sessionname (07/24/17 15:56:28) (Detached)

9. screen -r sessionname

10. screen -ls
6241.sessionname2 (07/24/17 16:03:14) (Attached)
4508.sessionname (07/24/17 15:56:28) (Detached)

I tried out different session names like "test" and "testtwo" with the same result.



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

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by amade (Posted a comment)
  • -unavailable- added by netch (Posted a comment)
  • -unavailable- added by netch (Voted in favor of this item)
  • -unavailable- added by tonyohmann (Posted a comment)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 30 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 07 Aug 2017 10:12:29 AM UTCnetchCarbon-Copy-=>Added netch

    Back to the top

    Powered by Savane 3.1-cleanup1