3

On one of my clients' servers, I've been using the tmux status bar to monitor long-running processes, both through the automatic window-name changes and by setting window names through ANSI control codes in scripts. It's incredibly useful when you have to run a dozen processes at a time and see which ones are finished.

They recently moved the server to a new provider (Amazon AWS, I believe), and suddenly tmux is crippled. There's no automatic name-changes on the tmux status bar, and it won't respond to the scripts' name-changes (it does respond to some script changes, I'll have to work out why it isn't doing all of them).

I've tried various configuration changes, but nothing seems to make a difference -- the "name" is always X:login@hostname:workingdir (where X is the window index).

Am I doing something wrong, or is it a limitation of the server? In either case, is there some way to fix it?

Here's my current .tmux.conf file:

set -g xterm-keys on
#bind-key C-b last-window
set -sg escape-time 20
setw -g mode-keys vi

# Reload the config file on demand.
bind r source-file ~/.tmux.conf

set -g set-titles on
setw -g allow-rename on
#setw -g monitor-activity on
setw -g automatic-rename on
setw -g window-status-current-format "#I:#W#F"
setw -g window-status-format "#I:#W#F"

Old system: CentOS 6.10
Old tmux version: 1.6
New system: CentOS 7
New tmux version: 1.8

Head Geek
  • 141
  • 7
  • What OS are you running in AWS? Ubuntu? AWS Linux? What version of tmux are you running? What version did you used to run? It sounds to me like you're using an older version of tmux which maybe doesn't support renaming windows? But I'm guessing. – Rumbles Apr 16 '19 at 15:46
  • @Rumbles: added that info. Both the OS and `tmux` are newer. – Head Geek Apr 16 '19 at 16:12

1 Answers1

1

It turned out to be the value of PROMPT_COMMAND, set in /etc/bashrc on the new server, overwriting anything I put as the window title every time the prompt was shown. :-(

Head Geek
  • 141
  • 7
  • Same problem here. But I assume $PROMPT_COMMAND cannot be overwritten. Did you find another fix? – Rob Romijnders Jun 07 '22 at 15:35
  • @RobRomijnders, it has been several years, but I vaguely recall that that problem turned out to be caused by `byobu`. It was reading `/etc/bashrc` and overwriting my `.tmux.conf` commands. I don't recall exactly how I fixed it, maybe modifying `byobu`'s own file. – Head Geek Jun 08 '22 at 18:30