Smokes your problems, coughs fresh air.

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!


  1. Nick Anderson

    You might like this screenrc

  2. Rowan Rodrik

    I do. Thank you. 🙂

  3. dcfix

    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.

  4. mirabilos

    You might like this screenrc. (Though I didn’t 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.

© 2024 BigSmoke

Theme by Anders NorenUp ↑