Skip to content

GNU Screen window captions as XTerm tabs

XTerm is my favorite terminal emulator and I love GNU Screen. So, imagine my joy when I found out that Screen can persistently show window captions ([Ctrl+A]: caption always).

GNU Sreen with default window captions (in XTerm)

Now I wouldn’t loose track of my windows so easily. No more detours through the Window-list, and it gets better; from the Screen manual, I learned that I could set the caption to a string. Look what [Ctrl+A]: caption '%w' does:

GNU Screen with simple window captions (in XTerm)

Cool! I could finally have my XTerm tabs. 🙂 Just recently, I was telling Wiebe—in reply to a complaint of him about getting lost in Screen’s window list—how cool it would be if you could have a terminal emulator display a tab for each screen window. Now I can tell him, instead, that tabs in a terminal emulator are a superfluous feature.

My current configuration

GNU Screen with window captions (in XTerm)

This last example is done with the following Screen command: caption always "%{= kB}%-Lw%{=s kB}%50>%n%f* %t %{-}%+Lw%<" There are more examples in the manual page. Enjoy your tabs!


    6 Comments ( Add comment / trackback )

    1. On Jan 12, 2009 at 18:25

      […] you don’t know how to configure Screen with captions, I’ve blogged about his […]

    2. (permalink)
      Comment by Nick Anderson
      On February 11, 2009 at 17:39

      You might like this screenrc

    3. (permalink)
      Comment by Rowan Rodrik
      On February 11, 2009 at 18:55

      I do. Thank you. 🙂

    4. On Mar 30, 2009 at 13:36

      […] Screen provides for “tabs” in my XTerms and some other features I’ve come to depend on. That’s why, upon login, my Main […]

    5. (permalink)
      Comment by dcfix
      On November 26, 2012 at 18:58

      Thanks for the great post – I’m just starting with screen to do remote programming with my new Chromebook. Screen makes all the difference in the world, and your tips are very helpful for me.

    6. (permalink)
      Comment by mirabilos
      On August 20, 2013 at 13:36

      You might like this screenrc. (Though I didnt set caption always, considering I have the title in the status bar.)

      I prefer to have terminals not change their tab titles automatically. I start them with - as title and then use ^AA to change that to things like IRC, pine, lynx, sys1 (for ssh), OFTC (for the other IRC client, the main one sits on Freenode and runs always), etc. manually.