I use screen on a daily basis. My caption line in ~/.screenrc looks like this:

caption always '%{= dg} %H %{G}| %{B}%l %{G}|%=%?%{d}%-w%?%{r}(%{d}%n %t%? {%u} %?%{r})%{d}%?%+w%?%=%{G}| %{B}%M %d %C:%s '

I like but when I connect via ssh to a remote host and reattach a screen session on it I get this - 2 caption lines (this image turned not to be quite good, press it and open in a new tab to make it bigger and see what's the problem):

enter image description here

How can I kill an outer session or at least hide the caption line on outer session?

  • Out of curiosity, does a redisplay fix it (Ctrl-a Ctrl-l)?
    – Drav Sloan
    Aug 25, 2013 at 18:01
  • No, redisplay doesn't change anything. I don't think screen is in a broken state, there are just 2 caption lines simultaneously one above the another. Aug 25, 2013 at 18:17

1 Answer 1


Captions are fairly limited - once a caption is added, there is no known command to remove them. One thing you can do is hide the text in them by replacing the caption in the outer session:

<ctrl>-a :caption string '%{kk}'

(where kk is black/black.) You'll still have a wasted line of real estate but the outer session's caption line will be cleared and hopefully not distracting you.

And you'll still have the problem that you're nested - you can't kill the outer without killing the ssh process that you started from it. All of your screen commands to the inner screen will have to be prefixed with an extra 'a'.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .