0

Under GNU screen, one can use c-a A to give current window a name. However, screen also detect program running and it can overwrite the self-defined window name.

For example, I can specify a window name call server log. If I do some job control and fg to another job the window name will be updated to fg, which is not very informational.

How can I keep the self-defined window name from auto update?

clwen
  • 20,004
  • 31
  • 77
  • 94
  • 1
    screen doesn't "detect" that you ran a program. There's something in your shell configuration that is pushing updates to the title. –  Jun 16 '13 at 05:56
  • Thanks. I'm using `zsh` without the `screen` plugin. And there is no special screen setting in my `.zshrc` – clwen Jun 17 '13 at 17:23
  • screen understands the xterm title escape sequence `^[]0;title^G` so it's not necessarily a screen-specific problem –  Jun 17 '13 at 19:39

1 Answers1

0

I was just about to ask the same question. Thank god for SO's similar questions that pop up while you're posting a question.

I'm on Centos7 and a similar thing was happening to me. Though, my system was not setting the window name to the previously invoked application name -> it was setting it to user@hostname. I noticed that the offending variable was PROMPT_COMMAND which was set in /etc/bashrc. Thus, my solution was to unset that variable in /etc/bashrc (specifically inside an if statement that pertains to screen sessions).

duffsterlp
  • 347
  • 1
  • 5
  • 15
  • Apparently your `$PROMPT_COMMAND` prints the relevant escape sequence `^[]0;title^G`. If it does other things as well, you might want to remove just the printing of the escape sequence. – Keith Thompson Feb 17 '15 at 19:13