I'm running screen -D -R (with optionally using -S name), and it works great, but has one problem - when given screen doesn't exist earlier, i get notification "New screen...", and irritating wait.

How can I disable this particular notification?

  • It's just a notification. It's not hanging, you can start typing, the notification will disappear and everything starts working.
    – Lekensteyn
    Aug 30, 2010 at 11:03
  • 4
    I know, but it's annoying. And was hoping that there is a way to remove it. Besides - it actually stops shell from running - i.e. shell prompt shows only after notification is gone (whether it's timeout, or me pressing some key)
    – user7385
    Aug 30, 2010 at 11:07

4 Answers 4


Unfortunately, this behavior is hard-coded in the source: the same test is used to determine whether to emit the “New screen...” notification and to determine whether to attach to a running session. (In the screen 4.0.3 source, (rflag && (rflag & 1) == 0) in attacher.c and screen.crflag is 1 for -r plus 2 for each -R.)

If you're willing to recompile, the patch is trivial: remove the line that displays the message from screen.c.

You can make the message go away by typing something. If you don't want to type a key that will reach the application inside the screen window, you can type C-a ` or some other unbound key.

A simple workaround of sorts is to immediately detach the screen session (either with C-a d or with the detach command in the screenrc file; -m on the command line doesn't work for this when -R is also specified), then attach to it again (e.g. by running the same command again).

A really kludgy but fully automated workaround is to include the following lines in the screenrc file to skip messages initially and reenable them one second later:

msgwait 0
screen -t post_initialization 39 sh -c 'sleep 1; screen -X msgwait 5'

(39 is the highest possible window number, it's a compile-time option (MAXWIN).)

Note that both workarounds will hide any message screen chooses to display when it starts, not just the useless “New screen...” one.

  • 1
    Finally solved it this way: depesz.com/index.php/2010/08/30/… but your answer is the most informative.
    – user7385
    Sep 1, 2010 at 10:08
  • the post_initialization method did not work for me. I have gnome terminal running screen -R as its startup command, and it just starts and immediately exits. Sep 16, 2012 at 21:44

I just had the same problem. In the latest version of screen, you can specify the -q flag to quiet screen, and keep it from showing.

The source shows

if (rflag && (rflag & 1) == 0 && !quietflag)

so I don't know where Gilles found that, or when it was changed.

  • 1
    This is the correct answer. Nov 8, 2016 at 20:26
  • @interestinglythere Why is it not correct? It works. Jun 24, 2018 at 20:52

Well, I am quite late on the scene, but I just had the same problem. I resolved it by not using -D -R, but just -S. So $ screen -S myScreenName. This starts the screen right away...


Try adding these to your .screenrc file:

startup_message off
msgwait 1

The latter will cause all the screen messages being visible only for 1 second - that maybe annoyingly short other times, though.

  • I already have startup_message off, and msgwait - well, it's shorter, but it's still there. I could set it to 0, but then it would influence all other notifications as well :(
    – user7385
    Aug 30, 2010 at 11:17

You must log in to answer this question.