bugGNU Screen - Bugs: bug #28386, screen does not start detached if...


bug #28386: screen does not start detached if "layout" used in screenrc

Submitter:  Artur Skonecki <askonecki>
Submitted:  Wed 23 Dec 2009 02:21:40 PM UTC
Category:  Crash/Freeze/Infloop Severity:  5 - Blocker
Priority:  * 5 - Normal Status:  Confirmed
Privacy:  Public Assigned to:  None
Open/Closed:  Open Release:  Cur Dev Sources
Fixed Release:  None Planned Release:  None
Work Required:  None
* Mandatory Fields

Add a New Comment Rich Markup

Mon 28 Mar 2011 10:48:40 PM UTC, comment #4: 

I have checked in a fix (http://git.savannah.gnu.org/cgit/screen.git/commit/?id=e5b296e8af899e199d8c416da7b6e7204824ed1b and next) that will try to 'Do The Right Thing' with layout commands when there's no display attached to it. So (1) it will not crash with layout commands with -dm, and (2) it will be possible to create multiple layouts and save their names. This is, at this point, not really useful, since you cannot split when detached. So more ideally, splits should be possible even where there are no displays (it will be tricky to determine the size of the splits, but maybe we can just start with the default 80x25 size).

So, in short, fixed. But keeping it open as a reminder to allow splitting when detached.

Sadrul Habib Chowdhury <sadrul>
Group administrator
Mon 28 Mar 2011 06:30:23 PM UTC, comment #3: 

Ideally, screen would remember the layout without requiring a display. But for a workaround, this should indeed fix the crash.

Sadrul Habib Chowdhury <sadrul>
Group administrator
Tue 15 Mar 2011 05:35:39 PM UTC, comment #2: 

Does including NEED_DISPLAY in layout's line in comm.c is acceptable for 4.1.0?

diff --git a/src/comm.c b/src/comm.c
index 5f4af8a..862f915 100644
--- a/src/comm.c
+++ b/src/comm.c
@@ -213,7 +213,7 @@ struct comm comms[RC_LAST + 1] =
   { "kill",            NEED_FORE|ARGS_0 },
   { "lastmsg",         CAN_QUERY|NEED_DISPLAY|ARGS_0 },
-  { "layout",           ARGS_1|ARGS_ORMORE},
+  { "layout",           NEED_DISPLAY|ARGS_1|ARGS_ORMORE},
   { "license",         NEED_LAYER|ARGS_0 },
 #ifdef LOCK
   { "lockscreen",      NEED_DISPLAY|ARGS_0 },

Artur Skonecki <askonecki>
Wed 23 Dec 2009 04:05:10 PM UTC, comment #1: 

I can confirm the bug. Most of the layout sub-commands seem to be heavily dependent on an existing display.

Sadrul Habib Chowdhury <sadrul>
Group administrator
Wed 23 Dec 2009 02:21:40 PM UTC, original submission:  

Steps to reproduce:
1. Use layout command in config (like "layout autosave" or "layout save d0")
2. Try to start screen detached: screen -d -m

$ screen -ls
There are screens on:
        8316.main       (Attached)
        9715.base       (Dead ???)
Remove dead screens with 'screen -wipe'.
2 Sockets in /tmp/screens/S-adam.

Artur Skonecki <askonecki>


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

Attach Files:

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 askonecki (Submitted 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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-12-23 sadrul Severity3 - Normal 5 - Blocker
        StatusNone Confirmed

    Back to the top

    Powered by Savane 3.12.
    Corresponding source code